47 const word& cyclicPolyPatchName,
49 const label neighbProcNo
63 const word& cyclicPolyPatchName,
71 "procBoundary.*to.*through" + cyclicPolyPatchName,
87 const int neighbProcNo,
88 const word& referPatchName,
95 newName(referPatchName, myProcNo, neighbProcNo),
105 referPatchName_(referPatchName),
117 const word& patchType
122 tag_(
dict.getOrDefault<int>(
"tag", -1)),
134 referPatchName_(
pp.referPatchName()),
150 referPatchName_(
pp.referPatchName_),
162 const label newStart,
163 const word& referPatchName
167 referPatchName_(referPatchName),
183 referPatchName_(
pp.referPatchName()),
193 if (referPatchID_ == -1)
200 if (referPatchID_ == -1)
203 <<
"Illegal referPatch name " << referPatchName_ <<
nl 204 <<
"Valid patch names: " 210 return referPatchID_;
220 const cyclicPolyPatch& cycPatch = refCast<const cyclicPolyPatch>
227 tag_ = string::hasher()(cycPatch.name()) % 32768u;
231 tag_ = string::hasher()(cycPatch.neighbPatch().name()) % 32768u;
237 <<
"Tag calculated from cyclic patch name " << tag_
238 <<
" is the same as the current message type " 240 <<
"Please set a non-conflicting, unique, tag by hand" 241 <<
" using the 'tag' entry" 246 Pout<<
"processorCyclicPolyPatch " <<
name() <<
" uses tag " << tag_
285 neighbFaceCellCentres()
288 if (isA<cyclicPolyPatch>(
pp))
296 neighbFaceCellCentres(),
308 PstreamBuffers& pBufs,
368 UIPstream fromNeighbour(neighbProcNo(), pBufs);
369 fromNeighbour >> masterPts >> masterFaces;
376 const cyclicPolyPatch& cycPatch =
377 refCast<const cyclicPolyPatch>(referPatch());
382 cycPatch.neighbPatch().initOrder(pBufs, masterPtr());
384 return cycPatch.order(pBufs,
pp,
faceMap, rotation);
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Neighbour processor patch.
const List< face_type > & localFaces() const
Return patch faces addressing into local point list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
const Field< point_type > & localPoints() const
Return pointField of points in patch.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
constexpr char nl
The newline '\n' character (0x0a)
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface...
static word newName(const label myProcNo, const label neighbProcNo)
Return the name of a processorPolyPatch ("procBoundary..") constructed from the pair of processor IDs...
Ostream & endl(Ostream &os)
Add newline and flush stream.
void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
static bool & parRun() noexcept
Test if this a parallel run.
void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
static int & msgType() noexcept
Message tag of standard messages.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not.
Lookup type of boundary radiation properties.
Macros for easy insertion into run-time selection tables.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Neighbour processor patch.
labelList indices(const wordRe &matcher, const bool useGroups=true) const
Return (sorted) patch indices for all matches.
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
Input inter-processor communications stream using MPI send/recv etc. - operating on external buffer...
A list of faces which address into the list of points.
A List obtained as a section of another List.
vectorField pointField
pointField is a vectorField.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
A class for handling words, derived from Foam::string.
virtual label referPatchID() const
The referring patchID. Searches for referPatchName() on the first call.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings...
Ostream & writeEntryIfDifferent(const word &key, const T &value1, const T &value2)
Write a keyword/value entry only when the two values differ.
void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Output inter-processor communications stream using MPI send/recv etc. - operating on external buffer...
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
defineTypeNameAndDebug(combustionModel, 0)
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
Buffers for inter-processor communications streams (UOPstream, UIPstream).
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field...
void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
int neighbProcNo() const noexcept
Return neighbour processor number.
void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
static labelList patchIDs(const word &cyclicPolyPatchName, const polyBoundaryMesh &bm)
Return the indices of a processorCyclicPolyPatchs.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
processorCyclicPolyPatch(const label size, const label start, const label index, const polyBoundaryMesh &bm, const int myProcNo, const int neighbProcNo, const word &referPatchName, const transformType transform=UNKNOWN, const word &patchType=typeName)
Construct from components.
virtual int tag() const
Return message tag to use for communication.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
const cyclicPolyPatch & neighbPatch() const
A patch is a list of labels that address the faces in the global face list.
void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
dimensionSet transform(const dimensionSet &ds)
Return the argument; transformations do not change the dimensions.
static word newName(const word &cyclicPolyPatchName, const label myProcNo, const label neighbProcNo)
Return the name of a processorCyclicPolyPatch constructed from the cyclicPolyPatch name and the pair ...
int myProcNo() const noexcept
Return processor number.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)