Cuts (splits) cells. More...
#include <dynamicMesh/meshCutter.H>
Cuts (splits) cells.
Description of cut is given as a loop of 'cuts' per cell (see cellCuts). setRefinement() takes this cut description and inserts the nessecary topoActions (add points/faces/cells) into the polyTopoChange.
Stores added cells/faces/points.
Cut description gives orientation to cut by calculating 'anchorPoints'. The side of the cell that contains the anchorPoints is the master cell. Likewise the cells' edges will have the split added as a duplicate of the master (anchor) point. Think of it as the cell with the anchor points at the bottom. Add a face at the bottom to split the cell and then sweep this face up to be through the middle of the cell (inflation).
+-------+ | + | + | + | + | + | + | + +-------+ anchor anchor
+-------+ | + | + | + <- addedCell | + | + | + +-------+ <- splitFace +-------+ <- original cell anchor anchor
+-------+ | + | + <- addedCell | + +-------+ <- splitFace | + | + <- original cell | + +-------+ anchor anchor
Anyway this was the original idea. Inflation was meant to handle conservative properties distribution without interpolation. (just face sweeping through space). But problem was that only if the introduced splitface was exactly the same shape as bottom face (so same 2D topo or perfectly flat) the volume between them was 0.
This meshCutting still uses anchorPoints though:
Definition at line 135 of file meshCutter.H.
Public Member Functions | |
ClassName ("meshCutter") | |
Runtime type information.
| |
meshCutter (const polyMesh &mesh) | |
Construct from mesh.
| |
~meshCutter () | |
void | setRefinement (const cellCuts &cuts, polyTopoChange &meshMod) |
Do actual cutting with cut description. Inserts mesh changes.
| |
void | updateMesh (const mapPolyMesh &) |
Force recalculation of locally stored data on topological change.
| |
const Map< label > & | addedCells () const |
Cells added. Per split cell label of added cell.
| |
const Map< label > & | addedFaces () const |
Faces added. Per split cell label of added face.
| |
const HashTable< label, edge, Hash< edge > > & | addedPoints () const |
Points added. Per split edge label of added point.
|
meshCutter | ( | const polyMesh & | mesh ) |
Construct from mesh.
Definition at line 532 of file meshCutter.C.
~meshCutter | ( | ) |
Definition at line 544 of file meshCutter.C.
ClassName | ( | "meshCutter" | ) |
Runtime type information.
void setRefinement | ( | const cellCuts & | cuts, |
polyTopoChange & | meshMod | ||
) |
Do actual cutting with cut description. Inserts mesh changes.
into meshMod.
Reimplemented in undoableMeshCutter.
Definition at line 551 of file meshCutter.C.
References Foam::abort(), HashTable< T, Key, Hash >::begin(), cellCuts::cellAnchorPoints(), cellCuts::cellLoops(), primitiveMesh::cells(), primitiveMesh::edgeFaces(), cellCuts::edgeIsCut(), primitiveMesh::edges(), cellCuts::edgeWeight(), HashTable< T, Key, Hash >::end(), edge::end(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), cellCuts::faceSplitCut(), Foam::FatalError, FatalErrorIn, forAll, mesh, Foam::nl, cellCuts::nLoops(), polyMesh::points(), Foam::Pout, polyTopoChange::setAction(), List< T >::size(), edge::start(), and v1.
Referenced by undoableMeshCutter::setRefinement().
void updateMesh | ( | const mapPolyMesh & | morphMap ) |
Force recalculation of locally stored data on topological change.
Reimplemented in undoableMeshCutter.
Definition at line 1011 of file meshCutter.C.
References HashTable< T, Key, Hash >::begin(), edge::end(), Foam::endl(), Foam::Pout, mapPolyMesh::reverseCellMap(), mapPolyMesh::reverseFaceMap(), mapPolyMesh::reversePointMap(), and edge::start().
Referenced by undoableMeshCutter::updateMesh().
const Map<label>& addedCells | ( | ) | const [inline]
|
Cells added. Per split cell label of added cell.
Definition at line 296 of file meshCutter.H.
const Map<label>& addedFaces | ( | ) | const [inline]
|
Faces added. Per split cell label of added face.
Definition at line 302 of file meshCutter.H.
Points added. Per split edge label of added point.
Definition at line 308 of file meshCutter.H.