Public Member Functions | List of all members
undoableMeshCutter Class Reference

The main refinement handler. Gets cellCuts which is structure that describes which cells are to be cut and in what way. Maintains an undo list (if told so during construction). Apart from undo list is just wrapper around meshCutter. More...

Inheritance diagram for undoableMeshCutter:
Inheritance graph
[legend]
Collaboration diagram for undoableMeshCutter:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("undoableMeshCutter")
 
 undoableMeshCutter (const polyMesh &mesh, const bool undoable=true)
 
 ~undoableMeshCutter ()
 
const Map< splitCell * > & liveSplitCells () const
 
const removeFacesfaceRemover () const
 
void setRefinement (const cellCuts &cuts, polyTopoChange &)
 
void updateMesh (const mapPolyMesh &morphMap)
 
labelList getSplitFaces () const
 
Map< label > getAddedCells () const
 
labelList removeSplitFaces (const labelList &splitFaces, polyTopoChange &)
 
- Public Member Functions inherited from meshCutter
 ClassName ("meshCutter")
 
 meshCutter (const polyMesh &mesh)
 
 ~meshCutter ()=default
 
void setRefinement (const cellCuts &cuts, polyTopoChange &meshMod)
 
void updateMesh (const mapPolyMesh &)
 
const Map< label > & addedCells () const
 
const Map< label > & addedFaces () const
 
const EdgeMap< label > & addedPoints () const
 
- Public Member Functions inherited from edgeVertex
 edgeVertex (const polyMesh &mesh)
 
const polyMeshmesh () const
 
bool isEdge (const label eVert) const
 
label getEdge (const label eVert) const
 
label getVertex (const label eVert) const
 
label vertToEVert (const label vertI) const
 
label edgeToEVert (const label edgeI) const
 
point coord (const label cut, const scalar weight) const
 
label cutPairToEdge (const label cut0, const label cut1) const
 
OstreamwriteCut (Ostream &os, const label cut, const scalar) const
 
OstreamwriteCuts (Ostream &os, const labelList &, const scalarField &) const
 

Additional Inherited Members

- Static Public Member Functions inherited from edgeVertex
static void updateLabels (const labelList &map, List< refineCell > &)
 
static void updateLabels (const labelList &map, Map< label > &)
 
static void updateLabels (const labelList &map, labelHashSet &)
 
static bool isEdge (const primitiveMesh &mesh, const label eVert)
 
static label getEdge (const primitiveMesh &mesh, const label eVert)
 
static label getVertex (const primitiveMesh &mesh, const label eVert)
 
static label vertToEVert (const primitiveMesh &mesh, const label vertI)
 
static label edgeToEVert (const primitiveMesh &mesh, const label edgeI)
 
static point coord (const primitiveMesh &, const label cut, const scalar weight)
 
static label cutPairToEdge (const primitiveMesh &, const label cut0, const label cut1)
 

Detailed Description

The main refinement handler. Gets cellCuts which is structure that describes which cells are to be cut and in what way. Maintains an undo list (if told so during construction). Apart from undo list is just wrapper around meshCutter.

Undo list: contains a refinement tree (of type splitCell; cell labels are of no consequence) and a list of visible splitCells, i.e. the top of the tree (where the cell labels are valid). Now every cell added gets put on the tree and every updateMesh action updates the labels of visible splitcells.

We can now ask this structure for a list of visible split cells or the list of faces between these. These can be passed to removeFaces for actual deletion and we delete the top splitCell and update the now newly visible underlying cells for the new cell number (passed back from removeFaces).

NOTE: Undoing note properly tested. Expect it to fail if the faces to be removed cause other faces to be additionally removed (i.e. removeFaces adds additional faces to remove).

splitCell:

Source files

Definition at line 89 of file undoableMeshCutter.H.

Constructor & Destructor Documentation

◆ undoableMeshCutter()

undoableMeshCutter ( const polyMesh mesh,
const bool  undoable = true 
)
explicit

Definition at line 171 of file undoableMeshCutter.C.

◆ ~undoableMeshCutter()

Definition at line 189 of file undoableMeshCutter.C.

References forAllIters, splitCell::getOther(), and splitCell::parent().

Here is the call graph for this function:

Member Function Documentation

◆ ClassName()

ClassName ( "undoableMeshCutter"  )

◆ liveSplitCells()

const Map<splitCell*>& liveSplitCells ( ) const
inline

Definition at line 161 of file undoableMeshCutter.H.

◆ faceRemover()

const removeFaces& faceRemover ( ) const
inline

Definition at line 166 of file undoableMeshCutter.H.

◆ setRefinement()

void setRefinement ( const cellCuts cuts,
polyTopoChange meshMod 
)

◆ updateMesh()

void updateMesh ( const mapPolyMesh morphMap)

Definition at line 316 of file undoableMeshCutter.C.

References mapPolyMesh::reverseCellMap(), and meshCutter::updateMesh().

Here is the call graph for this function:

◆ getSplitFaces()

Foam::labelList getSplitFaces ( ) const

◆ getAddedCells()

Foam::Map< Foam::label > getAddedCells ( ) const

◆ removeSplitFaces()

Foam::labelList removeSplitFaces ( const labelList splitFaces,
polyTopoChange meshMod 
)

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