Abstract base class. Concrete implementations know how to cut a cell (i.e. determine a loop around the circumference). More...
#include <dynamicMesh/cellLooper.H>
Abstract base class. Concrete implementations know how to cut a cell (i.e. determine a loop around the circumference).
Loop around the cell is given as the vertices to be cut and edges to be cut (and a weight between 0 and 1 giving where the cut is to be made). Main routine is 'cut' which gets called for every cell and gets the current cut situation and expects to return a loop on the cell circumference.
Calling function needs to determine whether cellLooper is compatible with existing set of cuts.
Also contains various utility functions which implementations might want to use.
Definition at line 70 of file cellLooper.H.
Public Member Functions | |
TypeName ("cellLooper") | |
Runtime type information.
| |
declareRunTimeSelectionTable (autoPtr, cellLooper, word,(const polyMesh &mesh),(mesh)) | |
cellLooper (const polyMesh &mesh) | |
Construct from components.
| |
autoPtr< cellLooper > | clone () const |
Clone.
| |
virtual | ~cellLooper () |
virtual bool | cut (const vector &refDir, const label cellI, const boolList &vertIsCut, const boolList &edgeIsCut, const scalarField &edgeWeight, labelList &loop, scalarField &loopWeights) const =0 |
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 =0 |
Same but now also base point of cut provided (instead of always.
| |
Static Public Member Functions | |
static autoPtr< cellLooper > | New (const word &type, const polyMesh &mesh) |
Return a reference to the selected cellLooper.
| |
Protected Member Functions | |
labelList | getVertFacesNonEdge (const label cellI, const label edgeI, const label vertI) const |
Get faces (on cell) connected to vertI which are not using edgeI.
| |
label | getFirstVertEdge (const label faceI, const label vertI) const |
Get first edge connected to vertI and on faceI.
| |
labelList | getVertEdgesNonFace (const label cellI, const label faceI, const label vertI) const |
Get edges (on cell) connected to vertI which are not on faceI.
| |
label | getMisAlignedEdge (const vector &refDir, const label cellI) const |
Return edge from cellEdges that is most perpendicular.
|
cellLooper | ( | const polyMesh & | mesh ) |
Construct from components.
Definition at line 211 of file cellLooper.C.
~cellLooper | ( | ) | [virtual]
|
Definition at line 219 of file cellLooper.C.
Foam::labelList getVertFacesNonEdge | ( | const label | cellI, |
const label | edgeI, | ||
const label | vertI | ||
) | const [protected]
|
Get faces (on cell) connected to vertI which are not using edgeI.
Definition at line 75 of file cellLooper.C.
References Foam::meshTools::faceOnCell(), forAll, Foam::meshTools::getEdgeFaces(), mesh, pFaces, primitiveMesh::pointFaces(), List< T >::setSize(), and List< T >::size().
Foam::label getFirstVertEdge | ( | const label | faceI, |
const label | vertI | ||
) | const [protected]
|
Get first edge connected to vertI and on faceI.
Definition at line 112 of file cellLooper.C.
References Foam::abort(), e, primitiveMesh::edges(), edge::end(), primitiveMesh::faceEdges(), Foam::FatalError, FatalErrorIn, forAll, mesh, and edge::start().
Foam::labelList getVertEdgesNonFace | ( | const label | cellI, |
const label | faceI, | ||
const label | vertI | ||
) | const [protected]
|
Get edges (on cell) connected to vertI which are not on faceI.
Definition at line 144 of file cellLooper.C.
References Foam::meshTools::edgeOnCell(), primitiveMesh::faceEdges(), Foam::findIndex(), forAll, mesh, primitiveMesh::pointEdges(), List< T >::setSize(), and List< T >::size().
Foam::label getMisAlignedEdge | ( | const vector & | refDir, |
const label | cellI | ||
) | const [protected]
|
Return edge from cellEdges that is most perpendicular.
to refinement direction.
Definition at line 180 of file cellLooper.C.
References primitiveMesh::cellEdges(), forAll, Foam::mag(), mesh, and Foam::meshTools::normEdgeVec().
TypeName | ( | "cellLooper" | ) |
Runtime type information.
declareRunTimeSelectionTable | ( | autoPtr | , |
cellLooper | , | ||
word | , | ||
(const polyMesh &mesh) | , | ||
(mesh) | |||
) |
autoPtr<cellLooper> clone | ( | ) | const [inline]
|
autoPtr< cellLooper > New | ( | const word & | type, |
const polyMesh & | mesh | ||
) | [static]
|
Return a reference to the selected cellLooper.
Definition at line 45 of file cellLooper.C.
References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, and mesh.
virtual bool cut | ( | const vector & | refDir, |
const label | cellI, | ||
const boolList & | vertIsCut, | ||
const boolList & | edgeIsCut, | ||
const scalarField & | edgeWeight, | ||
labelList & | loop, | ||
scalarField & | loopWeights | ||
) | const [pure virtual]
|
Create cut along circumference of cellI. Gets current mesh cuts.
vertIsCut, edgeIsCut, edgeWeight). Cut along circumference is expressed as cellVertCut, cellEdgeToWeight. Returns true if succesfull. Still might not be compatible with existing cuts but this should be handled by caller).
Implemented in geomCellLooper, hexCellLooper, and topoCellLooper.
virtual bool cut | ( | const plane & | cutPlane, |
const label | cellI, | ||
const boolList & | vertIsCut, | ||
const boolList & | edgeIsCut, | ||
const scalarField & | edgeWeight, | ||
labelList & | loop, | ||
scalarField & | loopWeights | ||
) | const [pure virtual]
|
Same but now also base point of cut provided (instead of always.
cell centre)
Implemented in geomCellLooper, hexCellLooper, and topoCellLooper.