polyTopoChangeMap Class Reference

Class containing mesh-to-mesh mapping information after a change in polyMesh topology. More...

Public Member Functions

 polyTopoChangeMap (const polyMesh &mesh)
 Construct from mesh only, no topology change. More...
 
 polyTopoChangeMap (const polyMesh &mesh, const label nOldPoints, const label nOldFaces, const label nOldCells, labelList &&pointMap, List< objectMap > &&pointsFromPoints, labelList &&faceMap, List< objectMap > &&facesFromFaces, labelList &&cellMap, List< objectMap > &&cellsFromCells, labelList &&reversePointMap, labelList &&reverseFaceMap, labelList &&reverseCellMap, labelHashSet &&flipFaceFlux, labelListList &&patchPointMap, labelList &&oldPatchSizes, labelList &&oldPatchStarts, labelList &&oldPatchNMeshPoints, autoPtr< scalarField > &&oldCellVolumesPtr)
 Construct from components reusing storage. More...
 
 polyTopoChangeMap (const polyTopoChangeMap &)=delete
 Disallow default bitwise copy construction. More...
 
const polyMeshmesh () const
 Return polyMesh. More...
 
label nOldPoints () const
 Number of old points. More...
 
label nOldInternalFaces () const
 Number of old internal faces. More...
 
label nOldFaces () const
 Number of old faces. More...
 
label nOldCells () const
 Number of old cells. More...
 
const labelListpointMap () const
 Old point map. More...
 
const List< objectMap > & pointsFromPointsMap () const
 Points originating from points. More...
 
const labelListfaceMap () const
 Old face map. More...
 
const List< objectMap > & facesFromFacesMap () const
 Faces originating from faces. More...
 
const labelListcellMap () const
 Old cell map. More...
 
const List< objectMap > & cellsFromCellsMap () const
 Cells originating from cells. More...
 
const labelListreversePointMap () const
 Reverse point map. More...
 
label mergedPoint (const label oldPointi) const
 If point is removed return point (on new mesh) it merged. More...
 
const labelListreverseFaceMap () const
 Reverse face map. More...
 
label mergedFace (const label oldFacei) const
 If face is removed return face (on new mesh) it merged into. More...
 
const labelListreverseCellMap () const
 Reverse cell map. More...
 
label mergedCell (const label oldCelli) const
 If cell is removed return cell (on new mesh) it merged into. More...
 
const labelHashSetflipFaceFlux () const
 Map of flipped face flux faces. More...
 
const labelListListpatchPointMap () const
 Patch point renumbering. More...
 
const labelListoldPatchSizes () const
 Return list of the old patch sizes. More...
 
const labelListoldPatchStarts () const
 Return list of the old patch start labels. More...
 
const labelListoldPatchNMeshPoints () const
 Return numbers of mesh points per old patch. More...
 
bool hasOldCellVolumes () const
 
const scalarFieldoldCellVolumes () const
 
void operator= (const polyTopoChangeMap &)=delete
 Disallow default bitwise assignment. More...
 

Detailed Description

Class containing mesh-to-mesh mapping information after a change in polyMesh topology.

General:

  • pointMap/faceMap/cellMap:
    from current mesh back to previous mesh. (so to 'pull' the information onto the current mesh)
  • reversePointMap/faceMap/cellMap:
    from previous mesh to current. (so to 'push' information)

In the topology change points/faces/cells

  • can be unchanged. (faces might be renumbered though)
  • can be removed (into nothing)
  • can be removed into/merged with existing same entity (so point merged with other point, face with other face, cell with other cell. Note that probably only cell with cell is relevant)
  • can be added from existing same 'master' entity (so point from point, face from face and cell from cell)
  • can be appended: added 'out of nothing'.

All this information is necessary to correctly map fields.

points
  • unchanged:
    • pointMap[pointi] contains old point label
    • reversePointMap[oldPointi] contains new point label
  • removed:
    • reversePointMap[oldPointi] contains -1
  • merged into point:
    • reversePointMap[oldPointi] contains <-1 : -newPointi-2
    • pointMap[pointi] contains the old master point label
    • pointsFromPoints gives for pointi all the old point labels (including the old master point!)
  • added-from-same:
    • pointMap[pointi] contains the old master point label
  • appended:
    • pointMap[pointi] contains -1
faces
  • unchanged:
    • faceMap[facei] contains old face label
    • reverseFaceMap[oldFacei] contains new face label
  • removed:
    • reverseFaceMap[oldFacei] contains -1
  • merged into face:
    • reverseFaceMap[oldFacei] contains <-1 : -newFacei-2
    • faceMap[facei] contains the old master face label
    • facesFromFaces gives for facei all the old face labels (including the old master face!)
  • added-from-same:
    • faceMap[facei] contains the old master face label
  • appended:
    • faceMap[facei] contains -1
cells
  • unchanged:
    • cellMap[celli] contains old cell label
    • reverseCellMap[oldCelli] contains new cell label
  • removed:
    • reverseCellMap[oldCelli] contains -1
  • merged into cell:
    • reverseCellMap[oldCelli] contains <-1 : -newCelli-2
    • cellMap[celli] contains the old master cell label
    • cellsFromCells gives for celli all the old cell labels (including the old master cell!)
  • added-from-same:
    • cellMap[celli] contains the old master cell label
  • appended:
    • cellMap[celli] contains -1
Source files

Definition at line 125 of file polyTopoChangeMap.H.

Constructor & Destructor Documentation

◆ polyTopoChangeMap() [1/3]

polyTopoChangeMap ( const polyMesh mesh)

Construct from mesh only, no topology change.

Definition at line 31 of file polyTopoChangeMap.C.

◆ polyTopoChangeMap() [2/3]

polyTopoChangeMap ( const polyMesh mesh,
const label  nOldPoints,
const label  nOldFaces,
const label  nOldCells,
labelList &&  pointMap,
List< objectMap > &&  pointsFromPoints,
labelList &&  faceMap,
List< objectMap > &&  facesFromFaces,
labelList &&  cellMap,
List< objectMap > &&  cellsFromCells,
labelList &&  reversePointMap,
labelList &&  reverseFaceMap,
labelList &&  reverseCellMap,
labelHashSet &&  flipFaceFlux,
labelListList &&  patchPointMap,
labelList &&  oldPatchSizes,
labelList &&  oldPatchStarts,
labelList &&  oldPatchNMeshPoints,
autoPtr< scalarField > &&  oldCellVolumesPtr 
)

Construct from components reusing storage.

Definition at line 40 of file polyTopoChangeMap.C.

◆ polyTopoChangeMap() [3/3]

polyTopoChangeMap ( const polyTopoChangeMap )
delete

Disallow default bitwise copy construction.

Member Function Documentation

◆ mesh()

◆ nOldPoints()

label nOldPoints ( ) const
inline

Number of old points.

Definition at line 246 of file polyTopoChangeMap.H.

Referenced by hexRef8::topoChange().

Here is the caller graph for this function:

◆ nOldInternalFaces()

label nOldInternalFaces ( ) const
inline

Number of old internal faces.

Definition at line 252 of file polyTopoChangeMap.H.

◆ nOldFaces()

label nOldFaces ( ) const
inline

Number of old faces.

Definition at line 258 of file polyTopoChangeMap.H.

Referenced by fvMesh::mapFields().

Here is the caller graph for this function:

◆ nOldCells()

label nOldCells ( ) const
inline

Number of old cells.

Definition at line 264 of file polyTopoChangeMap.H.

Referenced by fvMesh::mapFields(), and hexRef8::topoChange().

Here is the caller graph for this function:

◆ pointMap()

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 273 of file polyTopoChangeMap.H.

Referenced by pointMapper::pointMapper(), componentDisplacementMotionSolver::topoChange(), displacementLayeredMotionMotionSolver::topoChange(), solidBodyMotionSolver::topoChange(), polyMesh::topoChange(), hexRef8Data::topoChange(), rigidBodyMeshMotion::topoChange(), hexRef8::topoChange(), and pointZone::topoChange().

Here is the caller graph for this function:

◆ pointsFromPointsMap()

const List<objectMap>& pointsFromPointsMap ( ) const
inline

Points originating from points.

Definition at line 279 of file polyTopoChangeMap.H.

Referenced by pointMapper::pointMapper().

Here is the caller graph for this function:

◆ faceMap()

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 287 of file polyTopoChangeMap.H.

Referenced by faceMapper::faceMapper(), fvMesh::mapFields(), faceZone::topoChange(), and meshRefinement::topoChange().

Here is the caller graph for this function:

◆ facesFromFacesMap()

const List<objectMap>& facesFromFacesMap ( ) const
inline

Faces originating from faces.

Definition at line 293 of file polyTopoChangeMap.H.

Referenced by faceMapper::faceMapper().

Here is the caller graph for this function:

◆ cellMap()

const labelList& cellMap ( ) const
inline

Old cell map.

Contains old cell label for all preserved cells.

Definition at line 300 of file polyTopoChangeMap.H.

Referenced by cellMapper::cellMapper(), fvMesh::mapFields(), polyMesh::topoChange(), hexRef8Data::topoChange(), refinementHistory::topoChange(), hexRef8::topoChange(), and cellZone::topoChange().

Here is the caller graph for this function:

◆ cellsFromCellsMap()

const List<objectMap>& cellsFromCellsMap ( ) const
inline

Cells originating from cells.

Definition at line 306 of file polyTopoChangeMap.H.

Referenced by cellMapper::cellMapper().

Here is the caller graph for this function:

◆ reversePointMap()

◆ mergedPoint()

label mergedPoint ( const label  oldPointi) const
inline

If point is removed return point (on new mesh) it merged.

into

Definition at line 323 of file polyTopoChangeMap.H.

◆ reverseFaceMap()

◆ mergedFace()

label mergedFace ( const label  oldFacei) const
inline

If face is removed return face (on new mesh) it merged into.

Definition at line 354 of file polyTopoChangeMap.H.

References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ reverseCellMap()

const labelList& reverseCellMap ( ) const
inline

◆ mergedCell()

label mergedCell ( const label  oldCelli) const
inline

If cell is removed return cell (on new mesh) it merged into.

Definition at line 385 of file polyTopoChangeMap.H.

References Foam::abort(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ flipFaceFlux()

const labelHashSet& flipFaceFlux ( ) const
inline

Map of flipped face flux faces.

Definition at line 409 of file polyTopoChangeMap.H.

Referenced by faceZone::topoChange().

Here is the caller graph for this function:

◆ patchPointMap()

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 417 of file polyTopoChangeMap.H.

◆ oldPatchSizes()

const labelList& oldPatchSizes ( ) const
inline

Return list of the old patch sizes.

Definition at line 424 of file polyTopoChangeMap.H.

◆ oldPatchStarts()

const labelList& oldPatchStarts ( ) const
inline

Return list of the old patch start labels.

Definition at line 430 of file polyTopoChangeMap.H.

◆ oldPatchNMeshPoints()

const labelList& oldPatchNMeshPoints ( ) const
inline

Return numbers of mesh points per old patch.

Definition at line 436 of file polyTopoChangeMap.H.

◆ hasOldCellVolumes()

bool hasOldCellVolumes ( ) const
inline

Definition at line 444 of file polyTopoChangeMap.H.

References autoPtr< T >::valid().

Here is the call graph for this function:

◆ oldCellVolumes()

const scalarField& oldCellVolumes ( ) const
inline

Definition at line 449 of file polyTopoChangeMap.H.

◆ operator=()

void operator= ( const polyTopoChangeMap )
delete

Disallow default bitwise assignment.


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