FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

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

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

#include <OpenFOAM/PrimitivePatch_.H>


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 88 of file PrimitivePatch_.H.

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 > &  faceCentres () const
 Return face centres for patch.
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.

Member Typedef Documentation

typedef Face FaceType

Definition at line 98 of file PrimitivePatch_.H.

typedef FaceList<Face> FaceListType

Definition at line 99 of file PrimitivePatch_.H.

typedef PointField PointFieldType

Definition at line 100 of file PrimitivePatch_.H.


Member Enumeration Documentation

Enumeration defining the surface type. Used in check routines.

Enumerator:
MANIFOLD 
OPEN 
ILLEGAL 

Definition at line 106 of file PrimitivePatch_.H.


Constructor & Destructor Documentation

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

Construct from components.

Definition at line 39 of file PrimitivePatch_.C.

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

Construct from components, reuse storage.

Definition at line 75 of file PrimitivePatch_.C.

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

Construct as copy.

Definition at line 112 of file PrimitivePatch_.C.

~PrimitivePatch (  ) [virtual]

Definition at line 149 of file PrimitivePatch_.C.


Member Function Documentation

void clearOut (  )

Reimplemented in distributedTriSurfaceMesh, triSurfaceMesh, surfMesh, and triSurface.

Definition at line 132 of file PrimitivePatchClear.C.

Referenced by processorPolyPatch::updateMesh().

void clearGeom (  )

Reimplemented in surfMesh.

Definition at line 41 of file PrimitivePatchClear.C.

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

void clearTopology (  )

Reimplemented in triSurface.

Definition at line 66 of file PrimitivePatchClear.C.

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

void clearPatchMeshAddr (  )

Reimplemented in triSurface.

Definition at line 107 of file PrimitivePatchClear.C.

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

bool isInternalEdge ( const label   edgeI  ) const [inline]

Is internal edge?

Definition at line 308 of file PrimitivePatch_.H.

const Foam::labelList & boundaryPoints (  ) const

Return list of boundary points,.

address into LOCAL point list

Definition at line 232 of file PrimitivePatch_.C.

const Foam::labelListList & faceFaces (  ) const

Return face-face addressing.

Definition at line 252 of file PrimitivePatch_.C.

Referenced by cellDistFuncs::getPointNeighbours().

const Foam::Map< Foam::label > & meshPointMap (  ) const

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

location in the patch

Definition at line 392 of file PrimitivePatch_.C.

Referenced by autoSnapDriver::getZoneSurfacePoints().

const Foam::labelList & localPointOrder (  ) const

Return orders the local points for most efficient search.

Definition at line 432 of file PrimitivePatch_.C.

Foam::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 453 of file PrimitivePatch_.C.

References HashTable< T, Key, Hash >::find().

Referenced by slidingInterface::modifyMotionPoints().

Foam::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 175 of file PrimitivePatchMeshEdges.C.

References forAll, nPoints, and edge::start().

Referenced by slidingInterface::modifyMotionPoints().

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

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

cell addressing

Definition at line 41 of file PrimitivePatchMeshEdges.C.

References Foam::endl(), forAll, Foam::Info, and List< T >::size().

Referenced by polyPatch::meshEdges().

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

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

basic edge addressing.

Definition at line 118 of file PrimitivePatchMeshEdges.C.

References Foam::endl(), forAll, Foam::Info, and List< T >::size().

const Foam::Field< PointType > & faceCentres (  ) const

Return face centres for patch.

Reimplemented in polyPatch.

Definition at line 480 of file PrimitivePatch_.C.

const Foam::Field< PointType > & pointNormals (  ) const
Foam::List< Foam::objectHit > projectPoints ( const ToPatch &   targetPatch,
const Field< PointType > &   projectionDirection,
const intersection::algorithm   alg = intersection::FULL_RAY,
const intersection::direction   dir = intersection::VECTOR  
) const
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
const Foam::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 176 of file PrimitivePatchEdgeLoops.C.

Referenced by combineFaces::getOutsideFace().

Foam::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 123 of file PrimitivePatchCheck.C.

References Foam::endl(), forAll, Foam::Info, and List< T >::size().

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

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

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

Definition at line 177 of file PrimitivePatchCheck.C.

References edge::end(), Foam::endl(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), List< T >::size(), and edge::start().

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

References Foam::endl(), Foam::findIndex(), forAll, Foam::Info, HashSet< Key, Hash >::insert(), Foam::nl, and List< T >::size().

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

Correct patch after moving points.

Definition at line 167 of file PrimitivePatch_.C.

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

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

Assignment.

Definition at line 543 of file PrimitivePatch_.C.

Referenced by polyPatch::operator=().


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