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

PatchTools Class Reference

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

#include <OpenFOAM/PatchTools.H>


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 56 of file PatchTools.H.

List of all members.

Static Public Member Functions

template<class Face , template< class > class FaceList, class PointField , class PointType >
static bool  checkOrientation (const PrimitivePatch< Face, FaceList, PointField, PointType > &, const bool report=false, labelHashSet *marked=0)
 Check for orientation issues.
template<class BoolListType , class Face , template< class > class FaceList, class PointField , class PointType >
static void  markZone (const PrimitivePatch< Face, FaceList, PointField, PointType > &, const BoolListType &borderEdge, const label faceI, const label currentZone, labelList &faceZone)
 Fill faceZone with currentZone for every face reachable.
template<class BoolListType , class Face , template< class > class FaceList, class PointField , class PointType >
static label  markZones (const PrimitivePatch< Face, FaceList, PointField, PointType > &, const BoolListType &borderEdge, labelList &faceZone)
 Size and fills faceZone with zone of face.
template<class BoolListType , class Face , template< class > class FaceList, class PointField , class PointType >
static void  subsetMap (const PrimitivePatch< Face, FaceList, PointField, PointType > &, const BoolListType &includeFaces, labelList &pointMap, labelList &faceMap)
 Determine the mapping for a sub-patch.
template<class Face , template< class > class FaceList, class PointField , class PointType >
static labelListList  sortedEdgeFaces (const PrimitivePatch< Face, FaceList, PointField, PointType > &)
 Return edge-face addressing sorted by angle around the edge.
template<class Face , template< class > class FaceList, class PointField , class PointType >
static labelList  edgeOwner (const PrimitivePatch< Face, FaceList, PointField, PointType > &)
 If 2 face neighbours: label of face where ordering of edge.

Member Function Documentation

void markZone ( const PrimitivePatch< Face, FaceList, PointField, PointType > &   p,
const BoolListType &   borderEdge,
const label   faceI,
const label   currentZone,
labelList &   faceZone  
) [static]

Fill faceZone with currentZone for every face reachable.

from faceI without crossing edge marked in borderEdge. Note: faceZone has to be sized nFaces before calling.

Definition at line 46 of file PatchToolsSearch.C.

References Foam::abort(), List< T >::append(), PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::faceEdges(), Foam::FatalError, FatalErrorIn, forAll, List< T >::size(), and List< T >::transfer().

Foam::label markZones ( const PrimitivePatch< Face, FaceList, PointField, PointType > &   p,
const BoolListType &   borderEdge,
labelList &   faceZone  
) [static]

Size and fills faceZone with zone of face.

Zone is area reachable by edge crossing without crossing borderEdge. Returns number of zones.

Definition at line 130 of file PatchToolsSearch.C.

References List< T >::setSize(), and List< T >::size().

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

Determine the mapping for a sub-patch.

Only include faces for which bool-list entry is true.

Parameters:
[in]includeFacesfaces to include
[out]pointMapmapping new to old localPoints
[out]faceMapmapping new to old faces

Definition at line 173 of file PatchToolsSearch.C.

References f(), forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::nPoints(), List< T >::setSize(), and List< T >::size().

Referenced by UnsortedMeshedSurface< Face >::subsetMesh(), and MeshedSurface< Face >::subsetMesh().

Foam::labelList edgeOwner ( const PrimitivePatch< Face, FaceList, PointField, PointType > &   p  ) [static]

If 2 face neighbours: label of face where ordering of edge.

is consistent with righthand walk. If 1 neighbour: label of only face. If >2 neighbours: undetermined.

Definition at line 40 of file PatchToolsEdgeOwner.C.

References Foam::abort(), PrimitivePatch< Face, FaceList, PointField, PointType >::edgeFaces(), PrimitivePatch< Face, FaceList, PointField, PointType >::edges(), f(), Foam::FatalError, FatalErrorIn, forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), Foam::nl, and List< T >::size().


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