109 int oldTag = UPstream::msgType();
110 UPstream::msgType() = oldTag + 1;
113 mappedFixedValueFvPatchField<Type>::updateCoeffs();
116 const mappedPatchBase& mpp =
117 refCast<const mappedPatchBase>(this->
patch().patch());
118 const fvMesh& nbrMesh = refCast<const fvMesh>(mpp.sampleMesh());
120 Field<Type> nbrIntFld;
124 case mappedPatchBase::NEARESTCELL:
128 << mappedPatchBase::sampleModeNames_
130 mappedPatchBase::NEARESTCELL
132 <<
" mapping mode for patch " << this->
patch().name()
137 case mappedPatchBase::NEARESTPATCHFACE:
138 case mappedPatchBase::NEARESTPATCHFACEAMI:
140 const label samplePatchi = mpp.samplePolyPatch().index();
141 const fvPatchField<Type>& nbrPatchField =
142 this->sampleField().boundaryField()[samplePatchi];
143 nbrIntFld = nbrPatchField.patchInternalField();
144 mpp.distribute(nbrIntFld);
148 case mappedPatchBase::NEARESTFACE:
150 Field<Type> allValues(nbrMesh.nFaces(),
Zero);
152 const FieldType& nbrField = this->sampleField();
154 forAll(nbrField.boundaryField(), patchi)
156 const fvPatchField<Type>& pf = nbrField.boundaryField()[patchi];
157 const Field<Type> pif(pf.patchInternalField());
159 label faceStart = pf.patch().start();
163 allValues[faceStart++] = pif[facei];
167 mpp.distribute(allValues);
168 nbrIntFld.transfer(allValues);
175 <<
"Unknown sampling mode: " << mpp.mode()
181 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)