This class calculates gradients of arbitrary quantities at flux integration points using the two-point approximation scheme. More...

#include <fvbasegradientcalculator.hh>

Inheritance diagram for Opm::FvBaseGradientCalculator< TypeTag >:
Inheritance graph

Public Member Functions

template<bool prepareValues = true, bool prepareGradients = true>
void prepare (const ElementContext &, unsigned)
 Precomputes the common values to calculate gradients and values of quantities at every interior flux approximation point. More...
 
template<class QuantityCallback >
auto calculateScalarValue (const ElementContext &elemCtx, unsigned fapIdx, const QuantityCallback &quantityCallback) const -> typename std::remove_reference< decltype(quantityCallback.operator()(0))>::type
 Calculates the value of an arbitrary scalar quantity at any interior flux approximation point. More...
 
template<class QuantityCallback >
auto calculateVectorValue (const ElementContext &elemCtx, unsigned fapIdx, const QuantityCallback &quantityCallback) const -> typename std::remove_reference< decltype(quantityCallback.operator()(0))>::type
 Calculates the value of an arbitrary vectorial quantity at any interior flux approximation point. More...
 
template<class QuantityCallback >
void calculateGradient (EvalDimVector &quantityGrad, const ElementContext &elemCtx, unsigned fapIdx, const QuantityCallback &quantityCallback) const
 Calculates the gradient of an arbitrary quantity at any flux approximation point. More...
 
template<class QuantityCallback >
auto calculateBoundaryValue (const ElementContext &, unsigned, const QuantityCallback &quantityCallback) -> decltype(quantityCallback.boundaryValue())
 Calculates the value of an arbitrary quantity at any flux approximation point on the grid boundary. More...
 
template<class QuantityCallback >
void calculateBoundaryGradient (EvalDimVector &quantityGrad, const ElementContext &elemCtx, unsigned faceIdx, const QuantityCallback &quantityCallback) const
 Calculates the gradient of an arbitrary quantity at any flux approximation point on the boundary. More...
 

Static Public Member Functions

static void registerParameters ()
 Register all run-time parameters for the gradient calculator of the base class of the discretization. More...
 

Detailed Description

template<class TypeTag>
class Opm::FvBaseGradientCalculator< TypeTag >

This class calculates gradients of arbitrary quantities at flux integration points using the two-point approximation scheme.

Member Function Documentation

◆ calculateBoundaryGradient()

template<class TypeTag >
template<class QuantityCallback >
void Opm::FvBaseGradientCalculator< TypeTag >::calculateBoundaryGradient ( EvalDimVector &  quantityGrad,
const ElementContext &  elemCtx,
unsigned  faceIdx,
const QuantityCallback &  quantityCallback 
) const
inline

Calculates the gradient of an arbitrary quantity at any flux approximation point on the boundary.

Boundary gradients are always calculated using the two-point approximation.

Parameters
elemCtxThe current execution context
faceIdxThe local index of the flux approximation point in the current element's stencil.
quantityCallbackA callable object returning the value of the quantity at an index of a degree of freedom

Referenced by Opm::P1FeGradientCalculator< TypeTag >::calculateBoundaryGradient().

◆ calculateBoundaryValue()

template<class TypeTag >
template<class QuantityCallback >
auto Opm::FvBaseGradientCalculator< TypeTag >::calculateBoundaryValue ( const ElementContext &  ,
unsigned  ,
const QuantityCallback &  quantityCallback 
) -> decltype(quantityCallback.boundaryValue())
inline

Calculates the value of an arbitrary quantity at any flux approximation point on the grid boundary.

Boundary values are always calculated using the two-point approximation.

Parameters
elemCtxThe current execution context
fapIdxThe local index of the flux approximation point in the current element's stencil.
quantityCallbackA callable object returning the value of the quantity given the index of a degree of freedom

Referenced by Opm::P1FeGradientCalculator< TypeTag >::calculateBoundaryValue().

◆ calculateGradient()

template<class TypeTag >
template<class QuantityCallback >
void Opm::FvBaseGradientCalculator< TypeTag >::calculateGradient ( EvalDimVector &  quantityGrad,
const ElementContext &  elemCtx,
unsigned  fapIdx,
const QuantityCallback &  quantityCallback 
) const
inline

Calculates the gradient of an arbitrary quantity at any flux approximation point.

Parameters
elemCtxThe current execution context
fapIdxThe local index of the flux approximation point in the current element's stencil.
quantityCallbackA callable object returning the value of the quantity given the index of a degree of freedom

Referenced by Opm::P1FeGradientCalculator< TypeTag >::calculateGradient().

◆ calculateScalarValue()

template<class TypeTag >
template<class QuantityCallback >
auto Opm::FvBaseGradientCalculator< TypeTag >::calculateScalarValue ( const ElementContext &  elemCtx,
unsigned  fapIdx,
const QuantityCallback &  quantityCallback 
) const -> typename std::remove_reference<decltype(quantityCallback.operator()(0))>::type
inline

Calculates the value of an arbitrary scalar quantity at any interior flux approximation point.

Parameters
elemCtxThe current execution context
fapIdxThe local index of the flux approximation point in the current element's stencil.
quantityCallbackA callable object returning the value of the quantity at an index of a degree of freedom

Referenced by Opm::P1FeGradientCalculator< TypeTag >::calculateScalarValue().

◆ calculateVectorValue()

template<class TypeTag >
template<class QuantityCallback >
auto Opm::FvBaseGradientCalculator< TypeTag >::calculateVectorValue ( const ElementContext &  elemCtx,
unsigned  fapIdx,
const QuantityCallback &  quantityCallback 
) const -> typename std::remove_reference<decltype(quantityCallback.operator()(0))>::type
inline

Calculates the value of an arbitrary vectorial quantity at any interior flux approximation point.

Parameters
elemCtxThe current execution context
fapIdxThe local index of the flux approximation point in the current element's stencil.
quantityCallbackA callable object returning the value of the quantity at an index of a degree of freedom

Referenced by Opm::P1FeGradientCalculator< TypeTag >::calculateVectorValue().

◆ prepare()

template<class TypeTag >
template<bool prepareValues = true, bool prepareGradients = true>
void Opm::FvBaseGradientCalculator< TypeTag >::prepare ( const ElementContext &  ,
unsigned   
)
inline

Precomputes the common values to calculate gradients and values of quantities at every interior flux approximation point.

Parameters
elemCtxThe current execution context
timeIdxThe index used by the time discretization.

◆ registerParameters()

template<class TypeTag >
static void Opm::FvBaseGradientCalculator< TypeTag >::registerParameters ( )
inlinestatic

Register all run-time parameters for the gradient calculator of the base class of the discretization.


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