39Foam::mappedVelocityFluxFixedValueFvPatchField::
40mappedVelocityFluxFixedValueFvPatchField
46 fixedValueFvPatchVectorField(
p, iF),
51Foam::mappedVelocityFluxFixedValueFvPatchField::
52mappedVelocityFluxFixedValueFvPatchField
60 fixedValueFvPatchVectorField(ptf,
p, iF, mapper),
61 phiName_(ptf.phiName_)
63 if (!isA<mappedPatchBase>(this->patch().patch()))
66 <<
"Patch type '" <<
p.type()
68 <<
" for patch " <<
p.
name()
69 <<
" of field " << internalField().name()
70 <<
" in file " << internalField().objectPath()
76Foam::mappedVelocityFluxFixedValueFvPatchField::
77mappedVelocityFluxFixedValueFvPatchField
84 fixedValueFvPatchVectorField(
p, iF,
dict),
85 phiName_(
dict.getOrDefault<
word>(
"phi",
"phi"))
87 if (!isA<mappedPatchBase>(this->patch().patch()))
90 <<
"Patch type '" <<
p.type()
92 <<
" for patch " <<
p.
name()
93 <<
" of field " << internalField().name()
94 <<
" in file " << internalField().objectPath()
100 this->patch().patch(),
106 <<
"Patch " <<
p.
name()
107 <<
" of type '" <<
p.type()
108 <<
"' can not be used in 'nearestCell' mode"
109 <<
" of field " << internalField().
name()
110 <<
" in file " << internalField().objectPath()
116Foam::mappedVelocityFluxFixedValueFvPatchField::
117mappedVelocityFluxFixedValueFvPatchField
122 fixedValueFvPatchVectorField(ptf),
123 phiName_(ptf.phiName_)
127Foam::mappedVelocityFluxFixedValueFvPatchField::
128mappedVelocityFluxFixedValueFvPatchField
134 fixedValueFvPatchVectorField(ptf, iF),
135 phiName_(ptf.phiName_)
159 const word& fieldName = internalField().name();
179 const scalarField& phipf = phiField.boundaryField()[patchi];
185 allUValues[faceStart + facei] = Upf[facei];
186 allPhiValues[faceStart + facei] = phipf[facei];
191 newUValues.transfer(allUValues);
194 newPhiValues.
transfer(allPhiValues);
201 const label nbrPatchID =
207 newPhiValues = phiField.boundaryField()[nbrPatchID];
215 <<
"patch can only be used in NEARESTPATCHFACE, "
216 <<
"NEARESTPATCHFACEAMI or NEARESTFACE mode" <<
nl
225 ).boundaryFieldRef()[patch().index()] == newPhiValues;
230 fixedValueFvPatchVectorField::updateCoeffs();
241 this->writeEntry(
"value",
os);
Macros for easy insertion into run-time selection tables.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const Boundary & boundaryField() const
Return const-reference to the boundary field.
const word & name() const noexcept
Return the object name.
void transfer(List< T > &list)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
static int & msgType() noexcept
Message tag of standard messages.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool write()
Write the output fields.
Mesh data needed to do the Finite Volume discretisation.
A FieldMapper for finite-volume patch fields.
const fvPatch & patch() const
Return patch.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual label start() const
Return start label of this patch in the polyMesh face list.
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
@ NEARESTCELL
nearest cell containing sample
@ NEARESTPATCHFACE
nearest face on selected patch
@ NEARESTPATCHFACEAMI
nearest patch face + AMI interpolation
@ NEARESTFACE
nearest face
const polyMesh & sampleMesh() const
Get the region mesh.
void distribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE)
sampleMode mode() const noexcept
What to sample.
This boundary condition maps the velocity and flux from a neighbour patch to this patch.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
const Type & lookupObject(const word &name, const bool recursive=false) const
label findPatchID(const word &patchName, const bool allowNotFound=true) const
Find patch index given a name, return -1 if not found.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
label nFaces() const noexcept
Number of mesh faces.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
#define makePatchTypeField(PatchTypeField, typePatchTypeField)
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0)
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
#define forAll(list, i)
Loop across all elements in list.
Rectangular patch, selectable as patch.
static const char *const typeName
The type name used in ensight case files.