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...
Public Member Functions | |
ClassName ("undoableMeshCutter") | |
undoableMeshCutter (const polyMesh &mesh, const bool undoable=true) | |
~undoableMeshCutter () | |
const Map< splitCell * > & | liveSplitCells () const |
const removeFaces & | faceRemover () 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 &) |
![]() | |
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 |
![]() | |
edgeVertex (const polyMesh &mesh) | |
const polyMesh & | mesh () 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 |
Ostream & | writeCut (Ostream &os, const label cut, const scalar) const |
Ostream & | writeCuts (Ostream &os, const labelList &, const scalarField &) const |
Additional Inherited Members | |
![]() | |
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) |
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).
Definition at line 89 of file undoableMeshCutter.H.
|
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().
ClassName | ( | "undoableMeshCutter" | ) |
Definition at line 161 of file undoableMeshCutter.H.
|
inline |
Definition at line 166 of file undoableMeshCutter.H.
void setRefinement | ( | const cellCuts & | cuts, |
polyTopoChange & | meshMod | ||
) |
Definition at line 224 of file undoableMeshCutter.C.
References Foam::abort(), Foam::expressions::patchExpr::debug, Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAllConstIters(), splitCell::master(), Foam::Pout, meshCutter::setRefinement(), and splitCell::slave().
void updateMesh | ( | const mapPolyMesh & | morphMap | ) |
Definition at line 316 of file undoableMeshCutter.C.
References mapPolyMesh::reverseCellMap(), and meshCutter::updateMesh().
Foam::labelList getSplitFaces | ( | ) | const |
Definition at line 334 of file undoableMeshCutter.C.
References Foam::abort(), DynamicList::append(), splitCell::cellLabel(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAllConstIters(), splitCell::getOther(), Foam::meshTools::getSharedFace(), splitCell::isMaster(), splitCell::isUnrefined(), mesh, splitCell::parent(), and DynamicList::shrink().
Foam::Map< Foam::label > getAddedCells | ( | ) | const |
Definition at line 393 of file undoableMeshCutter.C.
References Foam::abort(), splitCell::cellLabel(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAllConstIters(), splitCell::getOther(), splitCell::isMaster(), splitCell::isUnrefined(), and splitCell::parent().
Foam::labelList removeSplitFaces | ( | const labelList & | splitFaces, |
polyTopoChange & | meshMod | ||
) |
important: Redo search since ownFind entry deleted.
Definition at line 440 of file undoableMeshCutter.C.
References Foam::abort(), splitCell::cellLabel(), Foam::expressions::patchExpr::debug, Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), Foam::FatalError, FatalErrorInFunction, forAll, splitCell::isUnrefined(), mesh, splitCell::parent(), and Foam::Pout.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.