24#ifndef DUMUX_ASSEMBLY_NUMERIC_EPSILON_HH
25#define DUMUX_ASSEMBLY_NUMERIC_EPSILON_HH
27#include <dune/common/fvector.hh>
39template<
class Scalar,
int numEq>
42 using NumEqVector = Dune::FieldVector<Scalar, numEq>;
48 baseEps_ = getParamFromGroup<Scalar>(paramGroup,
"Assembly.NumericDifference.BaseEpsilon", 1e-10);
49 magnitude_ = getParamFromGroup<NumEqVector>(paramGroup,
"Assembly.NumericDifference.PriVarMagnitude", NumEqVector(-1));
57 Scalar
operator() (Scalar priVar,
int priVarIdx)
const noexcept
59 return magnitude_[priVarIdx] > 0.0 ? baseEps_*magnitude_[priVarIdx]
65 NumEqVector magnitude_;
A class for numeric differentiation.
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
make the local view function available whenever we use the grid geometry
Definition: adapt.hh:29
A helper class for local assemblers using numeric differentiation to determine the epsilon.
Definition: numericepsilon.hh:41
NumericEpsilon(const std::string ¶mGroup="")
Definition: numericepsilon.hh:45
Scalar operator()(Scalar priVar, int priVarIdx) const noexcept
get the epsilon
Definition: numericepsilon.hh:57
static Scalar epsilon(const Scalar value, const Scalar baseEps=1e-10)
Computes the epsilon used for numeric differentiation.
Definition: numericdifferentiation.hh:47