46#ifndef faceLimitedGrad_H
47#define faceLimitedGrad_H
84 const scalar maxDelta,
85 const scalar minDelta,
86 const scalar extrapolate
91 faceLimitedGrad(
const faceLimitedGrad&) =
delete;
94 void operator=(
const faceLimitedGrad&) =
delete;
108 gradScheme<Type>(
mesh),
109 basicGradScheme_(
fv::gradScheme<Type>::
New(
mesh, schemeData)),
110 k_(readScalar(schemeData))
112 if (k_ < 0 || k_ > 1)
115 <<
"coefficient = " << k_
116 <<
" should be >= 0 and <= 1"
144inline void faceLimitedGrad<Type>::limitFace
147 const scalar maxDelta,
148 const scalar minDelta,
149 const scalar extrapolate
152 if (extrapolate > maxDelta + VSMALL)
156 else if (extrapolate < minDelta - VSMALL)
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...
TypeName("faceLimited")
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 for optional caching.
faceLimitedGrad(const fvMesh &mesh, Istream &schemeData)
Construct from mesh and schemeData.
Abstract base class for gradient schemes.
tmp< GeometricField< typename outerProduct< vector, Type >::type, fvPatchField, volMesh > > grad(const GeometricField< Type, fvPatchField, volMesh > &, const word &name) const
Calculate and return the grad of the given field which may have been cached.
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.
typeOfRank< typenamepTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank)>::type type
A class for managing temporary objects.
Mesh data needed to do the Finite Volume discretisation.
A class for handling words, derived from Foam::string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Namespace for finite-volume.
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::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.