Implementation of cellLooper. Does pure geometric cut through cell. More...
#include <dynamicMesh/geomCellLooper.H>
Implementation of cellLooper. Does pure geometric cut through cell.
Handles all cell shapes in the same way: cut edges with plane through cell centre and normal in direction of provided direction. Snaps cuts close to edge endpoints (close = snapTol * minEdgeLen) to vertices.
Currently determines cuts through edges (and edgeendpoints close to plane) in random order and then sorts them acc. to angle. Could be converted to use walk but problem is that face can be cut multiple times (since does not need to be convex). Another problem is that edges parallel to plane might not be cut. So these are handled by looking at the distance from edge endpoints to the plane.
Definition at line 64 of file geomCellLooper.H.
Public Member Functions | |
TypeName ("geomCellLooper") | |
Runtime type information.
| |
geomCellLooper (const polyMesh &mesh) | |
Construct from components.
| |
virtual | ~geomCellLooper () |
virtual bool | cut (const vector &refDir, const label cellI, const boolList &vertIsCut, const boolList &edgeIsCut, const scalarField &edgeWeight, labelList &loop, scalarField &loopWeights) const |
Create cut along circumference of cellI. Gets current mesh cuts.
| |
virtual bool | cut (const plane &cutPlane, const label cellI, const boolList &vertIsCut, const boolList &edgeIsCut, const scalarField &edgeWeight, labelList &loop, scalarField &loopWeights) const |
Same but now also base point of cut provided (instead of always.
| |
Static Public Member Functions | |
static scalar | snapTol () |
static void | setSnapTol (const scalar tol) |
geomCellLooper | ( | const polyMesh & | mesh ) |
Construct from components.
Definition at line 214 of file geomCellLooper.C.
~geomCellLooper | ( | ) | [virtual]
|
Definition at line 222 of file geomCellLooper.C.
TypeName | ( | "geomCellLooper" | ) |
Runtime type information.
static scalar snapTol | ( | ) | [inline, static]
|
Definition at line 130 of file geomCellLooper.H.
static void setSnapTol | ( | const scalar | tol ) | [inline, static]
|
Definition at line 135 of file geomCellLooper.H.
bool cut | ( | const vector & | refDir, |
const label | cellI, | ||
const boolList & | vertIsCut, | ||
const boolList & | edgeIsCut, | ||
const scalarField & | edgeWeight, | ||
labelList & | loop, | ||
scalarField & | loopWeights | ||
) | const [virtual]
|
Create cut along circumference of cellI. Gets current mesh cuts.
Cut along circumference is expressed as loop of cuts plus weights for cuts along edges (only valid for edge cuts). Return true if successful cut.
Implements cellLooper.
Reimplemented in hexCellLooper, and topoCellLooper.
Definition at line 229 of file geomCellLooper.C.
References mesh.
Referenced by hexCellLooper::cut().
bool cut | ( | const plane & | cutPlane, |
const label | cellI, | ||
const boolList & | vertIsCut, | ||
const boolList & | edgeIsCut, | ||
const scalarField & | edgeWeight, | ||
labelList & | loop, | ||
scalarField & | loopWeights | ||
) | const [virtual]
|
Same but now also base point of cut provided (instead of always.
cell centre)
Implements cellLooper.
Reimplemented in hexCellLooper, and topoCellLooper.
Definition at line 255 of file geomCellLooper.C.
References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), primitiveMesh::cellEdges(), primitiveMesh::cells(), plane::distance(), primitiveMesh::edges(), edge::end(), Foam::endl(), Foam::findIndex(), forAll, HashTable< T, Key, Hash >::found(), HashSet< Key, Hash >::insert(), Foam::mag(), mesh, plane::normal(), polyMesh::points(), points, Foam::Pout, Foam::pseudoAngle(), List< T >::setSize(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::shrink(), List< T >::size(), edge::start(), List< T >::transfer(), and Vector< Cmpt >::zero.