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
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
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)
154 return communicator_;
161 if (communicator_ == -1)
165 return communicator_;
202 if (!updateSampleMeshTimePtr_)
207 const auto&
mesh = patch_.boundaryMesh().mesh();
209 updateSampleMeshTimePtr_.reset
215 "updateSampleMeshTime",
216 mesh.pointsInstance(),
226 return updateSampleMeshTimePtr_();
233 if (!updateMeshTimePtr_)
235 const auto&
mesh = patch_.boundaryMesh().mesh();
237 updateMeshTimePtr_.reset
244 mesh.pointsInstance(),
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());
@ NO_REGISTER
Do not request registration (bool: false).
@ NO_READ
Nothing to be read.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
label find(const T &val) const
Find index of the first occurrence of the value.
static label myWorldID()
My worldID.
static const wordList & allWorlds() noexcept
All worlds.
static const word & myWorld()
My world.
Class containing processor-to-processor mapping information.
label communicator_
Communicator.
label getWorldCommunicator() const
Get the communicator for the world-world connection.
const mapDistribute & map() const
Return reference to the parallel distribution map.
bool sameRegion() const noexcept
Cached sampleRegion != mesh.name().
const vector & offset() const noexcept
Offset vector (from patch faces to destination mesh objects).
uniformDimensionedScalarField & updateSampleMeshTime() const
Local mesh update time.
bool owner() const
Is it owner.
const polyPatch & patch_
Patch to sample.
vectorField offsets_
Offset vector (nonuniform).
const vectorField & offsets() const noexcept
Offset vectors (from patch faces to destination mesh objects).
uniformDimensionedScalarField & updateMeshTime() const
Sample mesh upate time.
sampleMode
Mesh items to sample.
@ NEARESTPATCHPOINT
nearest point on selected patch
@ NEARESTCELL
nearest cell containing sample
@ NEARESTPATCHFACE
nearest face on selected patch
@ NEARESTPATCHFACEAMI
nearest patch face + AMI interpolation
@ NEARESTFACE
nearest face
void calcAMI() const
Calculate AMI interpolator.
const sampleMode mode_
What to sample.
const polyMesh & sampleMesh() const
Get the region mesh.
bool sameRegion_
Same region.
word sampleRegion_
Region to sample.
label sampleSize() const
Return size of mapped mesh/patch/boundary.
label comm() const
Identical to getCommunicator().
word samplePatch_
Patch (if in sampleMode NEARESTPATCH*).
autoPtr< mapDistribute > mapPtr_
Communication schedule:
const polyPatch & samplePolyPatch() const
Get the patch on the region.
autoPtr< uniformDimensionedScalarField > updateSampleMeshTimePtr_
Sample mesh update time.
bool masterWorld() const
Is my world ordered before the sampleWorld?
label getCommunicator() const
Get the communicator (worldComm or world-to-world).
const word & sampleWorld() const noexcept
World to sample.
const AMIPatchToPatchInterpolation & AMI(const bool forceUpdate=false) const
Return reference to the AMI interpolator.
const word & samplePatch() const
Patch (only if NEARESTPATCHFACE).
void calcMapping() const
Calculate mapping.
sampleMode mode() const noexcept
What to sample.
const coupleGroupIdentifier coupleGroup_
PatchGroup (if in sampleMode NEARESTPATCH*).
const word & sampleRegion() const
Region to sample.
vector offset_
Offset vector (uniform).
autoPtr< uniformDimensionedScalarField > updateMeshTimePtr_
Local mesh update time.
bool sameWorld() const
Is sample world the local world?
autoPtr< AMIPatchToPatchInterpolation > AMIPtr_
Pointer to AMI interpolator.
const word & coupleGroup() const
PatchGroup (only if NEARESTPATCHFACE).
word sampleWorld_
World to sample.
Mesh consisting of general polyhedral cells.
label nBoundaryFaces() const noexcept
Number of boundary faces (== nFaces - nInternalFaces).
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
UniformDimensionedField< scalar > uniformDimensionedScalarField
AMIInterpolation AMIPatchToPatchInterpolation
Patch-to-patch interpolation == Foam::AMIInterpolation.
errorManip< error > abort(error &err)
Field< vector > vectorField
Specialisation of Field<T> for vector.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a).