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

PrimitivePatch< Face, FaceList, PointField, PointType > Class Template Reference

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

Inheritance diagram for PrimitivePatch< Face, FaceList, PointField, PointType >:
Collaboration diagram for PrimitivePatch< Face, FaceList, PointField, PointType >:

List of all members.


Public Types

enum  surfaceTopo { MANIFOLD, OPEN, ILLEGAL }
 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 (FaceList< Face > &faces, Field< PointType > &points, const bool reUse)
 Construct from components, reuse storage.
 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 edgeList & edges () 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 labelList & boundaryPoints () const
 Return list of boundary points,.
const labelListList & faceFaces () const
 Return face-face addressing.
const labelListList & edgeFaces () const
 Return edge-face addressing.
const labelListList & faceEdges () const
 Return face-edge addressing.
const labelListList & pointEdges () const
 Return point-edge addressing.
const labelListList & pointFaces () const
 Return point-face addressing.
const List< Face > & localFaces () const
 Return patch faces addressing into local point list.
const labelList & meshPoints () const
 Return labelList of mesh points in patch. They are constructed.
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 labelList & localPointOrder () 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 index.
label whichEdge (const edge &) 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 using.
labelList meshEdges (const edgeList &allEdges, const labelListList &pointEdges) const
 Return labels of patch edges in the global edge list using.
const Field< PointType > & faceNormals () const
 Return face normals for patch.
const Field< PointType > & pointNormals () const
 Return point normals for patch.
template<class ToPatch >
List< objectHit > projectPoints (const ToPatch &targetPatch, const Field< PointType > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch.
template<class ToPatch >
List< objectHit > projectFaceCentres (const ToPatch &targetPatch, const Field< PointType > &projectionDirection, const intersection::algorithm=intersection::FULL_RAY, const intersection::direction=intersection::VECTOR) const
 Project vertices of patch onto another patch.
const labelListList & edgeLoops () 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.

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 face type (e.g. triangle, polygon etc.) and on the list type of 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.


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.

Enumerator:
MANIFOLD 
OPEN 
ILLEGAL 

Definition at line 101 of file PrimitivePatch.H.


Constructor & Destructor Documentation

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

Construct from components.

Definition at line 33 of file PrimitivePatch.C.

PrimitivePatch ( FaceList< Face > &  faces,
Field< PointType > &  points,
const bool  reUse 
) [inline]

Construct from components, reuse storage.

Definition at line 70 of file PrimitivePatch.C.

PrimitivePatch ( const PrimitivePatch< Face, FaceList, PointField, PointType > &  pp  )  [inline]

Construct as copy.

Definition at line 108 of file PrimitivePatch.C.

~PrimitivePatch (  )  [inline, virtual]

Definition at line 144 of file PrimitivePatch.C.

References PrimitivePatch< Face, FaceList, PointField, PointType >::clearOut().

Here is the call graph for this function:


Member Function Documentation

void clearGeom (  )  [inline]

Reimplemented in surfMesh.

Definition at line 37 of file PrimitivePatchClear.C.

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

Referenced by PrimitivePatch< Face, FaceList, PointField, PointType >::clearOut(), and PrimitivePatch< Face, FaceList, PointField, PointType >::movePoints().

Here is the call graph for this function:

Here is the caller graph for this function:

void clearTopology (  )  [inline]

Reimplemented in triSurface.

Definition at line 62 of file PrimitivePatchClear.C.

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

Referenced by PrimitivePatch< Face, FaceList, PointField, PointType >::clearOut().

Here is the call graph for this function:

Here is the caller graph for this function:

void clearPatchMeshAddr (  )  [inline]

Reimplemented in triSurface.

Definition at line 104 of file PrimitivePatchClear.C.

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

Referenced by PrimitivePatch< Face, FaceList, PointField, PointType >::clearOut().

Here is the call graph for this function:

Here is the caller graph for this function:

label nPoints (  )  const [inline]

Return number of points supporting patch faces.

Reimplemented in surfMesh.

Definition at line 285 of file PrimitivePatch.H.

Referenced by PrimitivePatch< Face, FaceList, PointField, PointType >::projectPoints(), PatchTools::subsetMap(), and PrimitivePatch< Face, FaceList, PointField, PointType >::whichEdge().

Here is the caller graph for this function:

label nEdges (  )  const [inline]

Return number of edges in patch.

Definition at line 291 of file PrimitivePatch.H.

Referenced by PatchTools::checkOrientation().

Here is the caller graph for this function:

Foam::label nInternalEdges (  )  const [inline]

Number of internal edges.

Definition at line 211 of file PrimitivePatch.C.

Referenced by PrimitivePatch< face,::Foam::UList,::Foam::SubField< point >, point >::isInternalEdge().

Here is the caller graph for this function:

bool isInternalEdge ( const label  edgeI  )  const [inline]

Is internal edge?

Definition at line 303 of file PrimitivePatch.H.

const Foam::labelList & boundaryPoints (  )  const [inline]

Return list of boundary points,.

address into LOCAL point list

Definition at line 232 of file PrimitivePatch.C.

const Foam::labelListList & faceFaces (  )  const [inline]

Return face-face addressing.

Definition at line 253 of file PrimitivePatch.C.

Referenced by PrimitivePatch< Face, FaceList, PointField, PointType >::projectFaceCentres().

Here is the caller graph for this function:

const Foam::labelListList & faceEdges (  )  const [inline]

Return face-edge addressing.

Definition at line 295 of file PrimitivePatch.C.

Referenced by PatchTools::checkOrientation(), triSurfaceTools::classify(), and PatchTools::markZone().

Here is the caller graph for this function:

const Foam::labelListList & pointEdges (  )  const [inline]

Return point-edge addressing.

Definition at line 316 of file PrimitivePatch.C.

Referenced by PrimitivePatch< Face, FaceList, PointField, PointType >::checkPointManifold(), and PrimitivePatch< Face, FaceList, PointField, PointType >::whichEdge().

Here is the caller graph for this function:

const Foam::labelListList & pointFaces (  )  const [inline]

Return point-face addressing.

Definition at line 337 of file PrimitivePatch.C.

Referenced by PrimitivePatch< Face, FaceList, PointField, PointType >::checkPointManifold(), and triSurfaceTools::getVertexTriangles().

Here is the caller graph for this function:

const Foam::List< Face > & localFaces (  )  const [inline]

Return patch faces addressing into local point list.

Definition at line 358 of file PrimitivePatch.C.

Referenced by PatchTools::checkOrientation(), triSurfaceTools::classify(), PatchTools::edgeOwner(), PatchTools::sortedEdgeFaces(), and PatchTools::subsetMap().

Here is the caller graph for this function:

const Foam::Map< Foam::label > & meshPointMap (  )  const [inline]

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

location in the patch

Definition at line 400 of file PrimitivePatch.C.

Referenced by PrimitivePatch< Face, FaceList, PointField, PointType >::whichPoint().

Here is the caller graph for this function:

const Foam::Field< PointType > & localPoints (  )  const [inline]

Return pointField of points in patch.

Definition at line 421 of file PrimitivePatch.C.

Referenced by PatchTools::checkOrientation(), triSurfaceTools::minEdge(), surfaceFeatures::nearestEdges(), PatchTools::sortedEdgeFaces(), and surfaceLocation::write().

Here is the caller graph for this function:

const Foam::labelList & localPointOrder (  )  const [inline]

Return orders the local points for most efficient search.

Definition at line 442 of file PrimitivePatch.C.

Referenced by PrimitivePatch< Face, FaceList, PointField, PointType >::projectPoints().

Here is the caller graph for this function:

Foam::label whichPoint ( const label  gp  )  const [inline]

Given a global point index, return the local point index.

If the point is not found, return -1

Definition at line 464 of file PrimitivePatch.C.

References HashTable< T, Key, Hash >::find(), and PrimitivePatch< Face, FaceList, PointField, PointType >::meshPointMap().

Here is the call graph for this function:

Foam::label whichEdge ( const edge &  e  )  const [inline]

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 173 of file PrimitivePatchMeshEdges.C.

References PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), PrimitivePatch< Face, FaceList, PointField, PointType >::pointEdges(), and edge::start().

Here is the call graph for this function:

Foam::labelList meshEdges ( const edgeList &  allEdges,
const labelListList &  cellEdges,
const labelList &  faceCells 
) const [inline]

Return labels of patch edges in the global edge list using.

cell addressing

Definition at line 37 of file PrimitivePatchMeshEdges.C.

References PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), Foam::endl(), forAll, Foam::Info, and PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints().

Referenced by PrimitivePatch< Face, FaceList, PointField, PointType >::meshEdges().

Here is the call graph for this function:

Here is the caller graph for this function:

Foam::labelList meshEdges ( const edgeList &  allEdges,
const labelListList &  pointEdges 
) const [inline]

const Foam::Field< PointType > & faceNormals (  )  const [inline]

Return face normals for patch.

Definition at line 492 of file PrimitivePatch.C.

Referenced by PatchTools::checkOrientation(), and surfaceLocation::normal().

Here is the caller graph for this function:

const Foam::Field< PointType > & pointNormals (  )  const [inline]

Return point normals for patch.

Definition at line 513 of file PrimitivePatch.C.

Referenced by surfaceLocation::normal().

Here is the caller graph for this function:

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

const Foam::labelListList & edgeLoops (  )  const [inline]

Return list of closed loops of boundary vertices.

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

Definition at line 172 of file PrimitivePatchEdgeLoops.C.

Foam::PrimitivePatch< Face, FaceList, PointField, PointType >::surfaceTopo surfaceType (  )  const [inline]

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 118 of file PrimitivePatchCheck.C.

References PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), Foam::endl(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::ILLEGAL, Foam::Info, PrimitivePatch< Face, FaceList, PointField, PointType >::MANIFOLD, PrimitivePatch< Face, FaceList, PointField, PointType >::OPEN, and List< T >::size().

Referenced by PrimitivePatch< Face, FaceList, PointField, PointType >::checkTopology().

Here is the call graph for this function:

Here is the caller graph for this function:

bool checkPointManifold ( const bool  report = false,
labelHashSet *  setPtr = NULL 
) const [inline]

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 244 of file PrimitivePatchCheck.C.

References PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), Foam::endl(), Foam::findIndex(), forAll, Foam::Info, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), Foam::nl, PrimitivePatch< Face, FaceList, PointField, PointType >::pointEdges(), and PrimitivePatch< Face, FaceList, PointField, PointType >::pointFaces().

Here is the call graph for this function:

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

Correct patch after moving points.

Definition at line 164 of file PrimitivePatch.C.

References PrimitivePatch< Face, FaceList, PointField, PointType >::clearGeom(), Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

void operator= ( const PrimitivePatch< Face, FaceList, PointField, PointType > &  pp  )  [inline]

Assignment.

Definition at line 537 of file PrimitivePatch.C.


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