This class calculates gradients of arbitrary quantities at flux integration points using the two-point approximation scheme.
More...
#include <fvbasegradientcalculator.hh>
|
| 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.
|
| template<class QuantityCallback> |
| auto | calculateScalarValue (const ElementContext &elemCtx, unsigned fapIdx, const QuantityCallback &quantityCallback) const -> std::remove_reference_t< decltype(quantityCallback.operator()(0))> |
| | Calculates the value of an arbitrary scalar quantity at any interior flux approximation point.
|
| template<class QuantityCallback> |
| auto | calculateVectorValue (const ElementContext &elemCtx, unsigned fapIdx, const QuantityCallback &quantityCallback) const -> std::remove_reference_t< decltype(quantityCallback.operator()(0))> |
| | Calculates the value of an arbitrary vectorial quantity at any interior flux approximation point.
|
| 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.
|
| 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.
|
| 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.
|
|
|
static void | registerParameters () |
| | Register all run-time parameters for the gradient calculator of the base class of the discretization.
|
template<class TypeTag>
class Opm::FvBaseGradientCalculator< TypeTag >
This class calculates gradients of arbitrary quantities at flux integration points using the two-point approximation scheme.
◆ 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
-
| [out] | quantityGrad | Resulting gradient |
| elemCtx | The current execution context |
| faceIdx | The local index of the flux approximation point in the current element's stencil. |
| quantityCallback | A callable object returning the value of the quantity at an index of a degree of freedom |
◆ 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
-
| elemCtx | The current execution context |
| fapIdx | The local index of the flux approximation point in the current element's stencil. |
| quantityCallback | A callable object returning the value of the quantity given the index of a degree of freedom |
◆ 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
-
| [out] | quantityGrad | Resulting gradient |
| elemCtx | The current execution context |
| fapIdx | The local index of the flux approximation point in the current element's stencil. |
| quantityCallback | A callable object returning the value of the quantity given the index of a degree of freedom |
◆ calculateScalarValue()
template<class TypeTag>
template<class QuantityCallback>
| auto Opm::FvBaseGradientCalculator< TypeTag >::calculateScalarValue |
( |
const ElementContext & | elemCtx, |
|
|
unsigned | fapIdx, |
|
|
const QuantityCallback & | quantityCallback ) const->std::remove_reference_t< decltype(quantityCallback.operator()(0))> |
|
inline |
Calculates the value of an arbitrary scalar quantity at any interior flux approximation point.
- Parameters
-
| elemCtx | The current execution context |
| fapIdx | The local index of the flux approximation point in the current element's stencil. |
| quantityCallback | A callable object returning the value of the quantity at an index of a degree of freedom |
◆ calculateVectorValue()
template<class TypeTag>
template<class QuantityCallback>
| auto Opm::FvBaseGradientCalculator< TypeTag >::calculateVectorValue |
( |
const ElementContext & | elemCtx, |
|
|
unsigned | fapIdx, |
|
|
const QuantityCallback & | quantityCallback ) const->std::remove_reference_t< decltype(quantityCallback.operator()(0))> |
|
inline |
Calculates the value of an arbitrary vectorial quantity at any interior flux approximation point.
- Parameters
-
| elemCtx | The current execution context |
| fapIdx | The local index of the flux approximation point in the current element's stencil. |
| quantityCallback | A callable object returning the value of the quantity at an index of a degree of freedom |
◆ prepare()
template<class TypeTag>
template<bool prepareValues = true, bool prepareGradients = true>
Precomputes the common values to calculate gradients and values of quantities at every interior flux approximation point.
- Parameters
-
| elemCtx | The current execution context |
| timeIdx | The index used by the time discretization. |
The documentation for this class was generated from the following file: