40 #ifndef cellLimitedGrad_H 41 #define cellLimitedGrad_H 101 ) <<
"coefficient = " << k_
102 <<
" should be >= 0 and <= 1" 113 const Type& maxDelta,
114 const Type& minDelta,
115 const Type& extrapolate
138 const scalar& maxDelta,
139 const scalar& minDelta,
140 const scalar& extrapolate
143 if (extrapolate > maxDelta + VSMALL)
145 limiter =
min(limiter, maxDelta/extrapolate);
147 else if (extrapolate < minDelta - VSMALL)
149 limiter =
min(limiter, minDelta/extrapolate);
158 const Type& maxDelta,
159 const Type& minDelta,
160 const Type& extrapolate
163 for (
direction cmpt=0; cmpt<Type::nComponents; cmpt++)
167 limiter.component(cmpt),
168 maxDelta.component(cmpt),
169 minDelta.component(cmpt),
170 extrapolate.component(cmpt)
TypeName("cellLimited")
RunTime type information.
void limiter(scalarField &allLambda, const RdeltaTType &rDeltaT, const RhoType &rho, const volScalarField &psi, const surfaceScalarField &phiBD, const surfaceScalarField &phiCorr, const SpType &Sp, const SuType &Su, const scalar psiMax, const scalar psiMin)
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.
Mesh data needed to do the Finite Volume discretisation.
A class for handling words, derived from string.
cellLimitedGrad gradient scheme applied to a runTime selected base gradient scheme.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
static void limitFace(Type &limiter, const Type &maxDelta, const Type &minDelta, const Type &extrapolate)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
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.
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.
const fvMesh & mesh() const
Return mesh reference.