40#ifndef Foam_coupledPolyPatch_H
41#define Foam_coupledPolyPatch_H
79 static const scalar defaultMatchTol_;
82 const scalar matchTolerance_;
197 const word& patchType,
208 const word& patchType
254 virtual bool owner()
const = 0;
291 return separation_.size();
303 return forwardT_.empty();
326 return matchTolerance_;
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
const Field< point_type > & points() const noexcept
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...
virtual transformType transform() const
Type of transform.
scalar matchTolerance() const
virtual void initMovePoints(PstreamBuffers &, const pointField &)=0
Initialise the patches for moving points.
virtual bool coupled() const
Return true because this patch is coupled.
virtual void calcGeometry(PstreamBuffers &)=0
Calculate the patch geometry.
virtual void updateMesh(PstreamBuffers &)=0
Update of the patch topology.
virtual void initUpdateMesh(PstreamBuffers &)=0
Initialise the update of the patch topology.
virtual void transformPosition(point &, const label facei) const =0
Transform a patch-based position from other side to this side.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const =0
Return new ordering for primitivePatch.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
virtual label referPatchID() const
The referring patchID (eg, for cyclics).
virtual bool separated() const
Are the planes separated.
virtual bool parallel() const
Are the cyclic planes parallel.
virtual void movePoints(PstreamBuffers &, const pointField &)=0
Correct patches after moving points.
virtual bool owner() const =0
Does this side own the patch ?
TypeName("coupled")
Runtime type information.
static const Enum< transformType > transformTypeNames
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 const boolList & collocated() const
Are faces collocated. Either size 0,1 or length of patch.
virtual const vectorField & separation() const
If the planes are separated the separation vector.
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 void initOrder(PstreamBuffers &, const primitivePatch &) const =0
Initialize ordering for primitivePatch. Does not.
virtual void calcGeometry(const primitivePatch &referPatch, const pointField &thisCtrs, const vectorField &thisAreas, const pointField &thisCc, const pointField &nbrCtrs, const vectorField &nbrAreas, const pointField &nbrCc)=0
Calculate the patch geometry.
static scalarField calcFaceTol(const UList< face > &faces, const pointField &points, const pointField &faceCentres)
Calculate typical tolerance per face. Is currently max distance.
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.
virtual void transformPosition(pointField &) const =0
Transform a patch-based position from other side to this side.
static pointField getAnchorPoints(const UList< face > &, const pointField &, const transformType)
Get a unique anchor point for all faces.
virtual bool neighbour() const
Does the coupled side own the patch ?
virtual transformType & transform()
Type of transform.
virtual ~coupledPolyPatch()
Destructor.
virtual void initGeometry(PstreamBuffers &)=0
Initialise the calculation of the patch geometry.
virtual const tensorField & forwardT() const
Return face transformation tensor.
static void writeOBJ(Ostream &os, const point &pt)
Write point in OBJ format.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A face is a list of labels corresponding to mesh vertices.
A class for handling file names.
label index() const noexcept
The index of this patch in the boundaryMesh.
friend class polyBoundaryMesh
const faceList::subList faces() const
Return mesh faces for the patch.
const vectorField::subField faceCentres() const
Return face centres.
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 handling words, derived from Foam::string.
const volScalarField & p0
OBJstream os(runTime.globalPath()/outputName)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
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.
List< bool > boolList
A List of bools.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.