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,
135 const scalar& maxDelta,
136 const scalar& minDelta,
140 scalar extrapolate = dcf & g;
142 if (extrapolate > maxDelta)
144 g = g + dcf*(maxDelta - extrapolate)/
magSqr(dcf);
146 else if (extrapolate < minDelta)
148 g = g + dcf*(minDelta - extrapolate)/
magSqr(dcf);
157 const Type& maxDelta,
158 const Type& minDelta,
162 for (
direction cmpt=0; cmpt<Type::nComponents; cmpt++)
164 vector gi(g[cmpt], g[cmpt+3], g[cmpt+6]);
169 minDelta.component(cmpt),
Generic GeometricField class.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
const Cmpt & component(const direction) const
Mesh data needed to do the Finite Volume discretisation.
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)
virtual tmp< VolField< typename outerProduct< vector, Type >::type > > calcGrad(const VolField< Type > &vsf, const word &name) const
Return the gradient of the given field to the gradScheme::grad.
cellMDLimitedGrad(const fvMesh &mesh, Istream &schemeData)
Construct from mesh and schemeData.
void operator=(const cellMDLimitedGrad &)=delete
Disallow default bitwise assignment.
TypeName("cellMDLimited")
RunTime type information.
Abstract base class for gradient schemes.
const fvMesh & mesh() const
Return mesh reference.
static tmp< gradScheme< Type > > New(const fvMesh &mesh, Istream &schemeData)
Return a pointer to a new gradScheme created on freestore.
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) >::type type
A class for managing temporary objects.
A class for handling words, derived from string.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
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 successful.
word name(const complex &)
Return a string representation of a complex.
dimensioned< scalar > magSqr(const dimensioned< Type > &)