Public Member Functions | Static Public Member Functions | List of all members
PatchTools Class Reference

A collection of tools for searching, sorting PrimitivePatch information. More...

Public Member Functions

template<class FaceList , class PointField >
Foam::labelList edgeOwner (const PrimitivePatch< FaceList, PointField > &p)
 
template<class FaceList , class PointField >
Foam::tmp< Foam::pointFieldpointNormals (const polyMesh &mesh, const PrimitivePatch< FaceList, PointField > &p)
 
template<class FaceList , class PointField >
Foam::tmp< Foam::pointFieldedgeNormals (const polyMesh &mesh, const PrimitivePatch< FaceList, PointField > &p, const labelList &patchEdges, const labelList &coupledEdges)
 
template<class BoolListType , class FaceList , class PointField >
Foam::label markZones (const PrimitivePatch< FaceList, PointField > &p, const BoolListType &borderEdge, labelList &faceZone)
 
template<class FaceList , class PointField >
Foam::labelListList sortedEdgeFaces (const PrimitivePatch< FaceList, PointField > &p)
 
template<class FaceList , class PointField >
Foam::labelListList sortedPointEdges (const PrimitivePatch< FaceList, PointField > &p)
 

Static Public Member Functions

template<class FaceList , class PointField >
static bool checkOrientation (const PrimitivePatch< FaceList, PointField > &, const bool report=false, labelHashSet *marked=0)
 
template<class BoolListType , class FaceList , class PointField >
static void markZone (const PrimitivePatch< FaceList, PointField > &, const BoolListType &borderEdge, const label facei, const label currentZone, labelList &faceZone)
 
template<class BoolListType , class FaceList , class PointField >
static label markZones (const PrimitivePatch< FaceList, PointField > &, const BoolListType &borderEdge, labelList &faceZone)
 
template<class BoolListType , class FaceList , class PointField >
static void subsetMap (const PrimitivePatch< FaceList, PointField > &p, const BoolListType &includeFaces, labelList &pointMap, labelList &faceMap)
 
template<class FaceList , class PointField >
static void calcBounds (const PrimitivePatch< FaceList, PointField > &p, boundBox &bb, label &nPoints)
 
template<class FaceList , class PointField >
static labelListList sortedEdgeFaces (const PrimitivePatch< FaceList, PointField > &)
 
template<class FaceList , class PointField >
static labelListList sortedPointEdges (const PrimitivePatch< FaceList, PointField > &)
 
template<class FaceList , class PointField >
static labelList edgeOwner (const PrimitivePatch< FaceList, PointField > &)
 
template<class FaceList1 , class PointField1 , class FaceList2 , class PointField2 >
static void matchPoints (const PrimitivePatch< FaceList1, PointField1 > &p1, const PrimitivePatch< FaceList2, PointField2 > &p2, labelList &p1PointLabels, labelList &p2PointLabels)
 
template<class FaceList1 , class PointField1 , class FaceList2 , class PointField2 >
static void matchEdges (const PrimitivePatch< FaceList1, PointField1 > &p1, const PrimitivePatch< FaceList2, PointField2 > &p2, labelList &p1EdgeLabels, labelList &p2EdgeLabels, bitSet &sameOrientation)
 
template<class FaceList , class PointField >
static tmp< pointFieldpointNormals (const polyMesh &, const PrimitivePatch< FaceList, PointField > &)
 
template<class FaceList , class PointField >
static tmp< pointFieldedgeNormals (const polyMesh &, const PrimitivePatch< FaceList, PointField > &, const labelList &patchEdges, const labelList &coupledEdges)
 
template<class FaceList , class PointField >
static void gatherAndMerge (const scalar mergeDist, const PrimitivePatch< FaceList, PointField > &p, Field< typename PrimitivePatch< FaceList, PointField >::point_type > &mergedPoints, List< typename PrimitivePatch< FaceList, PointField >::face_type > &mergedFaces, labelList &pointMergeMap)
 
template<class FaceList >
static void gatherAndMerge (const polyMesh &mesh, const FaceList &faces, const labelList &meshPoints, const Map< label > &meshPointMap, labelList &pointToGlobal, labelList &uniqueMeshPointLabels, autoPtr< globalIndex > &globalPoints, autoPtr< globalIndex > &globalFaces, List< typename FaceList::value_type > &mergedFaces, pointField &mergedPoints)
 

Detailed Description

A collection of tools for searching, sorting PrimitivePatch information.

The class could also be extended to include more that just static methods.

Source files

Definition at line 65 of file PatchTools.H.

Member Function Documentation

◆ checkOrientation()

bool checkOrientation ( const PrimitivePatch< FaceList, PointField > &  p,
const bool  report = false,
labelHashSet marked = 0 
)
static

Definition at line 29 of file PatchToolsCheck.C.

References Foam::constant::electromagnetic::e, Foam::endl(), f(), forAll, Foam::Info, HashSet::insert(), Foam::nl, p, and p0.

Referenced by searchableSurfaces::checkNormalOrientation().

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

◆ markZone()

void markZone ( const PrimitivePatch< FaceList, PointField > &  p,
const BoolListType &  borderEdge,
const label  facei,
const label  currentZone,
labelList faceZone 
)
static

Definition at line 34 of file PatchToolsSearch.C.

References Foam::abort(), DynamicList::append(), Foam::FatalError, FatalErrorInFunction, forAll, p, and List::transfer().

Here is the call graph for this function:

◆ markZones() [1/2]

static label markZones ( const PrimitivePatch< FaceList, PointField > &  ,
const BoolListType &  borderEdge,
labelList faceZone 
)
static

Referenced by searchableSurfaces::checkNormalOrientation().

Here is the caller graph for this function:

◆ subsetMap()

void subsetMap ( const PrimitivePatch< FaceList, PointField > &  p,
const BoolListType &  includeFaces,
labelList pointMap,
labelList faceMap 
)
static

Definition at line 136 of file PatchToolsSearch.C.

References List::clear(), Foam::faceMap(), forAll, p, bitSet::set(), and bitSet::sortedToc().

Referenced by UnsortedMeshedSurface< Face >::subsetMeshMap(), triSurface::subsetMeshMap(), and MeshedSurface< Foam::face >::subsetMeshMap().

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

◆ calcBounds()

void calcBounds ( const PrimitivePatch< FaceList, PointField > &  p,
boundBox bb,
label &  nPoints 
)
static

Definition at line 172 of file PatchToolsSearch.C.

References boundBox::add(), f(), nPoints, p, points, and bitSet::set().

Referenced by triSurfaceMesh::edgeTree(), triSurfaceSearch::tree(), triSurfaceRegionSearch::treeByRegion(), and distributedTriSurfaceMesh::writeStats().

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

◆ sortedEdgeFaces() [1/2]

static labelListList sortedEdgeFaces ( const PrimitivePatch< FaceList, PointField > &  )
static

◆ sortedPointEdges() [1/2]

static labelListList sortedPointEdges ( const PrimitivePatch< FaceList, PointField > &  )
static

◆ edgeOwner() [1/2]

static labelList edgeOwner ( const PrimitivePatch< FaceList, PointField > &  )
static

◆ matchPoints()

void matchPoints ( const PrimitivePatch< FaceList1, PointField1 > &  p1,
const PrimitivePatch< FaceList2, PointField2 > &  p2,
labelList p1PointLabels,
labelList p2PointLabels 
)
static

◆ matchEdges()

void matchEdges ( const PrimitivePatch< FaceList1, PointField1 > &  p1,
const PrimitivePatch< FaceList2, PointField2 > &  p2,
labelList p1EdgeLabels,
labelList p2EdgeLabels,
bitSet sameOrientation 
)
static

◆ pointNormals() [1/2]

static tmp<pointField> pointNormals ( const polyMesh ,
const PrimitivePatch< FaceList, PointField > &   
)
static

◆ edgeNormals() [1/2]

static tmp<pointField> edgeNormals ( const polyMesh ,
const PrimitivePatch< FaceList, PointField > &  ,
const labelList patchEdges,
const labelList coupledEdges 
)
static

◆ gatherAndMerge() [1/2]

void gatherAndMerge ( const scalar  mergeDist,
const PrimitivePatch< FaceList, PointField > &  p,
Field< typename PrimitivePatch< FaceList, PointField >::point_type > &  mergedPoints,
List< typename PrimitivePatch< FaceList, PointField >::face_type > &  mergedFaces,
labelList pointMergeMap 
)
static

Definition at line 31 of file PatchToolsGatherAndMerge.C.

References f(), globalIndex::gather(), Foam::ListListOps::inplaceRenumber(), Foam::mergePoints(), p, globalIndex::sizes(), and List::transfer().

Referenced by mergedSurf::merge(), shortestPathSet::shortestPathSet(), and AMIWeights::writeWeightField().

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

◆ gatherAndMerge() [2/2]

void gatherAndMerge ( const polyMesh mesh,
const FaceList &  faces,
const labelList meshPoints,
const Map< label > &  meshPointMap,
labelList pointToGlobal,
labelList uniqueMeshPointLabels,
autoPtr< globalIndex > &  globalPoints,
autoPtr< globalIndex > &  globalFaces,
List< typename FaceList::value_type > &  mergedFaces,
pointField mergedPoints 
)
static

Definition at line 114 of file PatchToolsGatherAndMerge.C.

References f(), Foam::identity(), Foam::ListListOps::inplaceRenumber(), mesh, autoPtr::reset(), and List::setSize().

Here is the call graph for this function:

◆ edgeOwner() [2/2]

Foam::labelList edgeOwner ( const PrimitivePatch< FaceList, PointField > &  p)

Definition at line 29 of file PatchToolsEdgeOwner.C.

References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::nl, and p.

Here is the call graph for this function:

◆ pointNormals() [2/2]

Foam::tmp<Foam::pointField> pointNormals ( const polyMesh mesh,
const PrimitivePatch< FaceList, PointField > &  p 
)

◆ edgeNormals() [2/2]

Foam::tmp<Foam::pointField> edgeNormals ( const polyMesh mesh,
const PrimitivePatch< FaceList, PointField > &  p,
const labelList patchEdges,
const labelList coupledEdges 
)

◆ markZones() [2/2]

Foam::label markZones ( const PrimitivePatch< FaceList, PointField > &  p,
const BoolListType &  borderEdge,
labelList faceZone 
)

Definition at line 104 of file PatchToolsSearch.C.

References p, and List::setSize().

Here is the call graph for this function:

◆ sortedEdgeFaces() [2/2]

Foam::labelListList sortedEdgeFaces ( const PrimitivePatch< FaceList, PointField > &  p)

◆ sortedPointEdges() [2/2]

Foam::labelListList sortedPointEdges ( const PrimitivePatch< FaceList, PointField > &  p)

Definition at line 29 of file PatchToolsSortPoints.C.

References DynamicList::append(), DynamicList::clear(), edge::end(), Foam::endl(), forAll, Foam::nl, p, DynamicList::setCapacity(), edge::start(), and WarningInFunction.

Here is the call graph for this function:

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