All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface > Class Template Reference
Inheritance diagram for Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >:
Opm::Anisotropic::InnerProduct< GridInterface, RockInterface >

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. More...
 

Public Member Functions

 MimeticIPAnisoRelpermEvaluator ()
 Default constructor.
 
 MimeticIPAnisoRelpermEvaluator (const int max_nf)
 Constructor. More...
 
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. 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...
 

Member Typedef Documentation

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

The iterator type for iterating over grid cells.

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

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

The number of space dimensions.

Constructor & Destructor Documentation

template<class GridInterface , class RockInterface >
Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::MimeticIPAnisoRelpermEvaluator ( const int  max_nf)
inline

Constructor.

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$.

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 
)
inline

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
.
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 
)
inline

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.
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
inline

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
.
template<class GridInterface , class RockInterface >
template<class Vector >
void Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::gravityFlux ( const CellIter c,
Vector &  gflux 
) const
inline

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.
template<class GridInterface , class RockInterface >
void Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::init ( const int  max_nf)
inline

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$.
template<class GridInterface , class RockInterface >
template<class Vector >
void Opm::MimeticIPAnisoRelpermEvaluator< GridInterface, RockInterface >::reserveMatrices ( const Vector &  sz)
inline

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
.

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