37 #ifndef coupledPolyPatch_H 38 #define coupledPolyPatch_H 76 static const scalar defaultMatchTol_;
79 const scalar matchTolerance_;
194 const word& patchType,
205 const word& patchType
248 virtual bool owner()
const = 0;
279 return separation_.
size();
291 return forwardT_.
empty();
314 return matchTolerance_;
virtual void initMovePoints(PstreamBuffers &, const pointField &)=0
Initialise the patches for moving points.
virtual void initOrder(PstreamBuffers &, const primitivePatch &) const =0
Initialize ordering for primitivePatch. Does not.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling file names.
virtual void initGeometry(PstreamBuffers &)=0
Initialise the calculation of the patch geometry.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
A face is a list of labels corresponding to mesh vertices.
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 bool neighbour() const
Does the coupled side own the patch ?
A list of keyword definitions, which are a keyword followed by any number of values (e...
virtual const vectorField & separation() const
If the planes are separated the separation vector.
bool empty() const
Return true if the UList is empty (ie, size() is zero)
void size(const label)
Override size to be inconsistent with allocated storage.
scalar matchTolerance() const
const Field< PointType > & points() const
Return reference to global points.
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
virtual transformType transform() const
Type of transform.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
virtual void movePoints(PstreamBuffers &, const pointField &)=0
Correct patches after moving points.
static pointField getAnchorPoints(const UList< face > &, const pointField &, const transformType)
Get a unique anchor point for all faces.
A list of faces which address into the list of points.
virtual bool separated() const
Are the planes separated.
virtual void calcGeometry(PstreamBuffers &)=0
Calculate the patch geometry.
static const NamedEnum< transformType, 5 > transformTypeNames
label start() const
Return start label of this patch in the polyMesh face list.
virtual const boolList & collocated() const
Are faces collocated. Either size 0,1 or length of patch.
A class for handling words, derived from string.
virtual bool owner() const =0
Does this side own the patch ?
static void writeOBJ(Ostream &os, const point &pt)
Write point in OBJ format.
virtual void initUpdateMesh(PstreamBuffers &)=0
Initialise the update of the patch topology.
virtual bool parallel() const
Are the cyclic planes parallel.
const word & name() const
Return name.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const =0
Return new ordering for primitivePatch.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Buffers for inter-processor communications streams (UOPstream, UIPstream).
static label getRotation(const pointField &points, const face &f, const point &anchor, const scalar tol)
Get the number of vertices face f needs to be rotated such that.
static scalarField calcFaceTol(const UList< face > &faces, const pointField &points, const pointField &faceCentres)
Calculate typical tolerance per face. Is currently max distance.
virtual void write(Ostream &) const
Write the polyPatch data as a dictionary.
virtual ~coupledPolyPatch()
Destructor.
virtual bool coupled() const
Return true because this patch is coupled.
virtual void transformPosition(pointField &) const =0
Transform a patch-based position from other side to this side.
TypeName("coupled")
Runtime type information.
virtual const tensorField & forwardT() const
Return face transformation tensor.
const vectorField::subField faceCentres() const
Return face centres.
A patch is a list of labels that address the faces in the global face list.
void calcTransformTensors(const vectorField &Cf, const vectorField &Cr, const vectorField &nf, const vectorField &nr, const scalarField &smallDist, const scalar absTol, const transformType=UNKNOWN) const
Calculate the transformation tensors.
virtual void updateMesh(PstreamBuffers &)=0
Update of the patch topology.
label index() const
Return the index of this patch in the boundaryMesh.