Cuts (splits) cells. More...
Public Member Functions | |
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) |
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 necessary 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 134 of file meshCutter.H.
|
explicit |
Definition at line 502 of file meshCutter.C.
|
default |
ClassName | ( | "meshCutter" | ) |
void setRefinement | ( | const cellCuts & | cuts, |
polyTopoChange & | meshMod | ||
) |
Definition at line 515 of file meshCutter.C.
References Foam::abort(), cellCuts::cellAnchorPoints(), primitiveMesh::cellEdges(), cellCuts::cellLoops(), primitiveMesh::cells(), Foam::expressions::patchExpr::debug, Foam::constant::electromagnetic::e, primitiveMesh::edgeFaces(), cellCuts::edgeIsCut(), primitiveMesh::edges(), cellCuts::edgeWeight(), Foam::endl(), f(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), polyMesh::faces(), cellCuts::faceSplitCut(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIters(), mesh, Foam::nl, cellCuts::nLoops(), points, polyMesh::points(), Foam::Pout, Foam::returnReduce(), polyTopoChange::setAction(), syncTools::syncEdgeList(), and WarningInFunction.
Referenced by meshRefinement::directionalRefine(), and undoableMeshCutter::setRefinement().
void updateMesh | ( | const mapPolyMesh & | morphMap | ) |
Definition at line 988 of file meshCutter.C.
References Foam::expressions::patchExpr::debug, Foam::constant::electromagnetic::e, Foam::endl(), forAllConstIters(), HashTable::insert(), Foam::Pout, mapPolyMesh::reverseCellMap(), mapPolyMesh::reverseFaceMap(), and mapPolyMesh::reversePointMap().
Referenced by meshRefinement::directionalRefine(), and undoableMeshCutter::updateMesh().
|
inline |
Definition at line 297 of file meshCutter.H.
|
inline |
Definition at line 303 of file meshCutter.H.
|
inline |
Definition at line 309 of file meshCutter.H.
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.