Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes
localPointRegion Class Reference

Takes mesh with 'baffles' (= boundary faces sharing points). Determines for selected points on boundary faces the 'point region' it is connected to. Each region can be visited by a cell-face-cell walk. Used in duplicating points after splitting baffles. More...

Collaboration diagram for localPointRegion:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("localPointRegion")
 Runtime type information. More...
 
 localPointRegion (const polyMesh &mesh)
 Construct from mesh. Assumes all non-coupled boundary points. More...
 
 localPointRegion (const polyMesh &mesh, const labelList &candidatePoints)
 Construct from mesh and candidate points for duplication. More...
 
 localPointRegion (const polyMesh &mesh, const labelPairList &baffles, const labelList &candidatePoints)
 Construct from mesh and candidate points for duplication. More...
 
const Map< label > & meshPointMap () const
 Per point that is to be duplicated the local index. More...
 
const labelListListpointRegions () const
 Per local point the regions it is in. More...
 
const Map< label > & meshFaceMap () const
 Per face that uses a duplicated point the local index. More...
 
const faceListfaceRegions () const
 Per face the region of its points. More...
 
void updateMesh (const mapPolyMesh &)
 Force recalculation of locally stored data on topological change. More...
 

Static Public Member Functions

static labelList findDuplicateFaces (const primitiveMesh &, const labelList &)
 Helper routine to find baffles (two boundary faces using the. More...
 
static labelPairList findDuplicateFacePairs (const polyMesh &)
 Helper routine to find all baffles (two boundary faces. More...
 

Private Member Functions

void countPointRegions (const polyMesh &mesh, const boolList &candidatePoint, const Map< label > &candidateFace, faceList &minRegion)
 Given minimum cell the points on a face are connected to. More...
 
void calcPointRegions (const polyMesh &mesh, const labelPairList &baffles, boolList &candidatePoint)
 Do all: calculate points that need to be duplicated. More...
 

Static Private Member Functions

static bool isDuplicate (const face &f0, const face &f1, const bool forward)
 Check if two faces are equal. If forward = false checks f1 in. More...
 

Private Attributes

Map< labelmeshPointMap_
 Per point that is to duplicated to the local index. More...
 
labelListList pointRegions_
 Per local point the regions it is in. More...
 
Map< labelmeshFaceMap_
 Per face that uses a duplicated point the local index. More...
 
faceList faceRegions_
 Per face the region of its points. More...
 

Detailed Description

Takes mesh with 'baffles' (= boundary faces sharing points). Determines for selected points on boundary faces the 'point region' it is connected to. Each region can be visited by a cell-face-cell walk. Used in duplicating points after splitting baffles.

Regions are not consecutive per processor. They will be -1..nRegions_.

Note: coupled boundaries (cyclics, parallel) not fully tested.

Source files

Definition at line 67 of file localPointRegion.H.

Constructor & Destructor Documentation

◆ localPointRegion() [1/3]

localPointRegion ( const polyMesh mesh)

Construct from mesh. Assumes all non-coupled boundary points.

are candidates for duplication

Definition at line 459 of file localPointRegion.C.

References localPointRegion::calcPointRegions(), forAll, mesh, PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), and patches.

Here is the call graph for this function:

◆ localPointRegion() [2/3]

localPointRegion ( const polyMesh mesh,
const labelList candidatePoints 
)

Construct from mesh and candidate points for duplication.

Definition at line 490 of file localPointRegion.C.

References forAll, mesh, and primitiveMesh::nPoints().

Here is the call graph for this function:

◆ localPointRegion() [3/3]

localPointRegion ( const polyMesh mesh,
const labelPairList baffles,
const labelList candidatePoints 
)

Construct from mesh and candidate points for duplication.

Definition at line 513 of file localPointRegion.C.

References forAll, mesh, and primitiveMesh::nPoints().

Here is the call graph for this function:

Member Function Documentation

◆ countPointRegions()

void countPointRegions ( const polyMesh mesh,
const boolList candidatePoint,
const Map< label > &  candidateFace,
faceList minRegion 
)
private

Given minimum cell the points on a face are connected to.

determine the points to be duplicated.

Definition at line 107 of file localPointRegion.C.

References Foam::abort(), DynamicList::append(), List::clear(), Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, forAllConstIter(), mesh, List::setSize(), DynamicList::shrink(), and List::size().

Here is the call graph for this function:

◆ calcPointRegions()

void calcPointRegions ( const polyMesh mesh,
const labelPairList baffles,
boolList candidatePoint 
)
private

Do all: calculate points that need to be duplicated.

Definition at line 248 of file localPointRegion.C.

References List::clear(), f(), f1, forAll, forAllConstIter(), mesh, Foam::min(), Foam::returnReduce(), List::setSize(), and globalIndex::toGlobal().

Referenced by localPointRegion::localPointRegion().

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

◆ isDuplicate()

bool isDuplicate ( const face f0,
const face f1,
const bool  forward 
)
staticprivate

Check if two faces are equal. If forward = false checks f1 in.

reverse order.

Definition at line 67 of file localPointRegion.C.

References f1, Foam::findIndex(), forAll, and List::size().

Here is the call graph for this function:

◆ ClassName()

ClassName ( "localPointRegion"  )

Runtime type information.

◆ findDuplicateFaces()

Foam::labelList findDuplicateFaces ( const primitiveMesh mesh,
const labelList boundaryFaces 
)
static

Helper routine to find baffles (two boundary faces using the.

same points but in reverse order) Gets list of (boundary!) faces to check. Returns labelList of same size as the input list with -1 or index of other face in the input list. Does not handle duplicate faces on both sides of processor patch

Definition at line 541 of file localPointRegion.C.

References Foam::abort(), f(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, PrimitivePatch< Face, FaceList, PointField, PointType >::localFaces(), mesh, primitiveMesh::nInternalFaces(), Foam::nl, pFaces, PrimitivePatch< Face, FaceList, PointField, PointType >::pointFaces(), and polyMesh::points().

Referenced by meshRefinement::checkData(), and findBaffles().

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

◆ findDuplicateFacePairs()

Foam::List< Foam::labelPair > findDuplicateFacePairs ( const polyMesh mesh)
static

◆ meshPointMap()

const Map<label>& meshPointMap ( ) const
inline

Per point that is to be duplicated the local index.

Definition at line 173 of file localPointRegion.H.

References localPointRegion::meshPointMap_.

◆ pointRegions()

const labelListList& pointRegions ( ) const
inline

Per local point the regions it is in.

Definition at line 179 of file localPointRegion.H.

References localPointRegion::pointRegions_.

◆ meshFaceMap()

const Map<label>& meshFaceMap ( ) const
inline

Per face that uses a duplicated point the local index.

Definition at line 185 of file localPointRegion.H.

References localPointRegion::meshFaceMap_.

◆ faceRegions()

const faceList& faceRegions ( ) const
inline

Per face the region of its points.

Definition at line 191 of file localPointRegion.H.

References localPointRegion::faceRegions_.

◆ updateMesh()

void updateMesh ( const mapPolyMesh map)

Force recalculation of locally stored data on topological change.

Definition at line 680 of file localPointRegion.C.

References forAllConstIter(), mapPolyMesh::reverseFaceMap(), and mapPolyMesh::reversePointMap().

Here is the call graph for this function:

Field Documentation

◆ meshPointMap_

Map<label> meshPointMap_
private

Per point that is to duplicated to the local index.

Definition at line 75 of file localPointRegion.H.

Referenced by localPointRegion::meshPointMap().

◆ pointRegions_

labelListList pointRegions_
private

Per local point the regions it is in.

Definition at line 78 of file localPointRegion.H.

Referenced by localPointRegion::pointRegions().

◆ meshFaceMap_

Map<label> meshFaceMap_
private

Per face that uses a duplicated point the local index.

Definition at line 81 of file localPointRegion.H.

Referenced by localPointRegion::meshFaceMap().

◆ faceRegions_

faceList faceRegions_
private

Per face the region of its points.

Definition at line 84 of file localPointRegion.H.

Referenced by localPointRegion::faceRegions().


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