OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

PrimitivePatch Class Template Reference

Inheritance diagram for PrimitivePatch:

Inheritance graph
[legend]
Collaboration diagram for PrimitivePatch:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<class Face, template< class > class FaceList, class PointField, class PointType = point>
class Foam::PrimitivePatch< Face, FaceList, PointField, PointType >

A list of faces which address into the list of points.

The class is templated on the form of the face (e.g. triangle, polygon etc.) and on the form of list for faces and points so that it can refer to existing lists using UList and const pointField& or hold the storage using List and pointField.

Source files

Definition at line 83 of file PrimitivePatch.H.


Public Types

enum  surfaceTopo
 Enumeration defining the surface type. Used in check routines. More...
typedef Face FaceType
typedef FaceList< Face > FaceListType
typedef PointField PointFieldType

Public Member Functions

 PrimitivePatch (const FaceList< Face > &faces, const Field< PointType > &points)
 Construct from components.
 PrimitivePatch (const PrimitivePatch< Face, FaceList, PointField, PointType > &)
 Construct as copy.
virtual ~PrimitivePatch ()
void clearOut ()
void clearGeom ()
void clearTopology ()
void clearPatchMeshAddr ()
const Field< PointType > & points () const
 Return reference to global points.
label nPoints () const
 Return number of points supporting patch faces.
label nEdges () const
 Return number of edges in patch.
const edgeListedges () const
 Return list of edges, address into LOCAL point list.
label nInternalEdges () const
 Number of internal edges.
bool isInternalEdge (const label edgeI) const
 Is internal edge?
const labelListboundaryPoints () const
 Return list of boundary points,.
const labelListListfaceFaces () const
 Return face-face addressing.
const labelListListedgeFaces () const
 Return edge-face addressing.
const labelListListfaceEdges () const
 Return face-edge addressing.
const labelListListpointEdges () const
 Return point-edge addressing.
const labelListListpointFaces () const
 Return point-face addressing.
const List< Face > & localFaces () const
 Return patch faces addressing into local point list.
const labelListmeshPoints () const
 Return labelList of mesh points in patch.
const Map< label > & meshPointMap () const
 Mesh point map. Given the global point index find its.
const Field< PointType > & localPoints () const
 Return pointField of points in patch.
const labelListlocalPointOrder () const
 Return orders the local points for most efficient search.
label whichPoint (const label gp) const
 Given a global point index, return the local point.
label whichEdge (const edge &e) const
 Given an edge in local point labels, return its.
labelList meshEdges (const edgeList &allEdges, const labelListList &cellEdges, const labelList &faceCells) const
 Return labels of patch edges in the global edge list.
const Field< PointType > & faceNormals () const
 Return face normals for patch.
const Field< PointType > & pointNormals () const
 Return point normals for patch.
template<class ToPatch>
List< objectHitprojectPoints (const ToPatch &targetPatch, const Field< PointType > &projectionDirection, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
 Project vertices of patch onto another patch.
template<class ToPatch>
List< objectHitprojectFaceCentres (const ToPatch &targetPatch, const Field< PointType > &projectionDirection, const intersection::algorithm alg=intersection::FULL_RAY, const intersection::direction dir=intersection::VECTOR) const
 Project vertices of patch onto another patch.
const labelListListedgeLoops () const
 Return list of closed loops of boundary vertices.
surfaceTopo surfaceType () const
 Calculate surface type formed by patch.
bool checkTopology (const bool report=false, labelHashSet *setPtr=NULL) const
 Check surface formed by patch for manifoldness (see above).
bool checkPointManifold (const bool report=false, labelHashSet *setPtr=NULL) const
 Checks primitivePatch for faces sharing point but not edge.
virtual void movePoints (const Field< PointType > &)
 Correct patch after moving points.
void operator= (const PrimitivePatch< Face, FaceList, PointField, PointType > &)
 Assignment.

Member Typedef Documentation

typedef Face FaceType

Definition at line 93 of file PrimitivePatch.H.

typedef FaceList<Face> FaceListType

Definition at line 94 of file PrimitivePatch.H.

typedef PointField PointFieldType

Definition at line 95 of file PrimitivePatch.H.


Member Enumeration Documentation

Enumeration defining the surface type. Used in check routines.

Definition at line 101 of file PrimitivePatch.H.


Constructor & Destructor Documentation

PrimitivePatch ( const FaceList< Face > &  faces,
const Field< PointType > &  points 
)

Construct from components.

Definition at line 36 of file PrimitivePatch.C.

PrimitivePatch ( const PrimitivePatch< Face, FaceList, PointField, PointType > &   ) 

Construct as copy.

Definition at line 71 of file PrimitivePatch.C.

~PrimitivePatch (  )  [virtual]

Definition at line 106 of file PrimitivePatch.C.

References PrimitivePatch::clearOut().

Here is the call graph for this function:


Member Function Documentation

void clearOut (  ) 

Definition at line 124 of file PrimitivePatchClear.C.

References PrimitivePatch::clearGeom(), PrimitivePatch::clearPatchMeshAddr(), and PrimitivePatch::clearTopology().

Referenced by PrimitivePatch::~PrimitivePatch().

Here is the call graph for this function:

Here is the caller graph for this function:

void clearGeom (  ) 

Definition at line 38 of file PrimitivePatchClear.C.

References Foam::deleteDemandDrivenData(), Foam::endl(), and Foam::Info.

Referenced by PrimitivePatch::clearOut(), and PrimitivePatch::movePoints().

Here is the call graph for this function:

Here is the caller graph for this function:

void clearTopology (  ) 

Definition at line 60 of file PrimitivePatchClear.C.

References Foam::deleteDemandDrivenData(), Foam::endl(), and Foam::Info.

Referenced by PrimitivePatch::clearOut().

Here is the call graph for this function:

Here is the caller graph for this function:

void clearPatchMeshAddr (  ) 

Definition at line 101 of file PrimitivePatchClear.C.

References Foam::deleteDemandDrivenData(), Foam::endl(), and Foam::Info.

Referenced by PrimitivePatch::clearOut().

Here is the call graph for this function:

Here is the caller graph for this function:

const Field<PointType>& points (  )  const [inline]

Return reference to global points.

Definition at line 263 of file PrimitivePatch.H.

Referenced by triSurfaceTools::classify(), meshCutSurface::meshCutSurface(), PrimitivePatch::projectFaceCentres(), PrimitivePatch::projectPoints(), triSurface::triSurfInstance(), and surfaceLocation::write().

Here is the caller graph for this function:

label nPoints (  )  const [inline]

Return number of points supporting patch faces.

Definition at line 274 of file PrimitivePatch.H.

Referenced by PrimitivePatch::projectPoints(), and PrimitivePatch::whichEdge().

Here is the caller graph for this function:

label nEdges (  )  const [inline]

Return number of edges in patch.

Definition at line 280 of file PrimitivePatch.H.

label nInternalEdges (  )  const

Number of internal edges.

Definition at line 165 of file PrimitivePatch.C.

Referenced by PrimitivePatch< Foam::labelledTri, Foam::List< T >, Foam::pointField >::isInternalEdge().

Here is the caller graph for this function:

bool isInternalEdge ( const label  edgeI  )  const [inline]

Is internal edge?

Definition at line 292 of file PrimitivePatch.H.

const labelList & boundaryPoints (  )  const

Return list of boundary points,.

address into LOCAL point list

Definition at line 185 of file PrimitivePatch.C.

const labelListList & faceFaces (  )  const

Return face-face addressing.

Definition at line 204 of file PrimitivePatch.C.

Referenced by PrimitivePatch::projectFaceCentres().

Here is the caller graph for this function:

const labelListList & edgeFaces (  )  const

const labelListList & faceEdges (  )  const

Return face-edge addressing.

Definition at line 242 of file PrimitivePatch.C.

Referenced by triSurfaceTools::classify().

Here is the caller graph for this function:

const labelListList & pointEdges (  )  const

Return point-edge addressing.

Definition at line 261 of file PrimitivePatch.C.

Referenced by PrimitivePatch::checkPointManifold(), and PrimitivePatch::whichEdge().

Here is the caller graph for this function:

const labelListList & pointFaces (  )  const

Return point-face addressing.

Definition at line 280 of file PrimitivePatch.C.

Referenced by PrimitivePatch::checkPointManifold(), and triSurfaceTools::getVertexTriangles().

Here is the caller graph for this function:

const List< Face > & localFaces (  )  const

Return patch faces addressing into local point list.

Definition at line 299 of file PrimitivePatch.C.

Referenced by triSurfaceTools::classify().

Here is the caller graph for this function:

const labelList & meshPoints (  )  const

const Map< label > & meshPointMap (  )  const

Mesh point map. Given the global point index find its.

location in the patch

Definition at line 337 of file PrimitivePatch.C.

Referenced by PrimitivePatch::whichPoint().

Here is the caller graph for this function:

const Field< PointType > & localPoints (  )  const

Return pointField of points in patch.

Definition at line 356 of file PrimitivePatch.C.

Referenced by triSurfaceTools::minEdge(), and surfaceFeatures::nearestEdges().

Here is the caller graph for this function:

const labelList & localPointOrder (  )  const

Return orders the local points for most efficient search.

Definition at line 375 of file PrimitivePatch.C.

Referenced by PrimitivePatch::projectPoints().

Here is the caller graph for this function:

label whichPoint ( const label  gp  )  const

Given a global point index, return the local point.

index. If the point is not found, return -1

Definition at line 394 of file PrimitivePatch.C.

References PrimitivePatch::meshPointMap().

Here is the call graph for this function:

label whichEdge ( const edge e  )  const

Given an edge in local point labels, return its.

index in the edge list. If the edge is not found, return -1

Definition at line 117 of file PrimitivePatchMeshEdges.C.

References Foam::mathematicalConstant::e, PrimitivePatch::edges(), forAll, PrimitivePatch::nPoints(), and PrimitivePatch::pointEdges().

Here is the call graph for this function:

labelList meshEdges ( const edgeList allEdges,
const labelListList cellEdges,
const labelList faceCells 
) const

Return labels of patch edges in the global edge list.

Definition at line 39 of file PrimitivePatchMeshEdges.C.

References PrimitivePatch::edgeFaces(), PrimitivePatch::edges(), Foam::endl(), forAll, Foam::Info, and PrimitivePatch::meshPoints().

Here is the call graph for this function:

const Field< PointType > & faceNormals (  )  const

Return face normals for patch.

Definition at line 420 of file PrimitivePatch.C.

Referenced by surfaceLocation::normal().

Here is the caller graph for this function:

const Field< PointType > & pointNormals (  )  const

Return point normals for patch.

Definition at line 439 of file PrimitivePatch.C.

Referenced by surfaceLocation::normal().

Here is the caller graph for this function:

List< objectHit > projectPoints ( const ToPatch &  targetPatch,
const Field< PointType > &  projectionDirection,
const intersection::algorithm  alg = intersection::FULL_RAY,
const intersection::direction  dir = intersection::VECTOR 
) const

List< objectHit > projectFaceCentres ( const ToPatch &  targetPatch,
const Field< PointType > &  projectionDirection,
const intersection::algorithm  alg = intersection::FULL_RAY,
const intersection::direction  dir = intersection::VECTOR 
) const

const labelListList & edgeLoops (  )  const

Return list of closed loops of boundary vertices.

Edge loops are given as ordered lists of vertices in local addressing

Definition at line 173 of file PrimitivePatchEdgeLoops.C.

PrimitivePatch< Face, FaceList, PointField, PointType >::surfaceTopo surfaceType (  )  const

Calculate surface type formed by patch.

  • all edges have two neighbours (manifold)
  • some edges have more than two neighbours (illegal)
  • other (open)

Definition at line 117 of file PrimitivePatchCheck.C.

References PrimitivePatch::edgeFaces(), Foam::endl(), forAll, PrimitivePatch::ILLEGAL, Foam::Info, PrimitivePatch::MANIFOLD, PrimitivePatch::OPEN, and UList::size().

Referenced by PrimitivePatch::checkTopology().

Here is the call graph for this function:

Here is the caller graph for this function:

bool checkTopology ( const bool  report = false,
labelHashSet setPtr = NULL 
) const

Check surface formed by patch for manifoldness (see above).

Insert vertices of incorrect edges set. Return true if any incorrect edge found.

Definition at line 169 of file PrimitivePatchCheck.C.

References Foam::mathematicalConstant::e, PrimitivePatch::edgeFaces(), PrimitivePatch::edges(), Foam::endl(), forAll, PrimitivePatch::ILLEGAL, Foam::Info, PrimitivePatch::MANIFOLD, PrimitivePatch::meshPoints(), PrimitivePatch::OPEN, UList::size(), and PrimitivePatch::surfaceType().

Here is the call graph for this function:

bool checkPointManifold ( const bool  report = false,
labelHashSet setPtr = NULL 
) const

Checks primitivePatch for faces sharing point but not edge.

This denotes a surface that is pinched at a single point (test for pinched at single edge is already in PrimitivePatch) Returns true if this situation found and puts conflicting (mesh)point in set. Based on all the checking routines in primitiveMesh.

Definition at line 238 of file PrimitivePatchCheck.C.

References PrimitivePatch::edgeFaces(), Foam::endl(), Foam::findIndex(), forAll, Foam::Info, PrimitivePatch::meshPoints(), Foam::nl, PrimitivePatch::pointEdges(), and PrimitivePatch::pointFaces().

Here is the call graph for this function:

void movePoints ( const Field< PointType > &   )  [virtual]

Correct patch after moving points.

Definition at line 123 of file PrimitivePatch.C.

References PrimitivePatch::clearGeom(), Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

void operator= ( const PrimitivePatch< Face, FaceList, PointField, PointType > &   ) 

Assignment.

Definition at line 460 of file PrimitivePatch.C.


The documentation for this class was generated from the following files: Copyright © 2000-2008 OpenCFD Ltd