Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
coupledPolyPatch Class Referenceabstract

The coupledPolyPatch is an abstract base class for patches that couple regions of the computational domain e.g. cyclic and processor-processor links. More...

Inheritance diagram for coupledPolyPatch:
Inheritance graph
[legend]
Collaboration diagram for coupledPolyPatch:
Collaboration graph
[legend]

Public Types

enum  transformType {
  UNKNOWN, ROTATIONAL, TRANSLATIONAL, COINCIDENTFULLMATCH,
  NOORDERING
}
 
- Public Types inherited from PrimitivePatch< FaceList, PointField >
enum  surfaceTopo { MANIFOLD, OPEN, ILLEGAL }
 
typedef std::remove_reference< FaceList >::type::value_type face_type
 
typedef std::remove_reference< PointField >::type::value_type point_type
 
typedef FaceList FaceListType
 
typedef PointField PointFieldType
 
typedef face_type FaceType
 

Public Member Functions

 TypeName ("coupled")
 
 coupledPolyPatch (const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType, const transformType transform)
 
 coupledPolyPatch (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm, const word &patchType)
 
 coupledPolyPatch (const coupledPolyPatch &, const polyBoundaryMesh &bm)
 
 coupledPolyPatch (const coupledPolyPatch &, const labelList &faceCells)
 
 coupledPolyPatch (const coupledPolyPatch &pp, const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart)
 
 coupledPolyPatch (const coupledPolyPatch &pp, const polyBoundaryMesh &bm, const label index, const labelUList &mapAddressing, const label newStart)
 
virtual ~coupledPolyPatch ()
 
virtual bool coupled () const
 
virtual bool owner () const =0
 
virtual bool neighbour () const
 
virtual transformType transform () const
 
virtual transformTypetransform ()
 
virtual void transformPosition (pointField &) const =0
 
virtual void transformPosition (point &, const label facei) const =0
 
virtual bool separated () const
 
virtual const vectorFieldseparation () const
 
virtual bool parallel () const
 
virtual const tensorFieldforwardT () const
 
virtual const tensorFieldreverseT () const
 
virtual const boolListcollocated () const
 
scalar matchTolerance () const
 
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
 
virtual void initOrder (PstreamBuffers &, const primitivePatch &) const =0
 
virtual bool order (PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const =0
 
virtual void write (Ostream &os) const
 
- Public Member Functions inherited from polyPatch
 TypeName ("patch")
 
 declareRunTimeSelectionTable (autoPtr, polyPatch, word,(const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType),(name, size, start, index, bm, patchType))
 
 declareRunTimeSelectionTable (autoPtr, polyPatch, dictionary,(const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm, const word &patchType),(name, dict, index, bm, patchType))
 
 polyPatch (const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
 
 polyPatch (const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &physicalType, const wordList &inGroups)
 
 polyPatch (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm, const word &patchType)
 
 polyPatch (const polyPatch &, const polyBoundaryMesh &)
 
 polyPatch (const polyPatch &pp, const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart)
 
 polyPatch (const polyPatch &pp, const polyBoundaryMesh &bm, const label index, const labelUList &mapAddressing, const label newStart)
 
 polyPatch (const polyPatch &p)
 
 polyPatch (const polyPatch &p, const labelList &faceCells)
 
virtual autoPtr< polyPatchclone (const labelList &faceCells) const
 
virtual autoPtr< polyPatchclone (const polyBoundaryMesh &bm) const
 
virtual autoPtr< polyPatchclone (const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) const
 
virtual autoPtr< polyPatchclone (const polyBoundaryMesh &bm, const label index, const labelUList &mapAddressing, const label newStart) const
 
virtual ~polyPatch ()
 
virtual void newInternalProcFaces (label &, label &) const
 
virtual const labelUListnbrCells () const
 
virtual label neighbPolyPatchID () const
 
virtual refPtr< labelListListmapCollocatedFaces () const
 
virtual bool masterImplicit () const
 
virtual word neighbRegionID () const
 
label offset () const
 
label start () const
 
labelRange range () const
 
const polyBoundaryMeshboundaryMesh () const
 
template<class T >
const UIndirectList< TpatchInternalList (const UList< T > &internalValues) const
 
template<class T >
const List< T >::subList patchSlice (const UList< T > &l) const
 
template<class T >
const Field< T >::subField patchSlice (const Field< T > &l) const
 
const vectorField::subField faceCentres () const
 
const vectorField::subField faceAreas () const
 
tmp< vectorFieldfaceCellCentres () const
 
tmp< scalarFieldareaFraction () const
 
const labelUListfaceCells () const
 
const labelListmeshEdges () const
 
virtual void clearAddressing ()
 
label whichFace (const label l) const
 
virtual bool changeTopology () const
 
virtual bool setTopology (polyTopoChange &)
 
void operator= (const polyPatch &)
 
- Public Member Functions inherited from patchIdentifier
 patchIdentifier (const patchIdentifier &)=default
 
patchIdentifieroperator= (const patchIdentifier &)=default
 
virtual ~patchIdentifier ()=default
 
 patchIdentifier ()
 
 patchIdentifier (const word &name, const label index)
 
 patchIdentifier (const word &name, const label index, const word &physicalType, const wordList &inGroups=wordList())
 
 patchIdentifier (const word &name, const dictionary &dict, const label index)
 
 patchIdentifier (const patchIdentifier &ident, const label index)
 
const wordname () const noexcept
 
wordname () noexcept
 
label index () const noexcept
 
label & index () noexcept
 
const wordphysicalType () const noexcept
 
wordphysicalType () noexcept
 
const wordListinGroups () const noexcept
 
wordListinGroups () noexcept
 
bool inGroup (const word &name) const
 
void write (Ostream &os) const
 
- Public Member Functions inherited from PrimitivePatch< FaceList, PointField >
 PrimitivePatch (const FaceList &faces, const PointField &points)
 
 PrimitivePatch (FaceList &&faces, const PointField &points)
 
 PrimitivePatch (FaceList &faces, PointField &points, const bool reuse)
 
 PrimitivePatch (const PrimitivePatch< FaceList, PointField > &pp)
 
virtual ~PrimitivePatch ()
 
void clearOut ()
 
void clearGeom ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
void swap (PrimitivePatch &)=delete
 
const Field< point_type > & points () const noexcept
 
label nFaces () const noexcept
 
label nPoints () const
 
label nEdges () const
 
const edgeListedges () const
 
const edgeList::subList internalEdges () const
 
const edgeList::subList boundaryEdges () const
 
label nInternalEdges () const
 
label nBoundaryEdges () const
 
bool isInternalEdge (const label edgei) const
 
const labelListboundaryPoints () const
 
const labelListListfaceFaces () const
 
const labelListListedgeFaces () const
 
const labelListListfaceEdges () const
 
const labelListListpointEdges () const
 
const labelListListpointFaces () const
 
const List< face_type > & localFaces () const
 
labelList boundaryFaces () const
 
labelList uniqBoundaryFaces () const
 
const labelListmeshPoints () const
 
const Map< label > & meshPointMap () const
 
const Field< point_type > & localPoints () const
 
const labelListlocalPointOrder () const
 
label whichPoint (const label gp) const
 
edge meshEdge (const label edgei) const
 
edge meshEdge (const edge &e) const
 
label findEdge (const edge &e) const
 
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 
label meshEdge (const label edgei, const edgeList &allEdges, const labelListList &pointEdges) const
 
labelList meshEdges (const labelUList &edgeLabels, const edgeList &allEdges, const labelListList &pointEdges) const
 
const Field< point_type > & faceCentres () const
 
const Field< point_type > & faceAreas () const
 
const Field< scalar > & magFaceAreas () const
 
const Field< point_type > & faceNormals () const
 
const Field< point_type > & pointNormals () const
 
bool hasFaceAreas () const
 
bool hasFaceCentres () const
 
bool hasFaceNormals () const
 
bool hasPointNormals () const
 
bool hasBoundaryPoints () const
 
bool hasFaceFaces () const
 
bool hasEdgeFaces () const
 
bool hasFaceEdges () const
 
bool hasPointEdges () const
 
bool hasPointFaces () const
 
bool hasMeshPointMap () const
 
template<class ToPatch >
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< point_type > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 
template<class ToPatch >
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< point_type > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 
const labelListListedgeLoops () const
 
surfaceTopo surfaceType () const
 
bool checkTopology (const bool report=false, labelHashSet *setPtr=nullptr) const
 
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=nullptr) const
 
virtual void movePoints (const Field< point_type > &)
 
void operator= (const PrimitivePatch< FaceList, PointField > &rhs)
 
void operator= (PrimitivePatch< FaceList, PointField > &&rhs)
 
label whichEdge (const edge &e) const
 
template<class ToPatch >
Foam::List< Foam::objectHitprojectPoints (const ToPatch &targetPatch, const Field< typename Foam::PrimitivePatch< FaceList, PointField >::point_type > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
template<class ToPatch >
Foam::List< Foam::objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< typename Foam::PrimitivePatch< FaceList, PointField >::point_type > &projectionDirection, const intersection::algorithm alg, const intersection::direction dir) const
 
- Public Member Functions inherited from PrimitivePatchBase
 ClassName ("PrimitivePatch")
 
 PrimitivePatchBase ()=default
 

Static Public Member Functions

static scalarField calcFaceTol (const UList< face > &faces, const pointField &points, const pointField &faceCentres)
 
- Static Public Member Functions inherited from polyPatch
static autoPtr< polyPatchNew (const word &patchType, const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm)
 
static autoPtr< polyPatchNew (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm)
 
static autoPtr< polyPatchNew (const word &patchType, const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm)
 
static bool constraintType (const word &pt)
 
static wordList constraintTypes ()
 
- Static Public Member Functions inherited from patchIdentifier
static word defaultName (const label n=-1)
 

Static Public Attributes

static const Enum< transformTypetransformTypeNames
 
- Static Public Attributes inherited from polyPatch
static int disallowGenericPolyPatch
 

Protected Member Functions

void calcTransformTensors (const vectorField &Cf, const vectorField &Cr, const vectorField &nf, const vectorField &nr, const scalarField &smallDist, const scalar absTol, const transformType=UNKNOWN) const
 
virtual void initGeometry (PstreamBuffers &)=0
 
virtual void calcGeometry (PstreamBuffers &)=0
 
virtual void initMovePoints (PstreamBuffers &, const pointField &)=0
 
virtual void movePoints (PstreamBuffers &, const pointField &)=0
 
virtual void initUpdateMesh (PstreamBuffers &)=0
 
virtual void updateMesh (PstreamBuffers &)=0
 
- Protected Member Functions inherited from polyPatch
virtual void clearGeom ()
 
virtual void movePoints (const Field< point_type > &)
 

Static Protected Member Functions

static void writeOBJ (Ostream &os, const point &pt)
 
static void writeOBJ (Ostream &, const pointField &, const labelList &)
 
static void writeOBJ (const fileName &, const UList< face > &, const pointField &)
 
static void writeOBJ (Ostream &os, const point &p0, const point &p1, label &vertI)
 
static pointField getAnchorPoints (const UList< face > &, const pointField &, const transformType)
 
static label getRotation (const pointField &points, const face &f, const point &anchor, const scalar tol)
 

Detailed Description

The coupledPolyPatch is an abstract base class for patches that couple regions of the computational domain e.g. cyclic and processor-processor links.

Source files

Definition at line 50 of file coupledPolyPatch.H.

Member Enumeration Documentation

◆ transformType

Enumerator
UNKNOWN 
ROTATIONAL 
TRANSLATIONAL 
COINCIDENTFULLMATCH 
NOORDERING 

Definition at line 56 of file coupledPolyPatch.H.

Constructor & Destructor Documentation

◆ coupledPolyPatch() [1/6]

coupledPolyPatch ( const word name,
const label  size,
const label  start,
const label  index,
const polyBoundaryMesh bm,
const word patchType,
const transformType  transform 
)

Definition at line 469 of file coupledPolyPatch.C.

◆ coupledPolyPatch() [2/6]

coupledPolyPatch ( const word name,
const dictionary dict,
const label  index,
const polyBoundaryMesh bm,
const word patchType 
)

Definition at line 486 of file coupledPolyPatch.C.

◆ coupledPolyPatch() [3/6]

coupledPolyPatch ( const coupledPolyPatch pp,
const polyBoundaryMesh bm 
)

Definition at line 509 of file coupledPolyPatch.C.

◆ coupledPolyPatch() [4/6]

coupledPolyPatch ( const coupledPolyPatch pp,
const labelList faceCells 
)

Definition at line 521 of file coupledPolyPatch.C.

◆ coupledPolyPatch() [5/6]

coupledPolyPatch ( const coupledPolyPatch pp,
const polyBoundaryMesh bm,
const label  index,
const label  newSize,
const label  newStart 
)

Definition at line 533 of file coupledPolyPatch.C.

◆ coupledPolyPatch() [6/6]

coupledPolyPatch ( const coupledPolyPatch pp,
const polyBoundaryMesh bm,
const label  index,
const labelUList mapAddressing,
const label  newStart 
)

Definition at line 548 of file coupledPolyPatch.C.

◆ ~coupledPolyPatch()

~coupledPolyPatch ( )
virtual

Definition at line 564 of file coupledPolyPatch.C.

Member Function Documentation

◆ calcTransformTensors()

void calcTransformTensors ( const vectorField Cf,
const vectorField Cr,
const vectorField nf,
const vectorField nr,
const scalarField smallDist,
const scalar  absTol,
const transformType  transform = UNKNOWN 
) const
protected

◆ initGeometry()

virtual void initGeometry ( PstreamBuffers )
protectedpure virtual

◆ calcGeometry() [1/2]

virtual void calcGeometry ( PstreamBuffers )
protectedpure virtual

Reimplemented from polyPatch.

Implemented in cyclicAMIPolyPatch, cyclicACMIPolyPatch, cyclicPolyPatch, oldCyclicPolyPatch, processorPolyPatch, and processorCyclicPolyPatch.

Referenced by processorCyclicPolyPatch::calcGeometry().

Here is the caller graph for this function:

◆ initMovePoints()

virtual void initMovePoints ( PstreamBuffers ,
const pointField  
)
protectedpure virtual

◆ movePoints()

virtual void movePoints ( PstreamBuffers ,
const pointField  
)
protectedpure virtual

◆ initUpdateMesh()

virtual void initUpdateMesh ( PstreamBuffers )
protectedpure virtual

◆ updateMesh()

virtual void updateMesh ( PstreamBuffers )
protectedpure virtual

◆ writeOBJ() [1/4]

void writeOBJ ( Ostream os,
const point pt 
)
staticprotected

Definition at line 53 of file coupledPolyPatch.C.

References Foam::endl(), os(), Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ writeOBJ() [2/4]

void writeOBJ ( Ostream os,
const pointField points,
const labelList pointLabels 
)
staticprotected

Definition at line 60 of file coupledPolyPatch.C.

References os(), pointLabels(), points, and Foam::meshTools::writeOBJ().

Here is the call graph for this function:

◆ writeOBJ() [3/4]

void writeOBJ ( const fileName fName,
const UList< face > &  faces,
const pointField points 
)
staticprotected

Definition at line 92 of file coupledPolyPatch.C.

References f(), forAll, Foam::nl, os(), points, UList::size(), and Foam::meshTools::writeOBJ().

Here is the call graph for this function:

◆ writeOBJ() [4/4]

void writeOBJ ( Ostream os,
const point p0,
const point p1,
label &  vertI 
)
staticprotected

Definition at line 74 of file coupledPolyPatch.C.

References Foam::nl, os(), p0, and Foam::meshTools::writeOBJ().

Here is the call graph for this function:

◆ getAnchorPoints()

Foam::pointField getAnchorPoints ( const UList< face > &  faces,
const pointField points,
const transformType  transform 
)
staticprotected

Definition at line 126 of file coupledPolyPatch.C.

References f(), forAll, points, UList::size(), and Foam::transform().

Here is the call graph for this function:

◆ getRotation()

Foam::label getRotation ( const pointField points,
const face f,
const point anchor,
const scalar  tol 
)
staticprotected

Definition at line 234 of file coupledPolyPatch.C.

References Foam::endl(), f(), forAll, Foam::magSqr(), Foam::nl, points, Foam::sqrt(), and WarningInFunction.

Here is the call graph for this function:

◆ TypeName()

TypeName ( "coupled"  )

◆ coupled()

virtual bool coupled ( ) const
inlinevirtual

Reimplemented from polyPatch.

Reimplemented in cyclicAMIPolyPatch, and processorPolyPatch.

Definition at line 244 of file coupledPolyPatch.H.

Referenced by coupledFvPatch::coupled().

Here is the caller graph for this function:

◆ owner()

virtual bool owner ( ) const
pure virtual

◆ neighbour()

virtual bool neighbour ( ) const
inlinevirtual

Reimplemented in cyclicPolyPatch, and processorPolyPatch.

Definition at line 253 of file coupledPolyPatch.H.

References coupledPolyPatch::owner().

Here is the call graph for this function:

◆ transform() [1/2]

virtual transformType transform ( ) const
inlinevirtual

Reimplemented in processorCyclicPolyPatch.

Definition at line 259 of file coupledPolyPatch.H.

Referenced by processorCyclicPolyPatch::transform().

Here is the caller graph for this function:

◆ transform() [2/2]

virtual transformType& transform ( )
inlinevirtual

Reimplemented in processorCyclicPolyPatch.

Definition at line 267 of file coupledPolyPatch.H.

◆ transformPosition() [1/2]

virtual void transformPosition ( pointField ) const
pure virtual

◆ transformPosition() [2/2]

virtual void transformPosition ( point ,
const label  facei 
) const
pure virtual

◆ separated()

virtual bool separated ( ) const
inlinevirtual

◆ separation()

virtual const vectorField& separation ( ) const
inlinevirtual

◆ parallel()

virtual bool parallel ( ) const
inlinevirtual

◆ forwardT()

virtual const tensorField& forwardT ( ) const
inlinevirtual

◆ reverseT()

virtual const tensorField& reverseT ( ) const
inlinevirtual

◆ collocated()

virtual const boolList& collocated ( ) const
inlinevirtual

Reimplemented in processorCyclicPolyPatch.

Definition at line 309 of file coupledPolyPatch.H.

Referenced by processorCyclicPolyPatch::collocated().

Here is the caller graph for this function:

◆ matchTolerance()

scalar matchTolerance ( ) const
inline

Definition at line 314 of file coupledPolyPatch.H.

◆ calcGeometry() [2/2]

virtual void calcGeometry ( const primitivePatch referPatch,
const pointField thisCtrs,
const vectorField thisAreas,
const pointField thisCc,
const pointField nbrCtrs,
const vectorField nbrAreas,
const pointField nbrCc 
)
pure virtual

◆ initOrder()

virtual void initOrder ( PstreamBuffers ,
const primitivePatch  
) const
pure virtual

◆ order()

virtual bool order ( PstreamBuffers ,
const primitivePatch ,
labelList faceMap,
labelList rotation 
) const
pure virtual

◆ calcFaceTol()

Foam::scalarField calcFaceTol ( const UList< face > &  faces,
const pointField points,
const pointField faceCentres 
)
static

Definition at line 194 of file coupledPolyPatch.C.

References Foam::cmptMag(), Foam::cmptMax(), f(), forAll, Foam::magSqr(), Foam::max(), points, UList::size(), and Foam::sqrt().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const
virtual

Reimplemented from polyPatch.

Reimplemented in cyclicAMIPolyPatch, cyclicPolyPatch, processorCyclicPolyPatch, processorPolyPatch, cyclicACMIPolyPatch, oldCyclicPolyPatch, and cyclicPeriodicAMIPolyPatch.

Definition at line 570 of file coupledPolyPatch.C.

References os(), polyPatch::write(), and Ostream::writeEntry().

Referenced by processorPolyPatch::write(), cyclicPolyPatch::write(), and cyclicAMIPolyPatch::write().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ transformTypeNames

const Foam::Enum< Foam::coupledPolyPatch::transformType > transformTypeNames
static

Definition at line 66 of file coupledPolyPatch.H.


The documentation for this class was generated from the following files: