40 #ifndef cellMDLimitedGrad_H 41 #define cellMDLimitedGrad_H 92 ) <<
"coefficient = " << k_
93 <<
" should be >= 0 and <= 1" 107 const Type& maxDelta,
108 const Type& minDelta,
138 const scalar& maxDelta,
139 const scalar& minDelta,
143 scalar extrapolate = dcf &
g;
145 if (extrapolate > maxDelta)
147 g = g + dcf*(maxDelta - extrapolate)/
magSqr(dcf);
149 else if (extrapolate < minDelta)
151 g = g + dcf*(minDelta - extrapolate)/
magSqr(dcf);
160 const Type& maxDelta,
161 const Type& minDelta,
165 for (
direction cmpt=0; cmpt<Type::nComponents; cmpt++)
167 vector gi(g[cmpt], g[cmpt+3], g[cmpt+6]);
172 minDelta.component(cmpt),
cellMDLimitedGrad(const fvMesh &mesh, Istream &schemeData)
Construct from mesh and schemeData.
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)...
void operator=(const cellMDLimitedGrad &)=delete
Disallow default bitwise assignment.
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.
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.
A class for handling words, derived from string.
static void limitFace(typename outerProduct< vector, Type >::type &g, const Type &maxDelta, const Type &minDelta, const vector &dcf)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if successful.
cellMDLimitedGrad gradient scheme applied to a runTime selected base gradient scheme.
TypeName("cellMDLimited")
RunTime type information.
dimensioned< scalar > magSqr(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.
const Cmpt & component(const direction) const
A class for managing temporary objects.
const dimensionedVector & g
const fvMesh & mesh() const
Return mesh reference.