44 if (sampleRegion_.empty())
46 if (!coupleGroup_.good())
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_.good())
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();
122 const polyMesh&
mesh = sampleMesh();
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()
202 if (!updateSampleMeshTimePtr_)
209 updateSampleMeshTimePtr_.
reset 215 "updateSampleMeshTime",
226 return updateSampleMeshTimePtr_();
233 if (!updateMeshTimePtr_)
237 updateMeshTimePtr_.
reset 254 return updateMeshTimePtr_();
262 mapPtr_.reset(
nullptr);
266 AMIPtr_->upToDate(
false);
286 mapPtr_.
reset(
nullptr);
287 AMIPtr_->upToDate(
false);
292 AMIPtr_->upToDate(
false);
303 return (patch_.boundaryMesh().mesh().name() < sampleRegion());
static const word & myWorld()
My world.
const vector & offset() const noexcept
Offset vector (from patch faces to destination mesh objects)
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...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
bool empty() const noexcept
True if List is empty (ie, size() is zero)
uniformDimensionedScalarField & updateMeshTime() const
Sample mesh upate time.
Ignore writing from objectRegistry::writeObject()
uniformDimensionedScalarField & updateSampleMeshTime() const
Local mesh update time.
const mapDistribute & map() const
Return reference to the parallel distribution map.
UniformDimensionedField< scalar > uniformDimensionedScalarField
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
bool sameWorld() const
Is sample world the local world?
const fileName & pointsInstance() const
Return the current instance directory for points.
const polyMesh & mesh() const noexcept
Return the mesh reference.
bool masterWorld() const
Is my world ordered before the sampleWorld?
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
A class for handling words, derived from Foam::string.
const AMIPatchToPatchInterpolation & AMI(const bool forceUpdate=false) const
Return reference to the AMI interpolator.
errorManip< error > abort(error &err)
label find(const T &val) const
Find index of the first occurrence of the value.
void reset(const label nPoints, const label nInternalFaces, const label nFaces, const label nCells)
Reset this primitiveMesh given the primitive array sizes.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
label sampleSize() const
Return size of mapped mesh/patch/boundary.
label comm() const
Identical to getCommunicator()
label getCommunicator() const
Get the communicator (worldComm or world-to-world)
sampleMode mode() const noexcept
What to sample.
bool owner() const
Is it owner.
Class containing processor-to-processor mapping information.
bool sameRegion() const noexcept
Cached sampleRegion != mesh.name()
const word & coupleGroup() const
PatchGroup (only if NEARESTPATCHFACE)
sampleMode
Mesh items to sample.
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
const word & sampleWorld() const noexcept
World to sample.
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE)
static const wordList & allWorlds() noexcept
All worlds.
const word & sampleRegion() const
Region to sample.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces)
Defines the attributes of an object for which implicit objectRegistry management is supported...
Do not request registration (bool: false)
void reset(autoPtr< mapDistribute > &&srcToTgtMap, autoPtr< mapDistribute > &&tgtToSrcMap, labelListList &&srcAddress, scalarListList &&srcWeights, labelListList &&tgtAddress, scalarListList &&tgtWeights, const label singlePatchProc)
Set the maps, addresses and weights from an external source.
const vectorField & offsets() const noexcept
Offset vectors (from patch faces to destination mesh objects)
static label myWorldID()
My worldID.
const sampleMode mode_
What to sample.