Go to the documentation of this file.
44 if (sampleRegion_.empty())
46 if (!coupleGroup_.valid())
49 <<
"Supply either a regionName or a coupleGroup"
50 <<
" for patch " << patch_.name()
51 <<
" in region " << patch_.boundaryMesh().mesh().name()
56 label samplePatchID = coupleGroup_.findOtherPatchID
62 samplePatch_ = sampleMesh().boundaryMesh()[samplePatchID].name();
70 if (samplePatch_.empty())
72 if (!coupleGroup_.valid())
75 <<
"Supply either a patchName or a coupleGroup"
76 <<
" for patch " << patch_.name()
77 <<
" in region " << patch_.boundaryMesh().mesh().name() <<
nl
82 label samplePatchID = coupleGroup_.findOtherPatchID
88 samplePatch_ = sampleMesh().boundaryMesh()[samplePatchID].name();
96 return coupleGroup_.name();
104 case NEARESTPATCHFACEAMI:
106 return samplePolyPatch().size();
110 return sampleMesh().nCells();
112 case NEARESTPATCHFACE:
114 return samplePolyPatch().size();
116 case NEARESTPATCHPOINT:
118 return samplePolyPatch().nPoints();
150 if (communicator_ == -1)
152 const_cast<label&
>(communicator_) = getWorldCommunicator();
154 return communicator_;
161 if (communicator_ == -1)
163 const_cast<label&
>(communicator_) = getWorldCommunicator();
165 return communicator_;
174 || sampleWorld_.empty()
203 (sameWorld() && sampleMesh().topoChanging())
208 mapPtr_.reset(
nullptr);
227 (sameWorld() && sampleMesh().topoChanging())
230 if (topoChange || forceUpdate)
232 AMIPtr_->upToDate() =
false;
243 return (patch_.boundaryMesh().mesh().name() < sampleRegion());
A class for handling words, derived from Foam::string.
const vectorField & offsets() const noexcept
Offset vectors (from patch faces to destination mesh objects)
const mapDistribute & map() const
Return reference to the parallel distribution map.
const sampleMode mode_
What to sample.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
bool sameWorld() const
Is sample world the local world?
bool topoChanging() const noexcept
Is mesh topology changing.
Mesh consisting of general polyhedral cells.
static const wordList & allWorlds() noexcept
All worlds.
label sampleSize() const
Return size of mapped mesh/patch/boundary.
const polyMesh & mesh() const noexcept
Return the mesh reference.
static label myWorldID()
My worldID.
label getCommunicator() const
Get the communicator (worldComm or world-to-world)
label comm() const
Identical to getCommunicator()
Class containing processor-to-processor mapping information.
sampleMode mode() const noexcept
What to sample.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
bool sameRegion() const noexcept
Cached sampleRegion != mesh.name()
static const word & myWorld()
My world.
bool masterWorld() const
Is my world ordered before the sampleWorld?
errorManip< error > abort(error &err)
const word & coupleGroup() const
PatchGroup (only if NEARESTPATCHFACE)
const word & sampleRegion() const
Region to sample.
const word & sampleWorld() const noexcept
World to sample.
errorManipArg< error, int > exit(error &err, const int errNo=1)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
const AMIPatchToPatchInterpolation & AMI(const bool forceUpdate=false) const
Return reference to the AMI interpolator.
bool owner() const
Is it owner.
sampleMode
Mesh items to sample.
const vector & offset() const noexcept
Offset vector (from patch faces to destination mesh objects)
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE)