109 const int oldTag = UPstream::incrMsgType();
112 mappedFixedValueFvPatchField<Type>::updateCoeffs();
115 const mappedPatchBase& mpp =
116 refCast<const mappedPatchBase>(this->
patch().patch());
117 const fvMesh& nbrMesh = refCast<const fvMesh>(mpp.sampleMesh());
119 Field<Type> nbrIntFld;
123 case mappedPatchBase::NEARESTCELL:
127 << mappedPatchBase::sampleModeNames_
129 mappedPatchBase::NEARESTCELL
131 <<
" mapping mode for patch " << this->
patch().name()
136 case mappedPatchBase::NEARESTPATCHFACE:
137 case mappedPatchBase::NEARESTPATCHFACEAMI:
139 const label samplePatchi = mpp.samplePolyPatch().index();
140 const fvPatchField<Type>& nbrPatchField =
141 this->sampleField().boundaryField()[samplePatchi];
142 nbrIntFld = nbrPatchField.patchInternalField();
143 mpp.distribute(nbrIntFld);
147 case mappedPatchBase::NEARESTFACE:
149 Field<Type> allValues(nbrMesh.nFaces(),
Zero);
151 const FieldType& nbrField = this->sampleField();
153 forAll(nbrField.boundaryField(), patchi)
155 const fvPatchField<Type>& pf = nbrField.boundaryField()[patchi];
156 const Field<Type> pif(pf.patchInternalField());
158 label faceStart = pf.patch().start();
162 allValues[faceStart++] = pif[facei];
166 mpp.distribute(allValues);
167 nbrIntFld.transfer(allValues);
174 <<
"Unknown sampling mode: " << mpp.mode()
179 UPstream::msgType(oldTag);
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...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
This boundary condition maps the value at a set of cells or patch faces back to *this.
Generic GeometricField class.
#define forAll(list, i)
Loop across all elements in list.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
Generic templated field type.
A FieldMapper for finite-volume patch fields.
errorManip< error > abort(error &err)
mappedFixedInternalValueFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
virtual void write(Ostream &os) const
Write.
A List with indirect addressing. Like IndirectList but does not store addressing. ...
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
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.
This boundary condition maps the boundary and internal values of a neighbour patch field to the bound...
static constexpr const zero Zero
Global zero (0)