46 fixedValueFvPatchVectorField(
p, iF),
60 fixedValueFvPatchVectorField(ptf,
p, iF, mapper),
61 phiName_(ptf.phiName_)
63 if (!isA<mappedPatchBase>(this->
patch().
patch()))
66 <<
"Patch type '" << p.type()
67 <<
"' not type '" << mappedPatchBase::typeName <<
"'" 68 <<
" for patch " <<
p.name()
69 <<
" of field " << internalField().name()
70 <<
" in file " << internalField().objectPath()
80 const DimensionedField<vector, volMesh>& iF,
81 const dictionary&
dict 84 fixedValueFvPatchVectorField(
p, iF,
dict),
85 phiName_(
dict.getOrDefault<word>(
"phi",
"phi"))
87 if (!isA<mappedPatchBase>(this->
patch().
patch()))
90 <<
"Patch type '" << p.type()
91 <<
"' not type '" << mappedPatchBase::typeName <<
"'" 92 <<
" for patch " <<
p.name()
93 <<
" of field " << internalField().name()
94 <<
" in file " << internalField().objectPath()
98 const mappedPatchBase& mpp = refCast<const mappedPatchBase>
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()
119 const mappedVelocityFluxFixedValueFvPatchField& ptf
122 fixedValueFvPatchVectorField(ptf),
123 phiName_(ptf.phiName_)
134 fixedValueFvPatchVectorField(ptf, iF),
135 phiName_(ptf.phiName_)
154 const mappedPatchBase& mpp = refCast<const mappedPatchBase>
158 const fvMesh& nbrMesh = refCast<const fvMesh>(mpp.sampleMesh());
159 const word& fieldName = internalField().name();
176 forAll(UField.boundaryField(), patchi)
179 const scalarField& phipf = phiField.boundaryField()[patchi];
181 label faceStart = Upf.patch().start();
185 allUValues[faceStart + facei] = Upf[facei];
186 allPhiValues[faceStart + facei] = phipf[facei];
190 mpp.distribute(allUValues);
191 newUValues.transfer(allUValues);
193 mpp.distribute(allPhiValues);
194 newPhiValues.transfer(allPhiValues);
201 const label nbrPatchID =
202 nbrMesh.boundaryMesh().findPatchID(mpp.samplePatch());
204 newUValues = UField.boundaryField()[nbrPatchID];
205 mpp.distribute(newUValues);
207 newPhiValues = phiField.boundaryField()[nbrPatchID];
208 mpp.distribute(newPhiValues);
215 <<
"patch can only be used in NEARESTPATCHFACE, " 216 <<
"NEARESTPATCHFACEAMI or NEARESTFACE mode" <<
nl 230 fixedValueFvPatchVectorField::updateCoeffs();
252 mappedVelocityFluxFixedValueFvPatchField
nearest face on selected patch
fvPatchField< vector > fvPatchVectorField
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
mappedVelocityFluxFixedValueFvPatchField(const fvPatch &, const DimensionedField< vector, volMesh > &)
Construct from patch and internal field.
This boundary condition maps the velocity and flux from a neighbour patch to this patch...
constexpr char nl
The newline '\n' character (0x0a)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
static int & msgType() noexcept
Message tag of standard messages.
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
virtual void write(Ostream &) const
Write.
GeometricField< vector, fvPatchField, volMesh > volVectorField
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
nearest patch face + AMI interpolation
virtual void write(Ostream &) const
Write.
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A FieldMapper for finite-volume patch fields.
errorManip< error > abort(error &err)
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
Us boundaryFieldRef().evaluateCoupled< coupledFaPatch >()
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
nearest cell containing sample
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.
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Field< vector > vectorField
Specialisation of Field<T> for vector.
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
static constexpr const zero Zero
Global zero (0)