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();
326 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.
virtual label referPatchID() const
The referring patchID (eg, for cyclics).
static const Enum< transformType > transformTypeNames
void size(const label n)
Older name for setAddressableSize.
virtual bool coupled() const
Return true because this patch is coupled.
virtual void write(Ostream &os) const
Write the polyPatch data as a dictionary.
A class for handling file names.
virtual void initGeometry(PstreamBuffers &)=0
Initialise the calculation of the patch geometry.
virtual bool separated() const
Are the planes separated.
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.
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.
bool empty() const noexcept
True if List is empty (ie, size() is zero)
The coupledPolyPatch is an abstract base class for patches that couple regions of the computational d...
scalar matchTolerance() const
Smooth ATC in cells next to a set of patches supplied by type.
virtual const vectorField & separation() const
If the planes are separated the separation vector.
virtual const tensorField & forwardT() const
Return face transformation tensor.
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.
virtual bool parallel() const
Are the cyclic planes parallel.
A list of faces which address into the list of points.
vectorField pointField
pointField is a vectorField.
virtual void calcGeometry(PstreamBuffers &)=0
Calculate the patch geometry.
A class for handling words, derived from Foam::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.
const Field< point_type > & points() const noexcept
Return reference to global points.
virtual bool order(PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const =0
Return new ordering for primitivePatch.
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...
OBJstream os(runTime.globalPath()/outputName)
virtual const boolList & collocated() const
Are faces collocated. Either size 0,1 or length of patch.
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.
Field< tensor > tensorField
Specialisation of Field<T> for tensor.
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 ~coupledPolyPatch()
Destructor.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
vector point
Point is a vector.
virtual void transformPosition(pointField &) const =0
Transform a patch-based position from other side to this side.
TypeName("coupled")
Runtime type information.
virtual bool neighbour() const
Does the coupled side own the patch ?
virtual transformType transform() const
Type of transform.
Field< vector > vectorField
Specialisation of Field<T> for vector.
label index() const noexcept
The index of this patch in the boundaryMesh.
A patch is a list of labels that address the faces in the global face list.
virtual void updateMesh(PstreamBuffers &)=0
Update of the patch topology.
const volScalarField & p0
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
const vectorField::subField faceCentres() const
Return face centres.