Go to the documentation of this file.
40 #ifndef cellMDLimitedGrad_H
41 #define cellMDLimitedGrad_H
101 ) <<
"coefficient = " <<
k_
102 <<
" should be >= 0 and <= 1"
113 const Type& maxDelta,
114 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),
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
tmp< fv::gradScheme< Type > > basicGradScheme_
A class for handling words, derived from string.
A class for managing temporary objects.
Mesh data needed to do the Finite Volume discretisation.
typeOfRank< typename pTraits< arg1 >::cmptType, int(pTraits< arg1 >::rank)+int(pTraits< arg2 >::rank) >::type type
const dimensionedVector & g
const Cmpt & component(const direction) const
static tmp< gradScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return a pointer to a new gradScheme created on freestore.
cellMDLimitedGrad(const cellMDLimitedGrad &)
Disallow default bitwise copy construct.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
TypeName("cellMDLimited")
RunTime type information.
const fvMesh & mesh() const
Return mesh reference.
cellMDLimitedGrad(const fvMesh &mesh, Istream &schemeData)
Construct from mesh and schemeData.
Abstract base class for gradient schemes.
Mesh data needed to do the Finite Volume discretisation.
errorManipArg< error, int > exit(error &err, const int errNo=1)
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
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.
cellMDLimitedGrad gradient scheme applied to a runTime selected base gradient scheme.
static void limitFace(typename outerProduct< vector, Type >::type &g, const Type &maxDelta, const Type &minDelta, const vector &dcf)
const scalar k_
Limiter coefficient.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
void operator=(const cellMDLimitedGrad &)
Disallow default bitwise assignment.
Generic GeometricField class.
dimensioned< scalar > magSqr(const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.