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