50 <<
"Grad scheme not specified" <<
endl <<
endl 51 <<
"Valid grad schemes are :" <<
endl 52 << IstreamConstructorTablePtr_->sortedToc()
56 const word schemeName(schemeData);
58 auto* ctorPtr = IstreamConstructorTable(schemeName);
67 *IstreamConstructorTablePtr_
71 return ctorPtr(
mesh, schemeData);
96 GradFieldType* pgGrad =
97 mesh().objectRegistry::template getObjectPtr<GradFieldType>(
name);
99 if (!this->
mesh().cache(name) || this->
mesh().changing())
102 if (pgGrad && pgGrad->ownedByRegistry())
104 solution::cachePrintMessage(
"Deleting",
name, vsf);
108 solution::cachePrintMessage(
"Calculating",
name, vsf);
109 return calcGrad(vsf,
name);
115 solution::cachePrintMessage(
"Calculating and caching",
name, vsf);
117 pgGrad = calcGrad(vsf,
name).ptr();
118 regIOobject::store(pgGrad);
122 if (pgGrad->upToDate(vsf))
124 solution::cachePrintMessage(
"Reusing",
name, vsf);
128 solution::cachePrintMessage(
"Updating",
name, vsf);
131 pgGrad = calcGrad(vsf,
name).ptr();
132 regIOobject::store(pgGrad);
152 const GeometricField<Type, fvPatchField, volMesh>& vsf
155 return grad(vsf,
"grad(" + vsf.name() +
')');
171 const tmp<GeometricField<Type, fvPatchField, volMesh>>& tvsf
175 typedef GeometricField<GradType, fvPatchField, volMesh> GradFieldType;
177 tmp<GradFieldType> tgrad =
grad(tvsf());
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)...
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
int debug
Static debugging option.
#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.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
bool eof() const noexcept
True if end of input seen.
tmp< GeometricField< typename outerProduct< vector, Type >::type, faPatchField, areaMesh >> grad(const GeometricField< Type, faePatchField, edgeMesh > &ssf)
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
#define InfoInFunction
Report an information message using Foam::Info.
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.