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...
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 labelListList & | pointRegions () 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 faceList & | faceRegions () 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< label > | meshPointMap_ |
Per point that is to duplicated to the local index. More... | |
labelListList | pointRegions_ |
Per local point the regions it is in. More... | |
Map< label > | meshFaceMap_ |
Per face that uses a duplicated point the local index. More... | |
faceList | faceRegions_ |
Per face the region of its points. More... | |
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.
Definition at line 67 of file localPointRegion.H.
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.
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().
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().
|
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().
|
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().
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().
ClassName | ( | "localPointRegion" | ) |
Runtime type information.
|
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().
|
static |
Helper routine to find all baffles (two boundary faces.
using the same points but in reverse order)
Definition at line 620 of file localPointRegion.C.
References Foam::abort(), DynamicList::append(), polyMesh::boundaryMesh(), primitiveMesh::faceCentres(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::identity(), mesh, primitiveMesh::nFaces(), primitiveMesh::nInternalFaces(), Foam::nl, patches, DynamicList::shrink(), and List::size().
Referenced by preserveBafflesConstraint::add(), autoLayerDriver::addLayers(), preserveBafflesConstraint::apply(), meshRefinement::balance(), autoSnapDriver::doSnap(), autoSnapDriver::getInternalOrBaffleDuplicateFace(), autoLayerDriver::mergePatchFacesUndo(), and displacementMeshMoverMotionSolver::meshMover().
Per point that is to be duplicated the local index.
Definition at line 173 of file localPointRegion.H.
References localPointRegion::meshPointMap_.
|
inline |
Per local point the regions it is in.
Definition at line 179 of file localPointRegion.H.
References localPointRegion::pointRegions_.
Per face that uses a duplicated point the local index.
Definition at line 185 of file localPointRegion.H.
References localPointRegion::meshFaceMap_.
|
inline |
Per face the region of its points.
Definition at line 191 of file localPointRegion.H.
References localPointRegion::faceRegions_.
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().
Per point that is to duplicated to the local index.
Definition at line 75 of file localPointRegion.H.
Referenced by localPointRegion::meshPointMap().
|
private |
Per local point the regions it is in.
Definition at line 78 of file localPointRegion.H.
Referenced by localPointRegion::pointRegions().
Per face that uses a duplicated point the local index.
Definition at line 81 of file localPointRegion.H.
Referenced by localPointRegion::meshFaceMap().
|
private |
Per face the region of its points.
Definition at line 84 of file localPointRegion.H.
Referenced by localPointRegion::faceRegions().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.