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()),
106 refValue_(
p.size(),
Zero),
126 valueFraction_(
p.size()),
127 source_(
p.size(),
Zero)
150 refValue_(ptf.refValue_, mapper),
151 refGrad_(ptf.refGrad_, mapper),
152 valueFraction_(ptf.valueFraction_, mapper),
153 source_(ptf.source_, mapper)
158 <<
"On field " << iF.name() <<
" patch " << p.name()
159 <<
" patchField " << this->type()
160 <<
" : mapper does not map all values." << nl
161 <<
" To avoid this warning fully specify the mapping in derived"
162 <<
" patch fields." << endl;
174 refValue_(ptf.refValue_),
175 refGrad_(ptf.refGrad_),
176 valueFraction_(ptf.valueFraction_),
189 refValue_(ptf.refValue_),
190 refGrad_(ptf.refGrad_),
191 valueFraction_(ptf.valueFraction_),
205 refValue_.autoMap(m);
207 valueFraction_.autoMap(m);
224 refValue_.rmap(mptf.refValue_, addr);
225 refGrad_.rmap(mptf.refGrad_, addr);
226 valueFraction_.rmap(mptf.valueFraction_, addr);
227 source_.rmap(mptf.source_, addr);
234 if (!this->updated())
236 this->updateCoeffs();
239 Field<Type>::operator=
243 this->patchInternalField() + refGrad_/this->patch().deltaCoeffs(),
260 (refValue_ - this->patchInternalField())*this->patch().deltaCoeffs(),
286 refGrad_/this->patch().deltaCoeffs(),
308 this->
patch().deltaCoeffs()*refValue_,
318 refValue_.writeEntry(
"refValue",
os);
319 refGrad_.writeEntry(
"refGradient",
os);
320 valueFraction_.writeEntry(
"valueFraction",
os);
321 source_.writeEntry(
"source",
os);
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
virtual bool hasUnmapped() const =0
Any unmapped values?
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
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,...
const fvPatch & patch() const noexcept
Return the patch.
bool updated() const noexcept
True if the boundary condition has already been updated.
A FieldMapper for finite-volume patch fields.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
virtual void write(Ostream &) const
Write.
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field, sets updated() to false.
fvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition provides a base class for 'mixed' type boundary conditions,...
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
mixedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual void write(Ostream &) const
Write.
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
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 rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
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).
bool notNull(const T *ptr) noexcept
True if ptr is not a pointer (of type T) to the nullObject.
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).