43 valueFraction_(
p.
size())
57 refValue_(ptf.refValue_, mapper),
58 refGrad_(ptf.refGrad_, mapper),
59 valueFraction_(ptf.valueFraction_, mapper)
64 <<
"On field " << iF.name() <<
" patch " << p.name()
65 <<
" patchField " << this->type()
66 <<
" : mapper does not map all values." << nl
67 <<
" To avoid this warning fully specify the mapping in derived"
68 <<
" patch fields." << endl;
82 refValue_(
"refValue",
dict,
p.size()),
83 refGrad_(
"refGradient",
dict,
p.size()),
98 refValue_(ptf.refValue_),
99 refGrad_(ptf.refGrad_),
100 valueFraction_(ptf.valueFraction_)
113 refValue_.autoMap(m);
115 valueFraction_.autoMap(m);
131 refValue_.rmap(dmptf.refValue_, addr);
132 refGrad_.rmap(dmptf.refGrad_, addr);
133 valueFraction_.rmap(dmptf.valueFraction_, addr);
145 tmp<Field<Type>> gradValue = pif + refGrad_/this->patch().deltaCoeffs();
151 (normalValue + transformGradValue - pif)*
152 this->
patch().deltaCoeffs();
159 if (!this->updated())
161 this->updateCoeffs();
164 tmp<Field<Type>> normalValue =
transform(valueFraction_, refValue_);
166 tmp<Field<Type>> gradValue =
167 this->patchInternalField() + refGrad_/this->patch().deltaCoeffs();
169 tmp<Field<Type>> transformGradValue =
194 valueFraction_.cbegin(),
195 valueFraction_.cend(),
202 sqrt(mag(t.xx())), sqrt(mag(t.yy())), sqrt(mag(t.zz()))
216 refValue_.writeEntry(
"refValue",
os);
217 refGrad_.writeEntry(
"refGradient",
os);
218 valueFraction_.writeEntry(
"valueFraction",
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...
void operator=(const Field< Type > &)
Copy assignment.
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,...
Base class for direction-mixed boundary conditions.
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 > > snGrad() const
Return gradient at boundary.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual tmp< Field< Type > > snGradTransformDiag() const
Return face-gradient transform diagonal.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
directionMixedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
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.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
A traits class, which is primarily used for primitives and vector-space.
A class for managing temporary objects.
OBJstream os(runTime.globalPath()/outputName)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
List< label > labelList
A List of labels.
tmp< Field< Type1 > > transformFieldMask(const Field< Type2 > &fld)
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
static const Identity< scalar > I
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Field< vector > vectorField
Specialisation of Field<T> for vector.
bool notNull(const T *ptr) noexcept
True if ptr is not a pointer (of type T) to the nullObject.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.