42 valueFraction_(
p.size()),
43 source_(
p.size(), Zero)
56 refValue_(
"refValue",
dict,
p.size()),
57 refGrad_(
"refGradient",
dict,
p.size()),
58 valueFraction_(
"valueFraction",
dict,
p.size()),
59 source_(
p.size(),
Zero)
76 refValue_(ptf.refValue_, mapper),
77 refGrad_(ptf.refGrad_, mapper),
78 valueFraction_(ptf.valueFraction_, mapper),
79 source_(ptf.source_, mapper)
84 <<
"On field " << iF.
name() <<
" patch " <<
p.
name()
85 <<
" patchField " << this->
type()
86 <<
" : mapper does not map all values." <<
nl
87 <<
" To avoid this warning fully specify the mapping in derived"
88 <<
" patch fields." <<
endl;
100 refValue_(ptf.refValue_),
101 refGrad_(ptf.refGrad_),
102 valueFraction_(ptf.valueFraction_),
115 refValue_(ptf.refValue_),
116 refGrad_(ptf.refGrad_),
117 valueFraction_(ptf.valueFraction_),
131 refValue_.autoMap(m);
133 valueFraction_.autoMap(m);
148 refCast<const mixedFvPatchField<Type>>(ptf);
150 refValue_.
rmap(mptf.refValue_, addr);
151 refGrad_.rmap(mptf.refGrad_, addr);
152 valueFraction_.rmap(mptf.valueFraction_, addr);
153 source_.rmap(mptf.source_, addr);
161 if (!this->updated())
163 this->updateCoeffs();
168 valueFraction_*refValue_
169 + (1.0 - valueFraction_)
171 this->patchInternalField()
172 + refGrad_/this->patch().deltaCoeffs()
186 *(refValue_ - this->patchInternalField())
187 *this->patch().deltaCoeffs()
188 + (1.0 - valueFraction_)*refGrad_;
211 valueFraction_*refValue_
212 + (1.0 - valueFraction_)*refGrad_/this->patch().deltaCoeffs();
229 valueFraction_*this->patch().deltaCoeffs()*refValue_
230 + (1.0 - valueFraction_)*refGrad_;
238 refValue_.writeEntry(
"refValue",
os);
239 refGrad_.writeEntry(
"refGradient",
os);
240 valueFraction_.writeEntry(
"valueFraction",
os);
241 source_.writeEntry(
"source",
os);
242 this->writeEntry(
"value",
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.
void evaluate()
Evaluate boundary conditions.
const word & name() const noexcept
Return the object name.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
commsTypes
Types of communications.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write()
Write the output fields.
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 rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
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.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field.
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.
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
A class for managing temporary objects.
OBJstream os(runTime.globalPath()/outputName)
#define WarningInFunction
Report a warning using Foam::Warning.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool notNull(const T *ptr)
True if ptr is not a pointer (of type T) to the nullObject.
static constexpr const zero Zero
Global zero (0)
constexpr char nl
The newline '\n' character (0x0a)