Opm::P1FeGradientCalculator< TypeTag > Class Template Reference

This class calculates gradients of arbitrary quantities at flux integration points using first order finite elemens ansatz functions. More...

#include <p1fegradientcalculator.hh>

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

Public Member Functions

template<bool prepareValues = true, bool prepareGradients = true>
void prepare (const ElementContext &elemCtx, unsigned timeIdx)
 Precomputes the common values to calculate gradients and values of quantities at any flux approximation point. More...
 
template<class QuantityCallback >
auto calculateScalarValue (const ElementContext &elemCtx, unsigned fapIdx, const QuantityCallback &quantityCallback) const -> typename std::remove_reference< typename QuantityCallback::ResultType >::type
 Calculates the value of an arbitrary 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< typename QuantityCallback::ResultType >::type
 Calculates the value of an arbitrary quantity at any interior flux approximation point. More...
 
template<class QuantityCallback , class EvalDimVector >
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 &elemCtx, unsigned fapIdx, const QuantityCallback &quantityCallback) -> decltype(ParentType::calculateBoundaryValue(elemCtx, fapIdx, quantityCallback))
 Calculates the value of an arbitrary quantity at any flux approximation point on the grid boundary. More...
 
template<class QuantityCallback , class EvalDimVector >
void calculateBoundaryGradient (EvalDimVector &quantityGrad, const ElementContext &elemCtx, unsigned fapIdx, 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::P1FeGradientCalculator< TypeTag >

This class calculates gradients of arbitrary quantities at flux integration points using first order finite elemens ansatz functions.

This approach can also be used for the vertex-centered finite volume (VCFV) discretization.

Member Function Documentation

◆ calculateBoundaryGradient()

template<class TypeTag >
template<class QuantityCallback , class EvalDimVector >
void Opm::P1FeGradientCalculator< TypeTag >::calculateBoundaryGradient ( EvalDimVector &  quantityGrad,
const ElementContext &  elemCtx,
unsigned  fapIdx,
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
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

References Opm::FvBaseGradientCalculator< TypeTag >::calculateBoundaryGradient().

◆ calculateBoundaryValue()

template<class TypeTag >
template<class QuantityCallback >
auto Opm::P1FeGradientCalculator< TypeTag >::calculateBoundaryValue ( const ElementContext &  elemCtx,
unsigned  fapIdx,
const QuantityCallback &  quantityCallback 
) -> decltype(ParentType::calculateBoundaryValue(elemCtx, fapIdx, quantityCallback))
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 at an index of a degree of freedom

References Opm::FvBaseGradientCalculator< TypeTag >::calculateBoundaryValue().

◆ calculateGradient()

template<class TypeTag >
template<class QuantityCallback , class EvalDimVector >
void Opm::P1FeGradientCalculator< 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 at an index of a degree of freedom

References Opm::FvBaseGradientCalculator< TypeTag >::calculateGradient().

◆ calculateScalarValue()

template<class TypeTag >
template<class QuantityCallback >
auto Opm::P1FeGradientCalculator< TypeTag >::calculateScalarValue ( const ElementContext &  elemCtx,
unsigned  fapIdx,
const QuantityCallback &  quantityCallback 
) const -> typename std::remove_reference<typename QuantityCallback::ResultType>::type
inline

Calculates the value of an arbitrary 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

References Opm::FvBaseGradientCalculator< TypeTag >::calculateScalarValue().

◆ calculateVectorValue()

template<class TypeTag >
template<class QuantityCallback >
auto Opm::P1FeGradientCalculator< TypeTag >::calculateVectorValue ( const ElementContext &  elemCtx,
unsigned  fapIdx,
const QuantityCallback &  quantityCallback 
) const -> typename std::remove_reference<typename QuantityCallback::ResultType>::type
inline

Calculates the value of an arbitrary 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

References Opm::FvBaseGradientCalculator< TypeTag >::calculateVectorValue().

◆ prepare()

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

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

Parameters
elemCtxThe current execution context

◆ registerParameters()

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

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: