56 if (!hasValue || !hasGrad || !hasFrac)
59 <<
"Required entries:";
66 <<
" : missing for patch " <<
p.name()
67 <<
" : in dictionary " <<
dict.relativeName() <<
nl
72 refValue_.assign(*hasValue,
p.size());
73 refGrad_.assign(*hasGrad,
p.size());
74 valueFraction_.assign(*hasFrac,
p.size());
92 valueFraction_(
p.
size())
124 valueFraction_(
p.size())
147 refValue_(ptf.refValue_, mapper),
148 refGrad_(ptf.refGrad_, mapper),
149 valueFraction_(ptf.valueFraction_, mapper)
160 refValue_(ptf.refValue_),
161 refGrad_(ptf.refGrad_),
162 valueFraction_(ptf.valueFraction_)
174 refValue_(ptf.refValue_),
175 refGrad_(ptf.refGrad_),
176 valueFraction_(ptf.valueFraction_)
189 refValue_.autoMap(m);
191 valueFraction_.autoMap(m);
206 refValue_.rmap(mptf.refValue_, addr);
207 refGrad_.rmap(mptf.refGrad_, addr);
208 valueFraction_.rmap(mptf.valueFraction_, addr);
215 if (!this->updated())
217 this->updateCoeffs();
220 Field<Type>::operator=
224 this->patchInternalField() + refGrad_/this->patch().deltaCoeffs(),
264 refGrad_/this->patch().deltaCoeffs(),
286 this->
patch().deltaCoeffs()*refValue_,
296 refValue_.writeEntry(
"refValue",
os);
297 refGrad_.writeEntry(
"refGradient",
os);
298 valueFraction_.writeEntry(
"valueFraction",
os);
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
void autoMap(const FieldMapper &map, const bool applyFlip=true)
Map from self.
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
static bool isReadOptional(readOption opt) noexcept
True if (LAZY_READ) bits are set [same as READ_IF_PRESENT].
readOption
Enumeration defining read preferences.
static bool isAnyRead(readOption opt) noexcept
True if any reading may be required (ie, != NO_READ).
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
commsTypes
Communications types.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool updated() const noexcept
True if the boundary condition has already been updated.
const faPatch & patch() const noexcept
Return the patch.
A FieldMapper for finite-area patch fields.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
faPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
virtual void rmap(const faPatchField< Type > &, const labelList &)
Reverse map the given faPatchField onto this faPatchField.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &os) const
Write.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets updated() to false.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
This boundary condition provides a base class for 'mixed' type boundary conditions,...
virtual void write(Ostream &) const
Write.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
virtual void rmap(const faPatchField< Type > &, const labelList &)
Reverse map the given faPatchField onto this faPatchField.
mixedFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual tmp< Field< Type > > snGrad() const
Return gradient at boundary.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
virtual void autoMap(const faPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
bool readMixedEntries(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "refValue", "refGradient" and "valueFraction" entries into their respective places.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
A traits class, which is primarily used for primitives and vector-space.
A class for managing temporary objects.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
OBJstream os(runTime.globalPath()/outputName)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
List< label > labelList
A List of labels.
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).
errorManipArg< error, int > exit(error &err, const int errNo=1)
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
constexpr char nl
The newline '\n' character (0x0a).