45#ifndef cellLimitedGrad_H
46#define cellLimitedGrad_H
63template<
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
158template<
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;
186template<
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)
Generic templated field type.
Generic GeometricField class.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Mesh data needed to do the Finite Volume discretisation.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
cellLimitedGrad gradient scheme applied to a runTime selected base gradient scheme.
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.
void limitFace(Type &limiter, const Type &maxDelta, const Type &minDelta, const Type &extrapolate) const
void limitFaceCmpt(scalar &limiter, const scalar maxDelta, const scalar minDelta, const scalar extrapolate) const
TypeName("cellLimited")
RunTime type information.
cellLimitedGrad(const fvMesh &mesh, Istream &schemeData)
Construct from mesh and schemeData.
Abstract base class for gradient schemes.
const fvMesh & mesh() const
Return const reference to mesh.
static tmp< gradScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return a pointer to a new gradScheme created on freestore.
A class for managing temporary objects.
Mesh data needed to do the Finite Volume discretisation.
type
Volume classification types.
A class for handling words, derived from Foam::string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
label & setComponent(label &val, const direction) noexcept
Non-const access to integer-type (has no components)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)
tmp< areaScalarField > limiter(const areaScalarField &phi)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.