46 #ifndef cellMDLimitedGrad_H 47 #define cellMDLimitedGrad_H 101 k_(readScalar(schemeData))
103 if (k_ < 0 || k_ > 1)
106 <<
"coefficient = " << k_
107 <<
" should be >= 0 and <= 1" 118 const Type& maxDelta,
119 const Type& minDelta,
143 const scalar& maxDelta,
144 const scalar& minDelta,
148 const scalar extrapolate = dcf &
g;
150 if (extrapolate > maxDelta)
152 g =
g + dcf*(maxDelta - extrapolate)/
magSqr(dcf);
154 else if (extrapolate < minDelta)
156 g =
g + dcf*(minDelta - extrapolate)/
magSqr(dcf);
165 const Type& maxDelta,
166 const Type& minDelta,
176 maxDelta.component(cmpt),
177 minDelta.component(cmpt),
errorManipArg< error, int > exit(error &err, const int errNo=1)
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
Generic GeometricField class.
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
Mesh data needed to do the Finite Volume discretisation.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
virtual tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > calcGrad(const GeometricField< Type, fvPatchField, volMesh > &vsf, const word &name) const
Return the gradient of the given field to the gradScheme::grad for optional caching.
A class for handling words, derived from Foam::string.
static void limitFace(typename outerProduct< vector, Type >::type &g, const Type &maxDelta, const Type &minDelta, const vector &dcf)
cellMDLimitedGrad gradient scheme applied to a runTime selected base gradient scheme.
TypeName("cellMDLimited")
RunTime type information.
const uniformDimensionedVectorField & g
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
Abstract base class for gradient schemes.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Mesh data needed to do the Finite Volume discretisation.
A class for managing temporary objects.
const fvMesh & mesh() const
Return const reference to mesh.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...