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;
77 const DimensionedField<Type, volMesh>& iF,
78 const dictionary&
dict 81 transformFvPatchField<Type>(
p, iF,
dict),
82 refValue_(
"refValue",
dict,
p.size()),
83 refGrad_(
"refGradient",
dict,
p.size()),
84 valueFraction_(
"valueFraction",
dict,
p.size())
98 refValue_(ptf.refValue_),
99 refGrad_(ptf.refGrad_),
100 valueFraction_(ptf.valueFraction_)
113 refValue_.autoMap(m);
115 valueFraction_.autoMap(m);
129 refCast<const directionMixedFvPatchField<Type>>(ptf);
131 refValue_.
rmap(dmptf.refValue_, addr);
132 refGrad_.rmap(dmptf.refGrad_, addr);
133 valueFraction_.rmap(dmptf.valueFraction_, addr);
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 =
208 refValue_.writeEntry(
"refValue",
os);
209 refGrad_.writeEntry(
"refGradient",
os);
210 valueFraction_.writeEntry(
"valueFraction",
os);
directionMixedFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::buffered)
Evaluate the patch field.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
commsTypes
Communications types.
virtual void write(Ostream &) const
Write.
const word & name() const noexcept
Return the object name.
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)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &) const
Write.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Base class for direction-mixed boundary conditions.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
virtual tmp< Field< Type > > snGrad() const
Return gradient at boundary.
static const Identity< scalar > I
Generic templated field type.
A FieldMapper for finite-volume patch fields.
string evaluate(label fieldWidth, const std::string &s, size_t pos=0, size_t len=std::string::npos)
String evaluation with specified (positive, non-zero) field width.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
virtual bool hasUnmapped() const =0
Any unmapped values?
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
void operator=(const Field< Type > &)
Copy assignment.
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
#define WarningInFunction
Report a warning using Foam::Warning.
bool notNull(const T *ptr) noexcept
True if ptr is not a pointer (of type T) to the nullObject.
PtrList< volScalarField > & Y
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.
::Foam::direction rank(const expressions::valueTypeCode) noexcept
The vector-space rank associated with given valueTypeCode.
A class for managing temporary objects.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
virtual tmp< Field< Type > > snGradTransformDiag() const
Return face-gradient transform diagonal.