Opm::Anisotropic::InnerProduct< GridInterface, RockInterface > Struct Template Reference

The inner product template. More...

#include <SimulatorTraits.hpp>

Inheritance diagram for Opm::Anisotropic::InnerProduct< GridInterface, RockInterface >:
Inheritance graph

Public Types

enum  { dim = GridInterface::Dimension }
 The number of space dimensions. More...
 
typedef GridInterface::CellIterator CellIter
 The iterator type for iterating over grid cells. More...
 
typedef CellIter::Scalar Scalar
 The element type of the matrix representation of the mimetic inner product. Assumed to be a floating point type, and usually,. More...
 

Public Member Functions

void init (const int max_nf)
 Initialization routine. More...
 
template<class Vector >
void reserveMatrices (const Vector &sz)
 Reserve internal space for storing values of (static) IP contributions for given set of cells. More...
 
void buildStaticContrib (const CellIter &c, const RockInterface &r, const typename CellIter::Vector &grav, const int nf)
 Main evaluation routine. Computes the inverse of the matrix representation of the mimetic inner product in a single cell with kown permeability $K$. Adds a regularization term in order to guarantee a positive definite matrix. More...
 
template<class FluidInterface , class Sat >
void computeDynamicParams (const CellIter &c, const FluidInterface &fl, const std::vector< Sat > &s)
 Evaluate dynamic (saturation dependent) properties in single cell. More...
 
template<template< typename > class SP>
void getInverseMatrix (const CellIter &c, FullMatrix< Scalar, SP, FortranOrdering > &Binv) const
 Retrieve the dynamic (mobility updated) inverse mimetic inner product matrix for specific cell. More...
 
template<class Vector >
void gravityFlux (const CellIter &c, Vector &gflux) const
 Compute gravity flux for all faces of single cell. More...
 

Detailed Description

template<class GridInterface, class RockInterface>
struct Opm::Anisotropic::InnerProduct< GridInterface, RockInterface >

The inner product template.

Member Typedef Documentation

template<class GridInterface , class RockInterface >
typedef GridInterface::CellIterator Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::CellIter
inherited

The iterator type for iterating over grid cells.

template<class GridInterface , class RockInterface >
typedef CellIter::Scalar Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::Scalar
inherited

The element type of the matrix representation of the mimetic inner product. Assumed to be a floating point type, and usually,.

is an alias for

double

.

Member Enumeration Documentation

template<class GridInterface , class RockInterface >
anonymous enum
inherited

The number of space dimensions.

Enumerator
dim 

Member Function Documentation

template<class GridInterface , class RockInterface >
void Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::buildStaticContrib ( const CellIter c,
const RockInterface &  r,
const typename CellIter::Vector &  grav,
const int  nf 
)
inlineinherited

Main evaluation routine. Computes the inverse of the matrix representation of the mimetic inner product in a single cell with kown permeability $K$. Adds a regularization term in order to guarantee a positive definite matrix.

Template Parameters
RockInterfaceType representing rock properties. Assumed to expose a method
permeability(i)
which retrieves the static permeability tensor of cell
i
. The permeability tensor, $K$, is in turn, assumed to expose a method
operator()(int
i, int j)
such that the call
K(i,j)
retrieves the $ij$'th component of the cell permeability $K$.
Parameters
[in]cCell for which to evaluate the inverse of the mimetic inner product.
[in]rSpecific reservoir properties. Only the permeability is used in method
buildMatrix()
.
[in]nfNumber of faces (i.e., number of neighbours) of cell
*c
.

References Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::dim, Opm::orthogonalizeColumns(), Opm::symmetricUpdate(), Opm::vecMulAdd_N(), and Opm::zero().

template<class GridInterface , class RockInterface >
template<class FluidInterface , class Sat >
void Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::computeDynamicParams ( const CellIter c,
const FluidInterface &  fl,
const std::vector< Sat > &  s 
)
inlineinherited

Evaluate dynamic (saturation dependent) properties in single cell.

Template Parameters
FluidInterfaceType representing fluid properties. Assumed to expose methods
phaseDensities()
and
phaseMobilities()
for retrieving the phase densities and (tensorial, anisotropic) phase mobilities, respectively.
SatType representing single-cell saturation values. Typically,
Sat
is an alias for
double
.
Parameters
[in]cCell for which to evaluate the dynamic properties.
[in]flSpecific reservoir properties.
[in]sVector of current fluid saturations.

References Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::dim, Opm::prod(), and Opm::vecMulAdd_N().

template<class GridInterface , class RockInterface >
template<template< typename > class SP>
void Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::getInverseMatrix ( const CellIter c,
FullMatrix< Scalar, SP, FortranOrdering > &  Binv 
) const
inlineinherited

Retrieve the dynamic (mobility updated) inverse mimetic inner product matrix for specific cell.

Template Parameters
SPType representing the
FullMatrix<T,SP,OP>
storage policy of the matrix into which the inverse inner product matrix entries will be stored.
Parameters
[in]cCell for which to evaluate the dynamic inverse mimetic inner product.
[in]rSpecific reservoir properties. Only the phase mobilities is used in method.
[in]sFluid saturations.
[out]BinvInverse of matrix representation of the mimetic inner product for cell
*c
. A square, full matrix with the number of rows equal to the number of faces in cell
*c
.

References Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::dim, Opm::matMulAdd_NN(), Opm::matMulAdd_NT(), and Opm::trace().

template<class GridInterface , class RockInterface >
template<class Vector >
void Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::gravityFlux ( const CellIter c,
Vector &  gflux 
) const
inlineinherited

Compute gravity flux for all faces of single cell.

Template Parameters
VectorType representing a vector (or a linear std::array) for which (a constant time)
operator[]
is defined.
Parameters
[in]cCell for which to evaluate the gravity flux.
[out]gfluxGravity fluxes on all faces/intersections of cell c in the order of the face iterator of the cell.

References Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::dim, and Opm::vecMulAdd_N().

template<class GridInterface , class RockInterface >
void Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::init ( const int  max_nf)
inlineinherited

Initialization routine.

Parameters
[in]max_nfMaximum number of faces/connections of any single cell in the model. Used to set the size of certain internal working std::arrays. A cell with $n_f$ faces results in an inner product matrix of size $n_f \times n_f$.

References Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::dim.

template<class GridInterface , class RockInterface >
template<class Vector >
void Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::reserveMatrices ( const Vector &  sz)
inlineinherited

Reserve internal space for storing values of (static) IP contributions for given set of cells.

Template Parameters
VectorVector type, often
std::vector<int>
, representing a set of sizes.
Parameters
[in]szSet of sizes. Assumed to contain $n$ positive values, each representing the number of faces of a specific cell. In other words
sz[i]
is the number of faces of cell
i
.

References Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::dim.


The documentation for this struct was generated from the following file: