Loading...
Searching...
No Matches
Opm::MimeticIPEvaluator< GridInterface, RockInterface > Class Template Reference
Inheritance diagram for Opm::MimeticIPEvaluator< GridInterface, RockInterface >:

## Public Types

typedef GridInterface::CellIterator | CellIter
| The iterator type for iterating over grid cells.
typedef CellIter::Scalar | Scalar
| The element type of the matrix representation of the mimetic inner product.

## Public Member Functions

| MimeticIPEvaluator ()
| Default constructor.
| MimeticIPEvaluator (const int max_nf)
| Constructor.
void | init (const int max_nf)
| Initialization routine.
template<class Vector>
void | reserveMatrices (const Vector &sz)
| Reserve internal space for storing values of (static) IP contributions for given set of cells.
void | buildStaticContrib (const CellIter &c, const RockInterface &r, const typename CellIter::Vector &grav, const int nf)
| Main evaluation routine.
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.
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.
template<template< typename > class SP>
void | getInverseMatrix (const CellIter &c, const Scalar totmob, FullMatrix< Scalar, SP, FortranOrdering > &Binv) const
template<class PermTensor, template< typename > class SP>
void | evaluate (const CellIter &c, const PermTensor &K, FullMatrix< Scalar, SP, FortranOrdering > &Binv)
| Main evaluation routine.
template<class Vector>
void | gravityTerm (const CellIter &c, const typename CellIter::Vector &grav, const Scalar omega, Vector &gterm) const
| Computes the mimetic discretization of the gravity term in Darcy's law.
template<class Vector>
void | gravityTerm (const CellIter &c, const typename CellIter::Vector &grav, Vector &gterm) const
template<class FluidInterface, class Sat, class Vector>
void | gravityTerm (const CellIter &c, const FluidInterface &fl, const std::vector< Sat > &s, const typename CellIter::Vector &grav, Vector &gterm) const
template<class Vector>
void | gravityFlux (const CellIter &c, Vector &gflux) const
| Compute gravity flux for all faces of single cell.

## Static Public Attributes

static constexpr int | dim = GridInterface::Dimension
| The number of space dimensions.

## Member Typedef Documentation

## Scalar

template<class GridInterface, class RockInterface>

typedef CellIter::Scalar Opm::MimeticIPEvaluator< GridInterface, RockInterface >::Scalar

The element type of the matrix representation of the mimetic inner product.

Assumed to be a floating point type, and usually,

Scalar
Opm::MimeticIPEvaluator::Scalar
CellIter::Scalar Scalar
The element type of the matrix representation of the mimetic inner product.
Definition MimeticIPEvaluator.hpp:98

is an alias for

double

.

## Constructor & Destructor Documentation

## MimeticIPEvaluator()

template<class GridInterface, class RockInterface>

Opm::MimeticIPEvaluator< GridInterface, RockInterface >::MimeticIPEvaluator | ( | const int | max_nf | ) |

inline explicit

Constructor.

Parameters

  [in] | max_nf | Maximum 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 faces results in an inner product matrix of size .

## Member Function Documentation

## buildStaticContrib()

template<class GridInterface, class RockInterface>

void Opm::MimeticIPEvaluator< 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 . Adds a regularization term in order to guarantee a positive definite matrix.

Template Parameters

  RockInterface | Type 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 'th component of the cell permeability .

Parameters

  [in] | c | Cell for which to evaluate the inverse of the mimetic inner product.
  [in] | r | Specific rock properties. Only the permeability is used in method buildStaticContrib() Opm::MimeticIPEvaluator::buildStaticContrib void buildStaticContrib(const CellIter &c, const RockInterface &r, const typename CellIter::Vector &grav, const int nf) Main evaluation routine. Definition MimeticIPEvaluator.hpp:202 .
  [in] | grav | Gravity
  [in] | nf | Number of faces (i.e., number of neighbours) of cell *c .

## computeDynamicParams()

template<class GridInterface, class RockInterface>
template<class FluidInterface, class Sat>

void Opm::MimeticIPEvaluator< 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

  FluidInterface | Type representing fluid properties. Assumed to expose methods phaseDensities() and phaseMobilities() for retrieving the phase densities and phase mobilities, respectively.
  Sat | Type representing single-cell saturation values. Typically, Sat is an alias for double .

Parameters

  [in] | c | Cell for which to evaluate the dynamic properties.
  [in] | fl | Specific fluid properties.
  [in] | s | Vector of current fluid saturations.

## evaluate()

template<class GridInterface, class RockInterface>
template<class PermTensor, template< typename > class SP>

void Opm::MimeticIPEvaluator< GridInterface, RockInterface >::evaluate | ( | const CellIter & | c,
|  | const PermTensor & | K,
|  | FullMatrix< Scalar, SP, FortranOrdering > & | Binv )

inline

Main evaluation routine.

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

Template Parameters

  PermTensor | Type representing the permeability tensor in a single cell. Assumed to expose a method operator()(int i, int j) such that the call K(i,j) retrieves the 'th component of the cell permeability .
  SP | Type representing the FullMatrix<T,SP,OP> storage policy of the matrix into which the inverse inner product matrix entries will be stored.

Parameters

  [in] | c | Cell for which to evaluate the inverse of the mimetic inner product.
  [in] | K | Permeability tensor for cell *c .
  [out] | Binv | Inverse 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 .

## getInverseMatrix()

template<class GridInterface, class RockInterface>
template<template< typename > class SP>

void Opm::MimeticIPEvaluator< 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

  SP | Type representing the FullMatrix<T,SP,OP> storage policy of the matrix into which the inverse inner product matrix entries will be stored.

Parameters

  [in] | c | Cell for which to evaluate the dynamic inverse mimetic inner product.
  [in] | s | Fluid saturations.
  [out] | Binv | Inverse 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 .

## gravityFlux()

template<class GridInterface, class RockInterface>
template<class Vector>

void Opm::MimeticIPEvaluator< GridInterface, RockInterface >::gravityFlux | ( | const CellIter & | c,
|  | Vector & | gflux ) const

inline

Compute gravity flux for all faces of single cell.

Template Parameters

  Vector | Type representing a vector (or a linear std::array) for which (a constant time) operator[] is defined.

Parameters

  [in] | c | Cell for which to evaluate the gravity flux.
  [out] | gflux | Gravity fluxes on all faces/intersections of cell c in the order of the face iterator of the cell.

## gravityTerm()

template<class GridInterface, class RockInterface>
template<class Vector>

void Opm::MimeticIPEvaluator< GridInterface, RockInterface >::gravityTerm | ( | const CellIter & | c,
|  | const typename CellIter::Vector & | grav,
|  | const Scalar | omega,
|  | Vector & | gterm ) const

inline

Computes the mimetic discretization of the gravity term in Darcy's law.

Template Parameters

  Vector | Type representing a possibly run-time sized one-dimensional mathematical vector.

Parameters

  [in] | c | Cell for which to evaluate the inverse of the mimetic inner product.
  [in] | grav | Gravity vector.
  [in] | omega | The value of in cell *c where and are, respectively, the density and the saturation dependent fractional flow of fluid .
  [out] | gterm | Mimetic discretization of the Darcy law gravity term. One scalar value for each face of cell *c .

## init()

template<class GridInterface, class RockInterface>

void Opm::MimeticIPEvaluator< GridInterface, RockInterface >::init | ( | const int | max_nf | ) |

inline

Initialization routine.

Parameters

  [in] | max_nf | Maximum 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 faces results in an inner product matrix of size .

## reserveMatrices()

template<class GridInterface, class RockInterface>
template<class Vector>

void Opm::MimeticIPEvaluator< GridInterface, RockInterface >::reserveMatrices | ( | const Vector & | sz | ) |

inline

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

Template Parameters

  Vector | Vector type, often std::vector<int> , representing a set of sizes.

Parameters

  [in] | sz | Set of sizes. Assumed to contain 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:

- opm/porsol/mimetic/MimeticIPEvaluator.hpp