Go to the documentation of this file.
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>
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
225 ).boundaryFieldRef()[
patch().index()] == newPhiValues;
230 fixedValueFvPatchVectorField::updateCoeffs();
241 this->writeEntry(
"value",
os);
252 mappedVelocityFluxFixedValueFvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
virtual void write(Ostream &) const
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A class for handling words, derived from Foam::string.
@ NEARESTPATCHFACEAMI
nearest patch face + AMI interpolation
static constexpr const zero Zero
virtual label start() const
@ NEARESTFACE
nearest face
const polyBoundaryMesh & boundaryMesh() const
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
virtual void updateCoeffs()
Field< vector > vectorField
Specialisation of Field<T> for vector.
const polyMesh & sampleMesh() const
Generic templated field type.
tmp< faMatrix< Type > > operator==(const faMatrix< Type > &, const faMatrix< Type > &)
This boundary condition maps the velocity and flux from a neighbour patch to this patch.
void distribute(List< Type > &lst) const
sampleMode mode() const noexcept
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
virtual void write(Ostream &) const
const Type & lookupObject(const word &name, const bool recursive=false) const
label findPatchID(const word &patchName, const bool allowNotFound=true) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
Macros for easy insertion into run-time selection tables.
Mesh data needed to do the Finite Volume discretisation.
errorManip< error > abort(error &err)
errorManipArg< error, int > exit(error &err, const int errNo=1)
GeometricField< vector, fvPatchField, volMesh > volVectorField
fvPatchField< vector > fvPatchVectorField
#define FatalErrorInFunction
mappedVelocityFluxFixedValueFvPatchField(const fvPatch &, const DimensionedField< vector, volMesh > &)
static int & msgType() noexcept
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
@ NEARESTPATCHFACE
nearest face on selected patch
@ NEARESTCELL
nearest cell containing sample
label nFaces() const noexcept
Foam::fvPatchFieldMapper.
const fvPatch & patch() const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
makePatchTypeField(fvPatchScalarField, atmBoundaryLayerInletEpsilonFvPatchScalarField)
Generic GeometricField class.
const Boundary & boundaryField() const
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const word & samplePatch() const