'Cuts' a mesh with a surface. More...
#include <meshTools/cellClassification.H>
'Cuts' a mesh with a surface.
Divides cells into three types
Used in various meshing programs.
Has various utility functions to deal with 'features' on this level where the mesh still has all inside and outside cells.
Seen from above:
Ok: A | A | --+--- | B | B Not ok: A | B | ---+--- | B | A
because this latter situation would cause the surface after subsetting type A or B to be multiply connected across this edge. And also when snapping the edge end points to the surface it might cause some twisted faces if the surface is normal to the edge (and smoothing the surface would not help since the points on the edge would be 'pulled' from two different sides)
Definition at line 118 of file cellClassification.H.
Public Types | |
enum | cType { NOTSET, INSIDE, OUTSIDE, CUT } |
Type of cell. More... | |
enum | pointStatus { UNSET, MESH, NONMESH, MIXED } |
Enumeration defining the whether points are use by cells of. More... | |
Public Member Functions | |
ClassName ("cellClassification") | |
cellClassification (const polyMesh &mesh, const meshSearch &meshQuery, const triSurfaceSearch &surfQuery, const pointField &outsidePoints) | |
Construct from mesh and surface and point(s) on outside.
| |
cellClassification (const polyMesh &mesh, const labelList &cellType) | |
Construct from mesh and type for every cell.
| |
cellClassification (const cellClassification &) | |
Construct as copy.
| |
const polyMesh & | mesh () const |
label | trimCutCells (const label nLayers, const label meshType, const label fillType) |
label | growSurface (const label meshType, const label fillType) |
Sets vertex neighbours of meshType cells to fillType.
| |
label | fillHangingCells (const label meshType, const label fillType, const label maxIter) |
Find hanging cells (cells with all points on outside) and set their.
| |
label | fillRegionEdges (const label meshType, const label fillType, const label maxIter) |
Find regionEdges and fill one neighbour. Iterate until nothing.
| |
label | fillRegionPoints (const label meshType, const label fillType, const label maxIter) |
Find regionPoints and fill all neighbours. Iterate until nothing.
| |
void | writeStats (Ostream &os) const |
Write statistics on cell types to Ostream.
| |
void | operator= (const cellClassification &) |
enum cType |
Type of cell.
Definition at line 128 of file cellClassification.H.
enum pointStatus |
Enumeration defining the whether points are use by cells of.
a certain type.
Definition at line 139 of file cellClassification.H.
cellClassification | ( | const polyMesh & | mesh, |
const meshSearch & | meshQuery, | ||
const triSurfaceSearch & | surfQuery, | ||
const pointField & | outsidePoints | ||
) |
Construct from mesh and surface and point(s) on outside.
Definition at line 484 of file cellClassification.C.
cellClassification | ( | const polyMesh & | mesh, |
const labelList & | cellType | ||
) |
Construct from mesh and type for every cell.
Used to be able to reuse filling routines below.
Definition at line 505 of file cellClassification.C.
References Foam::abort(), Foam::FatalError, and FatalErrorIn.
cellClassification | ( | const cellClassification & | cType ) |
Construct as copy.
Definition at line 526 of file cellClassification.C.
ClassName | ( | "cellClassification" | ) |
const polyMesh& mesh | ( | ) | const [inline]
|
Definition at line 221 of file cellClassification.H.
Foam::label trimCutCells | ( | const label | nLayers, |
const label | meshType, | ||
const label | fillType | ||
) |
Definition at line 539 of file cellClassification.C.
References cellClassification::CUT, and forAll.
Referenced by surfaceSets::getSurfaceSets().
Foam::label growSurface | ( | const label | meshType, |
const label | fillType | ||
) |
Sets vertex neighbours of meshType cells to fillType.
Definition at line 625 of file cellClassification.C.
References forAll.
Foam::label fillHangingCells | ( | const label | meshType, |
const label | fillType, | ||
const label | maxIter | ||
) |
Find hanging cells (cells with all points on outside) and set their.
type to fillType. Iterate until nothing changed. Returns total number of cells changed (in all iterations)
Definition at line 682 of file cellClassification.C.
References Foam::endl(), forAll, and Foam::Pout.
Foam::label fillRegionEdges | ( | const label | meshType, |
const label | fillType, | ||
const label | maxIter | ||
) |
Find regionEdges and fill one neighbour. Iterate until nothing.
changes. Returns total number of cells changed.
Definition at line 739 of file cellClassification.C.
References Foam::endl(), forAll, Foam::Pout, and List< T >::size().
Foam::label fillRegionPoints | ( | const label | meshType, |
const label | fillType, | ||
const label | maxIter | ||
) |
Find regionPoints and fill all neighbours. Iterate until nothing.
changes. Returns total number of cells changed.
Definition at line 808 of file cellClassification.C.
References Foam::endl(), forAll, pFaces, and Foam::Pout.
void writeStats | ( | Ostream & | os ) | const |
Write statistics on cell types to Ostream.
Definition at line 884 of file cellClassification.C.
References Foam::endl().
void operator= | ( | const cellClassification & | rhs ) |
Definition at line 896 of file cellClassification.C.
References List< label >::operator=().