45 #ifndef cellLimitedGrad_H 46 #define cellLimitedGrad_H 63 template<
class Type,
class Limiter>
112 k_(readScalar(schemeData))
114 if (k_ < 0 || k_ > 1)
117 <<
"coefficient = " << k_
118 <<
" should be >= 0 and <= 1" 129 const scalar maxDelta,
130 const scalar minDelta,
131 const scalar extrapolate
137 const Type& maxDelta,
138 const Type& minDelta,
139 const Type& extrapolate
158 template<
class Type,
class Limiter>
162 const scalar maxDelta,
163 const scalar minDelta,
164 const scalar extrapolate
169 if (extrapolate > SMALL)
171 r = maxDelta/extrapolate;
173 else if (extrapolate < -SMALL)
175 r = minDelta/extrapolate;
186 template<
class Type,
class Limiter>
190 const Type& maxDelta,
191 const Type& minDelta,
192 const Type& extrapolate
195 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; ++cmpt)
TypeName("cellLimited")
RunTime type information.
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.
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.
tmp< areaScalarField > limiter(const areaScalarField &phi)
Mesh data needed to do the Finite Volume discretisation.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
cellLimitedGrad gradient scheme applied to a runTime selected base gradient scheme.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Abstract base class for gradient schemes.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
void limitFaceCmpt(scalar &limiter, const scalar maxDelta, const scalar minDelta, const scalar extrapolate) const
Mesh data needed to do the Finite Volume discretisation.
A class for managing temporary objects.
const fvMesh & mesh() const
Return const reference to mesh.
label & setComponent(label &val, const direction) noexcept
Non-const access to integer-type (has no components)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
void limitFace(Type &limiter, const Type &maxDelta, const Type &minDelta, const Type &extrapolate) const
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...