genericPolyPatch Class Reference

Substitute for unknown patches. Used for postprocessing when only basic polyPatch info is needed or if the real patch type is unavailable. More...

Inheritance diagram for genericPolyPatch:
[legend]
Collaboration diagram for genericPolyPatch:
[legend]

Public Member Functions

 TypeName ("genericPatch")
 Runtime type information. More...
 
 genericPolyPatch (const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &patchType)
 Construct from components. More...
 
 genericPolyPatch (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm, const word &patchType)
 Construct from dictionary. More...
 
 genericPolyPatch (const genericPolyPatch &, const polyBoundaryMesh &)
 Construct as copy, resetting the boundary mesh. More...
 
 genericPolyPatch (const genericPolyPatch &pp, const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart)
 Construct given the original patch and resetting the. More...
 
 genericPolyPatch (const genericPolyPatch &pp, const polyBoundaryMesh &bm, const label index, const labelUList &mapAddressing, const label newStart)
 Construct given the original patch and a map. More...
 
virtual autoPtr< polyPatchclone (const polyBoundaryMesh &bm) const
 Construct and return a clone, resetting the boundary mesh. More...
 
virtual autoPtr< polyPatchclone (const polyBoundaryMesh &bm, const label index, const label newSize, const label newStart) const
 Construct and return a clone, resetting the face list. More...
 
virtual autoPtr< polyPatchclone (const polyBoundaryMesh &bm, const label index, const labelUList &mapAddressing, const label newStart) const
 Construct and return a clone, resetting the face list. More...
 
 ~genericPolyPatch ()
 Destructor. More...
 
const wordactualType () const
 Return the actual type. More...
 
virtual void write (Ostream &) const
 Write the polyPatch data as a dictionary. More...
 
- Public Member Functions inherited from polyPatch
 TypeName ("patch")
 Runtime type information. More...
 
 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)
 Construct from components. More...
 
 polyPatch (const word &name, const label size, const label start, const label index, const polyBoundaryMesh &bm, const word &physicalType, const wordList &inGroups)
 Construct from components. More...
 
 polyPatch (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm, const word &patchType)
 Construct from dictionary. More...
 
 polyPatch (const polyPatch &, const polyBoundaryMesh &)
 Copy construct, resetting the boundary mesh. More...
 
 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)
 Construct given the original patch and a map. More...
 
 polyPatch (const polyPatch &p)
 Copy construct. More...
 
 polyPatch (const polyPatch &p, const labelList &faceCells)
 Copy construct, setting faceCells. More...
 
virtual autoPtr< polyPatchclone (const labelList &faceCells) const
 Construct and return a clone, setting faceCells. More...
 
virtual autoPtr< polyPatchclone (const polyBoundaryMesh &bm) const
 Construct and return a clone, resetting the boundary mesh. More...
 
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 ()
 Destructor. More...
 
virtual void newInternalProcFaces (label &, label &) const
 Return number of new internal of this polyPatch faces. More...
 
virtual const labelUListnbrCells () const
 Return nbrCells. More...
 
virtual label neighbPolyPatchID () const
 Return nbr patchID. More...
 
virtual refPtr< labelListListmapCollocatedFaces () const
 Return mapped collocated faces. More...
 
virtual bool masterImplicit () const
 Return implicit master. More...
 
virtual word neighbRegionID () const
 Return neighbour region name. More...
 
label offset () const
 The offset where this patch starts in the boundary face list. More...
 
label start () const
 Return start label of this patch in the polyMesh face list. More...
 
labelRange range () const
 Return start/size range of this patch. More...
 
const polyBoundaryMeshboundaryMesh () const
 Return boundaryMesh reference. More...
 
virtual bool coupled () const
 Return true if this patch is geometrically coupled (i.e. faces and. More...
 
template<class T >
const UIndirectList< TpatchInternalList (const UList< T > &internalValues) const
 Extract face cell data. More...
 
template<class T >
const List< T >::subList patchSlice (const UList< T > &l) const
 Slice list to patch. More...
 
template<class T >
const Field< T >::subField patchSlice (const Field< T > &l) const
 Slice Field to patch. More...
 
virtual void write (Ostream &os) const
 Write the polyPatch data as a dictionary. More...
 
const vectorField::subField faceCentres () const
 Return face centres. More...
 
const vectorField::subField faceAreas () const
 Return face normals. More...
 
tmp< vectorFieldfaceCellCentres () const
 Return face cell centres. More...
 
tmp< scalarFieldareaFraction () const
 
const labelUListfaceCells () const
 Return face-cell addressing. More...
 
const labelListmeshEdges () const
 Return global edge index for local edges. More...
 
virtual void clearAddressing ()
 Clear addressing. More...
 
label whichFace (const label l) const
 Return label of face in patch from global face label. More...
 
virtual void initOrder (PstreamBuffers &, const primitivePatch &) const
 Initialize ordering for primitivePatch. Does not. More...
 
virtual bool order (PstreamBuffers &, const primitivePatch &, labelList &faceMap, labelList &rotation) const
 Return new ordering for primitivePatch. More...
 
virtual bool changeTopology () const
 
virtual bool setTopology (polyTopoChange &)
 Collect topology changes in a polyTopoChange object. More...
 
void operator= (const polyPatch &)
 Assignment. More...
 
- Public Member Functions inherited from patchIdentifier
 patchIdentifier (const patchIdentifier &)=default
 Copy construct. More...
 
patchIdentifieroperator= (const patchIdentifier &)=default
 Copy assignment. More...
 
virtual ~patchIdentifier ()=default
 Destructor. More...
 
 patchIdentifier ()
 Default construct. Uses name="", index=0. More...
 
 patchIdentifier (const word &name, const label index)
 Construct from mandatory components. More...
 
 patchIdentifier (const word &name, const label index, const word &physicalType, const wordList &inGroups=wordList())
 Construct from components. More...
 
 patchIdentifier (const word &name, const dictionary &dict, const label index)
 Construct from dictionary. More...
 
 patchIdentifier (const patchIdentifier &ident, const label index)
 Copy construct, resetting the index. More...
 
const wordname () const noexcept
 The patch name. More...
 
wordname () noexcept
 Modifiable patch name. More...
 
label index () const noexcept
 The index of this patch in the boundaryMesh. More...
 
label & index () noexcept
 Modifiable index of this patch in the boundaryMesh. More...
 
const wordphysicalType () const noexcept
 The (optional) physical type of the patch. More...
 
wordphysicalType () noexcept
 Modifiable (optional) physical type of the patch. More...
 
const wordListinGroups () const noexcept
 The (optional) groups that the patch belongs to. More...
 
wordListinGroups () noexcept
 Modifiable (optional) groups that the patch belongs to. More...
 
bool inGroup (const word &name) const
 True if given name is in a group. More...
 
void write (Ostream &os) const
 
- Public Member Functions inherited from PrimitivePatch< FaceList, PointField >
 PrimitivePatch (const FaceList &faces, const PointField &points)
 Construct from components. More...
 
 PrimitivePatch (FaceList &&faces, const PointField &points)
 Construct from components, transferring faces. More...
 
 PrimitivePatch (FaceList &faces, PointField &points, const bool reuse)
 Construct from components, reuse storage. More...
 
 PrimitivePatch (const PrimitivePatch< FaceList, PointField > &pp)
 Copy construct. More...
 
virtual ~PrimitivePatch ()
 Destructor. More...
 
void clearOut ()
 
void clearGeom ()
 
void clearTopology ()
 
void clearPatchMeshAddr ()
 
void swap (PrimitivePatch &)=delete
 Suppress direct swapping, since storage containers may be const. More...
 
const Field< point_type > & points () const noexcept
 Return reference to global points. More...
 
label nFaces () const noexcept
 Number of faces in the patch. More...
 
label nPoints () const
 Number of points supporting patch faces. More...
 
label nEdges () const
 Number of edges in patch. More...
 
const edgeListedges () const
 Return list of edges, address into LOCAL point list. More...
 
const edgeList::subList internalEdges () const
 Return sub-list of internal edges, address into LOCAL point list. More...
 
const edgeList::subList boundaryEdges () const
 Return sub-list of boundary edges, address into LOCAL point list. More...
 
label nInternalEdges () const
 Number of internal edges. More...
 
label nBoundaryEdges () const
 Number of boundary edges == (nEdges() - nInternalEdges()) More...
 
bool isInternalEdge (const label edgei) const
 Is internal edge? More...
 
const labelListboundaryPoints () const
 Return list of boundary points, address into LOCAL point list. More...
 
const labelListListfaceFaces () const
 Return face-face addressing. More...
 
const labelListListedgeFaces () const
 Return edge-face addressing. More...
 
const labelListListfaceEdges () const
 Return face-edge addressing. More...
 
const labelListListpointEdges () const
 Return point-edge addressing. More...
 
const labelListListpointFaces () const
 Return point-face addressing. More...
 
const List< face_type > & localFaces () const
 Return patch faces addressing into local point list. More...
 
labelList boundaryFaces () const
 
labelList uniqBoundaryFaces () const
 
const labelListmeshPoints () const
 Return labelList of mesh points in patch. More...
 
const Map< label > & meshPointMap () const
 Mesh point map. More...
 
const Field< point_type > & localPoints () const
 Return pointField of points in patch. More...
 
const labelListlocalPointOrder () const
 Return orders the local points for most efficient search. More...
 
label whichPoint (const label gp) const
 Given a global point index, return the local point index. More...
 
edge meshEdge (const label edgei) const
 From patch edge to global edge using meshPoints. More...
 
edge meshEdge (const edge &e) const
 From patch edge to global edge using meshPoints. More...
 
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
 Return face centres for patch. More...
 
const Field< point_type > & faceAreas () const
 Return face area vectors for patch. More...
 
const Field< scalar > & magFaceAreas () const
 Return face area magnitudes for patch. More...
 
const Field< point_type > & faceNormals () const
 Return face unit normals for patch. More...
 
const Field< point_type > & pointNormals () const
 Return point normals for patch. More...
 
bool hasFaceAreas () const
 
bool hasFaceCentres () const
 
bool hasFaceNormals () const
 
bool hasPointNormals () const
 
bool hasBoundaryPoints () const
 
bool hasEdges () 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
 Project vertices of patch onto another patch. More...
 
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
 Project vertices of patch onto another patch. More...
 
const labelListListedgeLoops () const
 Return list of closed loops of boundary vertices. More...
 
surfaceTopo surfaceType () const
 Calculate surface type formed by patch. More...
 
bool checkTopology (const bool report=false, labelHashSet *setPtr=nullptr) const
 Check surface formed by patch for manifoldness (see above). More...
 
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=nullptr) const
 Checks primitivePatch for faces sharing point but not edge. More...
 
virtual void movePoints (const Field< point_type > &)
 Correct patch after moving points. More...
 
void operator= (const PrimitivePatch< FaceList, PointField > &rhs)
 Copy assign faces. Leave points alone (could be a reference). More...
 
void operator= (PrimitivePatch< FaceList, PointField > &&rhs)
 Move assign faces. Leave points alone (could be a reference). More...
 
label whichEdge (const edge &e) const
 Identical to findEdge. More...
 
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")
 Runtime type information. More...
 
 PrimitivePatchBase ()=default
 Default construct. More...
 

Additional Inherited Members

- Public Types inherited from PrimitivePatch< FaceList, PointField >
enum  surfaceTopo { MANIFOLD , OPEN , ILLEGAL }
 Enumeration defining the surface type. Used in check routines. More...
 
typedef std::remove_reference< FaceList >::type::value_type face_type
 The face type. More...
 
typedef std::remove_reference< PointField >::type::value_type point_type
 The point type. More...
 
typedef FaceList FaceListType
 The face list type. More...
 
typedef PointField PointFieldType
 The point field type. More...
 
typedef face_type FaceType
 Deprecated(2020-03) prefer face_type typedef. More...
 
- 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)
 Return pointer to a new patch created on freestore from components. More...
 
static autoPtr< polyPatchNew (const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm)
 Return pointer to a new patch created on freestore from dictionary. More...
 
static autoPtr< polyPatchNew (const word &patchType, const word &name, const dictionary &dict, const label index, const polyBoundaryMesh &bm)
 Return pointer to a new patch created on freestore from dictionary. More...
 
static bool constraintType (const word &pt)
 Return true if the given type is a constraint type. More...
 
static wordList constraintTypes ()
 Return a list of all the constraint patch types. More...
 
- Static Public Member Functions inherited from patchIdentifier
static word defaultName (const label n=-1)
 Default patch name: "patch" or "patchN". More...
 
- Static Public Attributes inherited from polyPatch
static int disallowGenericPolyPatch
 Debug switch to disallow the use of genericPolyPatch. More...
 
- Protected Member Functions inherited from polyPatch
virtual void initGeometry (PstreamBuffers &)
 Initialise the calculation of the patch geometry. More...
 
virtual void calcGeometry (PstreamBuffers &)
 Calculate the patch geometry. More...
 
virtual void initMovePoints (PstreamBuffers &, const pointField &)
 Initialise the patches for moving points. More...
 
virtual void movePoints (PstreamBuffers &, const pointField &p)
 Correct patches after moving points. More...
 
virtual void initUpdateMesh (PstreamBuffers &)
 Initialise the update of the patch topology. More...
 
virtual void updateMesh (PstreamBuffers &)
 Update of the patch topology. More...
 
virtual void clearGeom ()
 Clear geometry. More...
 
virtual void movePoints (const Field< point_type > &)
 Inherit movePoints from primitivePatch. More...
 

Detailed Description

Substitute for unknown patches. Used for postprocessing when only basic polyPatch info is needed or if the real patch type is unavailable.

Note
Storage is not optimal. It stores all face centres and cells on all processors to keep the addressing calculation simple.
Source files

Definition at line 57 of file genericPolyPatch.H.

Constructor & Destructor Documentation

◆ genericPolyPatch() [1/5]

genericPolyPatch ( const word name,
const label  size,
const label  start,
const label  index,
const polyBoundaryMesh bm,
const word patchType 
)

Construct from components.

Definition at line 45 of file genericPolyPatch.C.

References Foam::name().

Here is the call graph for this function:

◆ genericPolyPatch() [2/5]

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

Construct from dictionary.

Definition at line 59 of file genericPolyPatch.C.

◆ genericPolyPatch() [3/5]

genericPolyPatch ( const genericPolyPatch pp,
const polyBoundaryMesh bm 
)

Construct as copy, resetting the boundary mesh.

Definition at line 74 of file genericPolyPatch.C.

◆ genericPolyPatch() [4/5]

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

Construct given the original patch and resetting the.

face list and boundary mesh information

Definition at line 86 of file genericPolyPatch.C.

◆ genericPolyPatch() [5/5]

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

Construct given the original patch and a map.

Definition at line 101 of file genericPolyPatch.C.

◆ ~genericPolyPatch()

Destructor.

Definition at line 118 of file genericPolyPatch.C.

Member Function Documentation

◆ TypeName()

TypeName ( "genericPatch"  )

Runtime type information.

◆ clone() [1/3]

virtual autoPtr< polyPatch > clone ( const polyBoundaryMesh bm) const
inlinevirtual

Construct and return a clone, resetting the boundary mesh.

Reimplemented from polyPatch.

Definition at line 124 of file genericPolyPatch.H.

◆ clone() [2/3]

virtual autoPtr< polyPatch > clone ( const polyBoundaryMesh bm,
const label  index,
const label  newSize,
const label  newStart 
) const
inlinevirtual

Construct and return a clone, resetting the face list.

and boundary mesh

Reimplemented from polyPatch.

Definition at line 131 of file genericPolyPatch.H.

◆ clone() [3/3]

virtual autoPtr< polyPatch > clone ( const polyBoundaryMesh bm,
const label  index,
const labelUList mapAddressing,
const label  newStart 
) const
inlinevirtual

Construct and return a clone, resetting the face list.

and boundary mesh

Reimplemented from polyPatch.

Definition at line 147 of file genericPolyPatch.H.

◆ actualType()

const Foam::word & actualType ( ) const

Return the actual type.

Definition at line 124 of file genericPolyPatch.C.

◆ write()

void write ( Ostream os) const
virtual

Write the polyPatch data as a dictionary.

Reimplemented from polyPatch.

Definition at line 130 of file genericPolyPatch.C.

References e, os(), ObukhovLength::write(), regIOobject::write(), and Ostream::writeEntry().

Here is the call graph for this function:

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