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();
376 virtual bool owner()
const
418 return neighbStart+
offset;
423 <<
"Face " << facei <<
" not in patch " <<
name()
432 return rotationAxis_;
438 return rotationCentre_;
444 return separationVector_;
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
void setSize(label n)
Alias for resize().
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Buffers for inter-processor communications streams (UOPstream, UIPstream).
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
label size() const noexcept
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Encapsulates using "patchGroups" to specify coupled patch.
virtual transformType transform() const
Type of transform.
coupledPolyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const transformType transform)
Construct from components.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm) const
Construct and return a clone, resetting the boundary mesh.
virtual void updateMesh(PstreamBuffers &)
Update of the patch topology.
const word & neighbPatchName() const
Neighbour patch name.
virtual void initMovePoints(PstreamBuffers &, const pointField &)
Initialise the patches for moving points.
virtual label neighbPolyPatchID() const
Return nbr patchID.
virtual bool owner() const
Does this side own the patch ?
virtual void newInternalProcFaces(label &newFaces, label &newProcFaces) const
Return number of new internal of this polyPatch faces.
virtual bool masterImplicit() const
Return implicit master.
const edgeList & coupledEdges() const
Return connected edges (from patch local to neighbour patch local).
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.
virtual void calcGeometry(PstreamBuffers &)
Calculate the patch geometry.
friend class processorCyclicPolyPatch
Declare friendship with processorCyclicPolyPatch.
const edgeList & coupledPoints() const
Return connected points (from patch local to neighbour patch local).
virtual void initGeometry(PstreamBuffers &)
Initialise the calculation of the patch geometry.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const
Initialize ordering for primitivePatch. Does not.
const vector & separationVector() const noexcept
Translation vector for translational cyclics.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) const
Construct and return a clone, resetting the face list.
virtual const labelUList & nbrCells() const
Return nbrCells.
virtual refPtr< labelListList > mapCollocatedFaces() const
Return mapped collocated faces.
virtual autoPtr< polyPatch > clone(const polyBoundaryMesh &bm, const label index, const labelUList &mapAddressing, const label newStart) const
Construct and return a clone, resetting the face list.
label transformGlobalFace(const label facei) const
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
Return new ordering for primitivePatch.
virtual void movePoints(PstreamBuffers &, const pointField &)
Correct patches after moving points.
const cyclicPolyPatch & neighbPatch() const
TypeName("cyclic")
Runtime type information.
virtual void transformPosition(pointField &l) const
Transform a patch-based position from other side to this side.
virtual void initUpdateMesh(PstreamBuffers &)
Initialise the update of the patch topology.
virtual ~cyclicPolyPatch()
Destructor.
virtual bool neighbour() const
Does the coupled side own the patch ?
const point & rotationCentre() const noexcept
Point on axis of rotation for rotational cyclics.
virtual void calcTransforms()
Recalculate the transformation tensors.
const vector & rotationAxis() const noexcept
Axis of rotation for rotational cyclics.
virtual label neighbPatchID() const
Neighbour patchID.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Smooth ATC in cells next to a set of patches supplied by type.
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,...
A patch is a list of labels that address the faces in the global face list.
friend class polyBoundaryMesh
label offset() const noexcept
The offset where this patch starts in the boundary face list.
const vectorField::subField faceCentres() const
Return face centres.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundaryMesh reference.
polyPatch(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
Construct from components.
label start() const noexcept
Return start label of this patch in the polyMesh face list.
const labelUList & faceCells() const
Return face-cell addressing.
A class for managing references or pointers (no reference counting).
T & ref() const
Return non-const reference to the contents of a non-null managed pointer.
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
A class for handling words, derived from Foam::string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
List< edge > edgeList
List of edge.
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< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
PrimitivePatch< SubList< face >, const pointField & > primitivePatch
A PrimitivePatch with a SubList addressing for the faces, const reference for the point field.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Field< vector > vectorField
Specialisation of Field<T> for vector.
vector point
Point is a 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.
vectorField pointField
pointField is a vectorField.
errorManipArg< error, int > exit(error &err, const int errNo=1)
UList< label > labelUList
A UList of labels.
#define forAll(list, i)
Loop across all elements in list.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.