41 if (!IOobjectOption::isAnyRead(readOpt))
return false;
45 const auto* eptr =
dict.findEntry(
"gradient", keyType::LITERAL);
49 gradient_.assign(*eptr,
p.size());
53 if (IOobjectOption::isReadRequired(readOpt))
56 <<
"Required entry 'gradient' : missing for patch " <<
p.name()
57 <<
" in dictionary " <<
dict.relativeName() <<
nl 75 gradient_(
p.size(),
Zero)
108 const fixedGradientFaPatchField<Type>& ptf,
110 const DimensionedField<Type, areaMesh>& iF,
111 const faPatchFieldMapper& mapper
115 gradient_(ptf.gradient_, mapper)
126 gradient_(ptf.gradient_)
138 gradient_(ptf.gradient_)
151 gradient_.autoMap(m);
165 refCast<const fixedGradientFaPatchField<Type>>(ptf);
167 gradient_.
rmap(fgptf.gradient_, addr);
174 if (!this->updated())
176 this->updateCoeffs();
181 this->patchInternalField() + gradient_/this->
patch().deltaCoeffs()
206 return gradient()/this->
patch().deltaCoeffs();
230 gradient_.writeEntry(
"gradient",
os);
bool readGradientEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "gradient" entry into corresponding member.
virtual void write(Ostream &os) const
Write.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
commsTypes
Communications types.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets updated() to false.
constexpr char nl
The newline '\n' character (0x0a)
A traits class, which is primarily used for primitives and vector-space.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
This boundary condition supplies a fixed gradient condition, such that the patch values are calculate...
void extrapolateInternal()
Assign the patch field from the internal field.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
friend Ostream & operator(Ostream &, const Field< Type > &)
virtual void write(Ostream &) const
Write.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
fixedGradientFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
Finite area patch class. Used for 2-D non-Euclidian finite area method.
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
virtual void rmap(const faPatchField< Type > &, const labelList &)
Reverse map the given faPatchField onto this faPatchField.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
virtual void autoMap(const faPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const std::string patch
OpenFOAM patch number as a std::string.
A class for managing temporary objects.
A FieldMapper for finite-area patch fields.
virtual void rmap(const faPatchField< Type > &, const labelList &)
Reverse map the given faPatchField onto this faPatchField.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...
static constexpr const zero Zero
Global zero (0)
readOption
Enumeration defining read preferences.