Class containing mesh-to-mesh mapping information after a change in polyMesh topology. More...
#include <OpenFOAM/mapPolyMesh.H>
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
In the topology change points/faces/cells
All this information is nessecary to correctly map fields.
Note (*)
if the newly inflated face is a boundary face the list of faces will only be boundary faces; if the new face is an internal face they will only be internal faces.
Definition at line 159 of file mapPolyMesh.H.
Public Member Functions | |
mapPolyMesh (const polyMesh &mesh, const label nOldPoints, const label nOldFaces, const label nOldCells, const labelList &pointMap, const List< objectMap > &pointsFromPoints, const labelList &faceMap, const List< objectMap > &facesFromPoints, const List< objectMap > &facesFromEdges, const List< objectMap > &facesFromFaces, const labelList &cellMap, const List< objectMap > &cellsFromPoints, const List< objectMap > &cellsFromEdges, const List< objectMap > &cellsFromFaces, const List< objectMap > &cellsFromCells, const labelList &reversePointMap, const labelList &reverseFaceMap, const labelList &reverseCellMap, const labelHashSet &flipFaceFlux, const labelListList &patchPointMap, const labelListList &pointZoneMap, const labelListList &faceZonePointMap, const labelListList &faceZoneFaceMap, const labelListList &cellZoneMap, const pointField &preMotionPoints, const labelList &oldPatchStarts, const labelList &oldPatchNMeshPoints) | |
Construct from components.
| |
mapPolyMesh (const polyMesh &mesh, const label nOldPoints, const label nOldFaces, const label nOldCells, labelList &pointMap, List< objectMap > &pointsFromPoints, labelList &faceMap, List< objectMap > &facesFromPoints, List< objectMap > &facesFromEdges, List< objectMap > &facesFromFaces, labelList &cellMap, List< objectMap > &cellsFromPoints, List< objectMap > &cellsFromEdges, List< objectMap > &cellsFromFaces, List< objectMap > &cellsFromCells, labelList &reversePointMap, labelList &reverseFaceMap, labelList &reverseCellMap, labelHashSet &flipFaceFlux, labelListList &patchPointMap, labelListList &pointZoneMap, labelListList &faceZonePointMap, labelListList &faceZoneFaceMap, labelListList &cellZoneMap, pointField &preMotionPoints, labelList &oldPatchStarts, labelList &oldPatchNMeshPoints, const bool reUse) | |
Construct from components and optionally reuse storage.
| |
const polyMesh & | mesh () const |
Return polyMesh.
| |
label | nOldPoints () const |
Number of old points.
| |
label | nOldInternalFaces () const |
Number of old internal faces.
| |
label | nOldFaces () const |
Number of old faces.
| |
label | nOldCells () const |
Number of old cells.
| |
const labelList & | pointMap () const |
Old point map.
| |
const List< objectMap > & | pointsFromPointsMap () const |
Points originating from points.
| |
const labelList & | faceMap () const |
Old face map.
| |
const List< objectMap > & | facesFromPointsMap () const |
Faces inflated from points.
| |
const List< objectMap > & | facesFromEdgesMap () const |
Faces inflated from edges.
| |
const List< objectMap > & | facesFromFacesMap () const |
Faces originating from faces.
| |
const labelList & | cellMap () const |
Old cell map.
| |
const List< objectMap > & | cellsFromPointsMap () const |
Cells inflated from points.
| |
const List< objectMap > & | cellsFromEdgesMap () const |
Cells inflated from edges.
| |
const List< objectMap > & | cellsFromFacesMap () const |
Cells inflated from faces.
| |
const List< objectMap > & | cellsFromCellsMap () const |
Cells originating from cells.
| |
const labelList & | reversePointMap () const |
Reverse point map.
| |
label | mergedPoint (const label oldPointI) const |
If point is removed return point (on new mesh) it merged.
| |
const labelList & | reverseFaceMap () const |
Reverse face map.
| |
label | mergedFace (const label oldFaceI) const |
If face is removed return face (on new mesh) it merged into.
| |
const labelList & | reverseCellMap () const |
Reverse cell map.
| |
label | mergedCell (const label oldCellI) const |
If cell is removed return cell (on new mesh) it merged into.
| |
const labelHashSet & | flipFaceFlux () const |
Map of flipped face flux faces.
| |
const labelListList & | patchPointMap () const |
Patch point renumbering.
| |
const labelListList & | pointZoneMap () const |
Point zone renumbering.
| |
const labelListList & | faceZonePointMap () const |
Face zone point renumbering.
| |
const labelListList & | faceZoneFaceMap () const |
Face zone face renumbering.
| |
const labelListList & | cellZoneMap () const |
Cell zone renumbering.
| |
const pointField & | preMotionPoints () const |
Pre-motion point positions.
| |
bool | hasMotionPoints () const |
Has valid preMotionPoints?
| |
const labelList & | oldPatchSizes () const |
Return list of the old patch sizes.
| |
const labelList & | oldPatchStarts () const |
Return list of the old patch start labels.
| |
const labelList & | oldPatchNMeshPoints () const |
Return numbers of mesh points per old patch.
|
mapPolyMesh | ( | const polyMesh & | mesh, |
const label | nOldPoints, | ||
const label | nOldFaces, | ||
const label | nOldCells, | ||
const labelList & | pointMap, | ||
const List< objectMap > & | pointsFromPoints, | ||
const labelList & | faceMap, | ||
const List< objectMap > & | facesFromPoints, | ||
const List< objectMap > & | facesFromEdges, | ||
const List< objectMap > & | facesFromFaces, | ||
const labelList & | cellMap, | ||
const List< objectMap > & | cellsFromPoints, | ||
const List< objectMap > & | cellsFromEdges, | ||
const List< objectMap > & | cellsFromFaces, | ||
const List< objectMap > & | cellsFromCells, | ||
const labelList & | reversePointMap, | ||
const labelList & | reverseFaceMap, | ||
const labelList & | reverseCellMap, | ||
const labelHashSet & | flipFaceFlux, | ||
const labelListList & | patchPointMap, | ||
const labelListList & | pointZoneMap, | ||
const labelListList & | faceZonePointMap, | ||
const labelListList & | faceZoneFaceMap, | ||
const labelListList & | cellZoneMap, | ||
const pointField & | preMotionPoints, | ||
const labelList & | oldPatchStarts, | ||
const labelList & | oldPatchNMeshPoints | ||
) |
Construct from components.
Definition at line 37 of file mapPolyMesh.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, and Foam::min().
mapPolyMesh | ( | const polyMesh & | mesh, |
const label | nOldPoints, | ||
const label | nOldFaces, | ||
const label | nOldCells, | ||
labelList & | pointMap, | ||
List< objectMap > & | pointsFromPoints, | ||
labelList & | faceMap, | ||
List< objectMap > & | facesFromPoints, | ||
List< objectMap > & | facesFromEdges, | ||
List< objectMap > & | facesFromFaces, | ||
labelList & | cellMap, | ||
List< objectMap > & | cellsFromPoints, | ||
List< objectMap > & | cellsFromEdges, | ||
List< objectMap > & | cellsFromFaces, | ||
List< objectMap > & | cellsFromCells, | ||
labelList & | reversePointMap, | ||
labelList & | reverseFaceMap, | ||
labelList & | reverseCellMap, | ||
labelHashSet & | flipFaceFlux, | ||
labelListList & | patchPointMap, | ||
labelListList & | pointZoneMap, | ||
labelListList & | faceZonePointMap, | ||
labelListList & | faceZoneFaceMap, | ||
labelListList & | cellZoneMap, | ||
pointField & | preMotionPoints, | ||
labelList & | oldPatchStarts, | ||
labelList & | oldPatchNMeshPoints, | ||
const bool | reUse | ||
) |
Construct from components and optionally reuse storage.
Definition at line 122 of file mapPolyMesh.C.
References Foam::abort(), Foam::FatalError, FatalErrorIn, and Foam::min().
const polyMesh& mesh | ( | ) | const [inline]
|
Return polyMesh.
Definition at line 355 of file mapPolyMesh.H.
label nOldPoints | ( | ) | const [inline]
|
Number of old points.
Definition at line 361 of file mapPolyMesh.H.
Referenced by hexRef8::updateMesh().
label nOldInternalFaces | ( | ) | const [inline]
|
Number of old internal faces.
Definition at line 367 of file mapPolyMesh.H.
label nOldFaces | ( | ) | const [inline]
|
Number of old faces.
Definition at line 373 of file mapPolyMesh.H.
label nOldCells | ( | ) | const [inline]
|
Number of old cells.
Definition at line 379 of file mapPolyMesh.H.
Referenced by hexRef8::updateMesh().
const labelList& pointMap | ( | ) | const [inline]
|
Old point map.
Contains the old point label for all new points. For preserved points this is the old point label. For added points this is the master point ID
Definition at line 388 of file mapPolyMesh.H.
Referenced by pointMapper::pointMapper(), polyMesh::updateMesh(), displacementFvMotionSolver::updateMesh(), displacementComponentLaplacianFvMotionSolver::updateMesh(), and hexRef8::updateMesh().
Points originating from points.
Definition at line 394 of file mapPolyMesh.H.
Referenced by pointMapper::pointMapper().
const labelList& faceMap | ( | ) | const [inline]
|
Old face map.
Contains a list of old face labels for every new face. Warning: this map contains invalid entries for new faces
Definition at line 402 of file mapPolyMesh.H.
Referenced by faceMapper::faceMapper(), and meshRefinement::updateMesh().
Faces inflated from points.
Definition at line 408 of file mapPolyMesh.H.
Referenced by faceMapper::faceMapper().
Faces inflated from edges.
Definition at line 414 of file mapPolyMesh.H.
Referenced by faceMapper::faceMapper().
Faces originating from faces.
Definition at line 420 of file mapPolyMesh.H.
Referenced by faceMapper::faceMapper().
const labelList& cellMap | ( | ) | const [inline]
|
Old cell map.
Contains old cell label for all preserved cells.
Definition at line 427 of file mapPolyMesh.H.
Referenced by cellMapper::cellMapper(), fvMesh::mapFields(), refinementHistory::updateMesh(), and hexRef8::updateMesh().
Cells inflated from points.
Definition at line 433 of file mapPolyMesh.H.
Referenced by cellMapper::cellMapper().
Cells inflated from edges.
Definition at line 439 of file mapPolyMesh.H.
Referenced by cellMapper::cellMapper().
Cells inflated from faces.
Definition at line 445 of file mapPolyMesh.H.
Referenced by cellMapper::cellMapper().
Cells originating from cells.
Definition at line 451 of file mapPolyMesh.H.
Referenced by cellMapper::cellMapper().
const labelList& reversePointMap | ( | ) | const [inline]
|
Reverse point map.
Contains new point label for all old and added points
Definition at line 461 of file mapPolyMesh.H.
Referenced by pointZoneSet::updateMesh(), pointSet::updateMesh(), displacementFvMotionSolver::updateMesh(), displacementComponentLaplacianFvMotionSolver::updateMesh(), removePoints::updateMesh(), localPointRegion::updateMesh(), hexRef8::updateMesh(), duplicatePoints::updateMesh(), combineFaces::updateMesh(), addPatchCellLayer::updateMesh(), meshCutter::updateMesh(), meshCutAndRemove::updateMesh(), and boundaryCutter::updateMesh().
label mergedPoint | ( | const label | oldPointI ) | const [inline]
|
If point is removed return point (on new mesh) it merged.
into
Definition at line 468 of file mapPolyMesh.H.
References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorIn.
const labelList& reverseFaceMap | ( | ) | const [inline]
|
Reverse face map.
Contains new face label for all old and added faces
Definition at line 493 of file mapPolyMesh.H.
Referenced by Cloud< ParticleType >::autoMap(), faceZone::updateMesh(), faceZoneSet::updateMesh(), faceSet::updateMesh(), removePoints::updateMesh(), localPointRegion::updateMesh(), combineFaces::updateMesh(), addPatchCellLayer::updateMesh(), meshCutter::updateMesh(), meshCutAndRemove::updateMesh(), boundaryCutter::updateMesh(), and meshRefinement::updateMesh().
label mergedFace | ( | const label | oldFaceI ) | const [inline]
|
If face is removed return face (on new mesh) it merged into.
Definition at line 499 of file mapPolyMesh.H.
References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorIn.
const labelList& reverseCellMap | ( | ) | const [inline]
|
Reverse cell map.
Contains new cell label for all old and added cells
Definition at line 524 of file mapPolyMesh.H.
Referenced by Cloud< ParticleType >::autoMap(), cellZoneSet::updateMesh(), cellSet::updateMesh(), refinementHistory::updateMesh(), hexRef8::updateMesh(), undoableMeshCutter::updateMesh(), meshCutter::updateMesh(), and meshCutAndRemove::updateMesh().
label mergedCell | ( | const label | oldCellI ) | const [inline]
|
If cell is removed return cell (on new mesh) it merged into.
Definition at line 530 of file mapPolyMesh.H.
References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorIn.
Referenced by Cloud< ParticleType >::autoMap().
const labelHashSet& flipFaceFlux | ( | ) | const [inline]
|
Map of flipped face flux faces.
Definition at line 554 of file mapPolyMesh.H.
const labelListList& patchPointMap | ( | ) | const [inline]
|
Patch point renumbering.
For every preserved point on a patch give the old position. For added points, the index is set to -1
Definition at line 562 of file mapPolyMesh.H.
const labelListList& pointZoneMap | ( | ) | const [inline]
|
Point zone renumbering.
For every preserved point in zone give the old position. For added points, the index is set to -1
Definition at line 573 of file mapPolyMesh.H.
const labelListList& faceZonePointMap | ( | ) | const [inline]
|
Face zone point renumbering.
For every preserved point in zone give the old position. For added points, the index is set to -1
Definition at line 581 of file mapPolyMesh.H.
const labelListList& faceZoneFaceMap | ( | ) | const [inline]
|
Face zone face renumbering.
For every preserved face in zone give the old position. For added faces, the index is set to -1
Definition at line 589 of file mapPolyMesh.H.
const labelListList& cellZoneMap | ( | ) | const [inline]
|
Cell zone renumbering.
For every preserved cell in zone give the old position. For added cells, the index is set to -1
Definition at line 597 of file mapPolyMesh.H.
const pointField& preMotionPoints | ( | ) | const [inline]
|
Pre-motion point positions.
This specifies the correct way of blowing up zero-volume objects
Definition at line 605 of file mapPolyMesh.H.
Referenced by displacementFvMotionSolver::updateMesh(), and displacementComponentLaplacianFvMotionSolver::updateMesh().
bool hasMotionPoints | ( | ) | const [inline]
|
Has valid preMotionPoints?
Definition at line 611 of file mapPolyMesh.H.
References List< T >::size().
Referenced by displacementFvMotionSolver::updateMesh(), and displacementComponentLaplacianFvMotionSolver::updateMesh().
const labelList& oldPatchSizes | ( | ) | const [inline]
|
Return list of the old patch sizes.
Definition at line 618 of file mapPolyMesh.H.
const labelList& oldPatchStarts | ( | ) | const [inline]
|
Return list of the old patch start labels.
Definition at line 624 of file mapPolyMesh.H.
const labelList& oldPatchNMeshPoints | ( | ) | const [inline]
|
Return numbers of mesh points per old patch.
Definition at line 630 of file mapPolyMesh.H.