32 const regionModel& nbrRegion,
33 const label regionPatchi,
34 const label nbrPatchi,
57 const word& fieldName,
58 const label regionPatchi,
66 if (nbrRegionMesh.
foundObject<fieldType>(fieldName))
68 const label nbrPatchi = nbrCoupledPatchID(nbrRegion, regionPatchi);
73 interRegionAMI(nbrRegion, regionPatchi, nbrPatchi, flip);
75 const fieldType& nbrField =
78 const Field<Type>& nbrFieldp = nbrField.boundaryField()[nbrPatchi];
88 const polyPatch&
p = regionMesh().boundaryMesh()[regionPatchi];
99 const regionModel& nbrRegion,
100 const word& fieldName,
101 const label regionPatchi,
107 const fvMesh& nbrRegionMesh = nbrRegion.regionMesh();
109 if (nbrRegionMesh.
foundObject<fieldType>(fieldName))
111 const label nbrPatchi = nbrCoupledPatchID(nbrRegion, regionPatchi);
116 interRegionAMI(nbrRegion, regionPatchi, nbrPatchi, flip);
118 const fieldType& nbrField =
122 nbrField.boundaryField()[nbrPatchi];
135 const polyPatch&
p = regionMesh().boundaryMesh()[regionPatchi];
145 const label regionPatchi,
149 forAll(intCoupledPatchIDs_, i)
151 if (intCoupledPatchIDs_[i] == regionPatchi)
164 <<
"Region patch ID " << regionPatchi <<
" not found in region mesh"
172 const label regionPatchi,
176 forAll(intCoupledPatchIDs_, i)
178 if (intCoupledPatchIDs_[i] == regionPatchi)
191 <<
"Region patch ID " << regionPatchi <<
" not found in region mesh"
196template<
class Type,
class CombineOp>
199 const label regionPatchi,
204 forAll(intCoupledPatchIDs_, i)
206 if (intCoupledPatchIDs_[i] == regionPatchi)
219 <<
"Region patch ID " << regionPatchi <<
" not found in region mesh"
224template<
class Type,
class CombineOp>
227 const label regionPatchi,
232 forAll(intCoupledPatchIDs_, i)
234 if (intCoupledPatchIDs_[i] == regionPatchi)
247 <<
"Region patch ID " << regionPatchi <<
" not found in region mesh"
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 to combine existing value with remote value and we...
Generic templated field type that is much like a Foam::List except that it is expected to hold numeri...
Generic GeometricField class.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static int & msgType() noexcept
Message tag of standard messages.
static int incrMsgType(int val=1) noexcept
Increment the message tag for standard messages.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
Mesh data needed to do the Finite Volume discretisation.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Determines a mapping between patch face centres and mesh cell or face centres and processors they're ...
void reverseDistribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
void distribute(List< Type > &lst) const
Wrapper around map/interpolate data distribution.
bool foundObject(const word &name, const bool recursive=false) const
Contains the named Type?
const Type & lookupObject(const word &name, const bool recursive=false) const
Lookup and return const reference to the object of the given Type. Fatal if not found or the wrong ty...
A patch is a list of labels that address the faces in the global face list.
Base class for region models.
void toRegion(const label regionPatchi, List< Type > &primaryFieldField) const
Convert a primary region field to the local region.
label nbrCoupledPatchID(const regionModel &nbrRegion, const label regionPatchi) const
Return the coupled patch ID paired with coupled patch.
virtual const AMIPatchToPatchInterpolation & interRegionAMI(const regionModel &nbrRegion, const label regionPatchi, const label nbrPatchi, const bool flip) const
Create or return a new inter-region AMI object.
const fvMesh & regionMesh() const
Return the region mesh database.
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.
void toPrimary(const label regionPatchi, List< Type > ®ionField) const
Convert a local region field to the primary region.
labelList intCoupledPatchIDs_
List of patch IDs internally coupled with the primary region.
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.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
AMIInterpolation AMIPatchToPatchInterpolation
Patch-to-patch interpolation == Foam::AMIInterpolation.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0).
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define forAll(list, i)
Loop across all elements in list.