35 const label regionPatchi,
36 const label nbrPatchi,
41 int oldTag = UPstream::msgType();
42 UPstream::msgType() = oldTag + 1;
45 interRegionAMI(nbrRegion, regionPatchi, nbrPatchi, flip);
49 UPstream::msgType() = oldTag;
60 const word& fieldName,
61 const label regionPatchi,
69 if (nbrRegionMesh.
foundObject<fieldType>(fieldName))
71 const label nbrPatchi = nbrCoupledPatchID(nbrRegion, regionPatchi);
73 int oldTag = UPstream::msgType();
74 UPstream::msgType() = oldTag + 1;
77 interRegionAMI(nbrRegion, regionPatchi, nbrPatchi, flip);
79 const fieldType& nbrField =
82 const Field<Type>& nbrFieldp = nbrField.boundaryField()[nbrPatchi];
86 UPstream::msgType() = oldTag;
92 const polyPatch&
p = regionMesh().boundaryMesh()[regionPatchi];
112 const word& fieldName,
113 const label regionPatchi,
121 if (nbrRegionMesh.
foundObject<fieldType>(fieldName))
123 const label nbrPatchi = nbrCoupledPatchID(nbrRegion, regionPatchi);
125 int oldTag = UPstream::msgType();
126 UPstream::msgType() = oldTag + 1;
129 interRegionAMI(nbrRegion, regionPatchi, nbrPatchi, flip);
131 const fieldType& nbrField =
135 nbrField.boundaryField()[nbrPatchi];
142 UPstream::msgType() = oldTag;
148 const polyPatch&
p = regionMesh().boundaryMesh()[regionPatchi];
166 const label regionPatchi,
170 forAll(intCoupledPatchIDs_, i)
172 if (intCoupledPatchIDs_[i] == regionPatchi)
175 refCast<const mappedPatchBase>
177 regionMesh().boundaryMesh()[regionPatchi]
185 <<
"Region patch ID " << regionPatchi <<
" not found in region mesh" 190 template<
class Type,
class CombineOp>
193 const label regionPatchi,
198 forAll(intCoupledPatchIDs_, i)
200 if (intCoupledPatchIDs_[i] == regionPatchi)
203 refCast<const mappedPatchBase>
205 regionMesh().boundaryMesh()[regionPatchi]
213 <<
"Region patch ID " << regionPatchi <<
" not found in region mesh" 221 const label regionPatchi,
225 forAll(intCoupledPatchIDs_, i)
227 if (intCoupledPatchIDs_[i] == regionPatchi)
230 refCast<const mappedPatchBase>
232 regionMesh().boundaryMesh()[regionPatchi]
240 <<
"Region patch ID " << regionPatchi <<
" not found in region mesh" 249 const label regionPatchi,
254 const mappedPatchBase& mpb = refCast<const mappedPatchBase>(regionPatch);
270 forAll(intCoupledPatchIDs_, i)
272 const label regionPatchi = intCoupledPatchIDs_[i];
273 const label primaryPatchi = primaryPatchIDs_[i];
275 toRegion(rf, regionPatchi, pBf[primaryPatchi]);
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const polyBoundaryMesh & boundaryMesh() const
Return boundaryMesh reference.
bool foundObject(const word &name) const
Is the named Type found?
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Generic GeometricField class.
const Type & lookupObject(const word &name) const
Lookup and return the object of the given Type.
void toPrimary(const label regionPatchi, List< Type > ®ionField) const
Convert a local region field to the primary region.
const labelUList & faceCells() const
Return face-cell addressing.
Pre-declare SubField and related Field type.
A class for handling words, derived from string.
tmp< Field< Type > > mapRegionPatchInternalField(const regionModel &nbrRegion, const word &fieldName, const label regionPatchi, const bool flip=false) const
Map patch internal field from another region model to local.
const fvMesh & regionMesh() const
Return the region mesh database.
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
errorManip< error > abort(error &err)
void interpolateToSource(const UList< Type > &fld, const CombineOp &cop, List< Type > &result, const UList< Type > &defaultValues=UList< Type >::null()) const
Interpolate from target to source with supplied op.
Functionality for sampling fields using mappedPatchBase. Every call to mappedField() returns a sample...
void distribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
Mesh data needed to do the Finite Volume discretisation.
A List with indirect addressing.
tmp< Foam::Field< Type > > mapRegionPatchField(const regionModel &nbrRegion, const label regionPatchi, const label nbrPatchi, const Field< Type > &nbrField, const bool flip=false) const
Map patch field from another region model to local patch.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
void toRegion(const label regionPatchi, List< Type > &primaryFieldField) const
Convert a primary region field to the local region.
Base class for region models.
void reverseDistribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
A class for managing temporary objects.
A patch is a list of labels that address the faces in the global face list.