49 #ifndef Foam_cyclicPolyPatch_H 50 #define Foam_cyclicPolyPatch_H 74 mutable word neighbPatchName_;
80 mutable label neighbPatchID_;
88 point rotationCentre_;
99 mutable std::unique_ptr<edgeList> coupledPointsPtr_;
104 mutable std::unique_ptr<edgeList> coupledEdgesPtr_;
131 void getCentresAndAnchors
212 const word& patchType,
238 const word& patchType
260 const label newStart,
306 virtual autoPtr<polyPatch>
clone 314 return autoPtr<polyPatch>
336 newFaces = this->size();
337 newProcFaces =
neighbPatch().size() - this->size();
376 virtual bool owner()
const 389 return refCast<const cyclicPolyPatch>(
pp);
418 return neighbStart+
offset;
423 <<
"Face " << facei <<
" not in patch " <<
name()
432 return rotationAxis_;
438 return rotationCentre_;
444 return separationVector_;
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
Neighbour processor patch.
const vector & separationVector() const noexcept
Translation vector for translational cyclics.
const vector & rotationAxis() const noexcept
Axis of rotation for rotational cyclics.
friend class polyBoundaryMesh
errorManipArg< error, int > exit(error &err, const int errNo=1)
const edgeList & coupledPoints() const
Return connected points (from patch local to neighbour patch local)
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...
label start() const noexcept
Return start label of this patch in the polyMesh face list.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< edge > edgeList
List of edge.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
virtual const labelUList & nbrCells() const
Return nbrCells.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
cyclicPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const transformType transform=UNKNOWN)
Construct from components.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
Smooth ATC in cells next to a set of patches supplied by type.
const edgeList & coupledEdges() const
Return connected edges (from patch local to neighbour patch local).
List< labelList > labelListList
List of labelList.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
UList< label > labelUList
A UList of labels.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
#define forAll(list, i)
Loop across all elements in list.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
A list of faces which address into the list of points.
virtual bool owner() const
Does this side own the patch ?
void setSize(const label n)
Alias for resize()
TypeName("cyclic")
Runtime type information.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundaryMesh reference.
const labelUList & faceCells() const
Return face-cell addressing.
virtual bool masterImplicit() const
Return implicit master.
A class for handling words, derived from Foam::string.
label offset() const noexcept
The offset where this patch starts in the boundary face list.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
polyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
Encapsulates using "patchGroups" to specify coupled patch.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
const word & name() const noexcept
The patch name.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
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...
virtual bool neighbour() const
Does the coupled side own the patch ?
virtual void transformPosition(pointField &l) const
Transform a patch-based position from other side to this side.
virtual ~cyclicPolyPatch()
Destructor.
vector point
Point is a vector.
virtual label neighbPatchID() const
Neighbour patchID.
const word & neighbPatchName() const
Neighbour patch name.
virtual transformType transform() const
Type of transform.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not.
label index() const noexcept
The index of this patch in the boundaryMesh.
virtual label neighbPolyPatchID() const
Return nbr patchID.
List< label > labelList
A List of labels.
label transformGlobalFace(const label facei) const
const cyclicPolyPatch & neighbPatch() const
virtual refPtr< labelListList > mapCollocatedFaces() const
Return mapped collocated faces.
virtual void calcTransforms()
Recalculate the transformation tensors.
const point & rotationCentre() const noexcept
Point on axis of rotation for rotational cyclics.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
virtual void newInternalProcFaces(label &newFaces, label &newProcFaces) const
Return number of new internal of this polyPatch faces.
const vectorField::subField faceCentres() const
Return face centres.