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),
117 const word& patchType
122 tag_(
dict.getOrDefault<int>(
"tag", -1)),
150 referPatchName_(
pp.referPatchName_),
162 const label newStart,
163 const word& 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_;
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()
296 neighbFaceCellCentres(),
350 toNeighbour <<
pp.localPoints()
368 UIPstream fromNeighbour(neighbProcNo(), pBufs);
369 fromNeighbour >> masterPts >> masterFaces;
376 const cyclicPolyPatch& cycPatch =
382 cycPatch.neighbPatch().initOrder(pBufs, masterPtr());
384 return cycPatch.order(pBufs,
pp,
faceMap, rotation);
391 os.writeEntry(
"referPatch", referPatchName_);
392 os.writeEntryIfDifferent<label>(
"tag", -1, tag_);
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Buffers for inter-processor communications streams (UOPstream, UIPstream).
A non-owning sub-view of a List (allocated or unallocated storage).
Input inter-processor communications stream using MPI send/recv etc. - operating on external buffer.
Output inter-processor communications stream using MPI send/recv etc. - operating on external buffer.
static bool parRun(const bool on) noexcept
Set as parallel run on/off.
static int & msgType() noexcept
Message tag of standard messages.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
void reset(T *p=nullptr) noexcept
Delete managed object and set to new given pointer.
Addressing for all faces on surface of mesh. Can either be read from polyMesh or from triSurface....
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
const cyclicPolyPatch & neighbPatch() const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
label index() const noexcept
The index of this patch in the boundaryMesh.
const word & name() const noexcept
The patch name.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
labelList indices(const wordRe &matcher, const bool useGroups=true) const
The (sorted) patch indices for all matches, optionally matching patch groups.
A patch is a list of labels that address the faces in the global face list.
const vectorField::subField faceAreas() const
Return face normals.
const vectorField::subField faceCentres() const
Return face centres.
label start() const noexcept
Return start label of this patch in the polyMesh face list.
tmp< vectorField > faceCellCentres() const
Return face cell centres.
Neighbour processor patch.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual transformType transform() const
Type of transform.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
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 ...
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 bool owner() const
Does this side own the patch ?
static labelList patchIDs(const word &cyclicPolyPatchName, const polyBoundaryMesh &bm)
Return the indices of a processorCyclicPolyPatchs.
const coupledPolyPatch & referPatch() const
The referred coupled patch.
void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual label referPatchID() const
The referring patchID. Searches for referPatchName() on the first call.
void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not.
virtual int tag() const
Return message tag to use for communication.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
const word & referPatchName() const
Return name of originating cyclicPolyPatch patch.
Neighbour processor patch.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
int neighbProcNo() const noexcept
Return neighbour processor number.
void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
const vectorField & neighbFaceAreas() const noexcept
Return processor-neighbour patch face areas.
static word newName(const label myProcNo, const label neighbProcNo)
Return the name of a processorPolyPatch ("procBoundary..") constructed from the pair of processor IDs...
processorPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const int myProcNo, const int neighbProcNo, const transformType transform=UNKNOWN, const word &patchType=typeName)
Construct from components with specified name.
int myProcNo() const noexcept
Return processor number.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
const vectorField & neighbFaceCellCentres() const noexcept
Return processor-neighbour patch neighbour cell centres.
const vectorField & neighbFaceCentres() const noexcept
Return processor-neighbour patch face centres.
Lookup type of boundary radiation properties.
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
@ REGEX
Regular expression.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
Namespace for handling debugging switches.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
List< label > labelList
A List of labels.
refinementData transform(const tensor &, const refinementData val)
No-op rotational transform for base types.
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field.
List< face > faceList
List of faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type * isA(const U &obj)
Attempt dynamic_cast to Type.
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...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
vectorField pointField
pointField is a vectorField.
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
constexpr char nl
The newline '\n' character (0x0a).
Hashing functor for string and derived string classes.