cellLooper Class Referenceabstract

Abstract base class. Concrete implementations know how to cut a cell (i.e. determine a loop around the circumference). More...

Inheritance diagram for cellLooper:
Collaboration diagram for cellLooper:

Public Member Functions

 TypeName ("cellLooper")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, cellLooper, word,(const polyMesh &mesh),(mesh))
 
 cellLooper (const polyMesh &mesh)
 Construct from components. More...
 
 cellLooper (const cellLooper &)=delete
 Disallow default bitwise copy construction. More...
 
autoPtr< cellLooperclone () const
 Clone. More...
 
virtual ~cellLooper ()
 Destructor. More...
 
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. More...
 
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. More...
 
void operator= (const cellLooper &)=delete
 Disallow default bitwise assignment. More...
 
- Public Member Functions inherited from edgeVertex
 edgeVertex (const polyMesh &mesh)
 Construct from mesh. More...
 
 edgeVertex (const edgeVertex &)=delete
 Disallow default bitwise copy construction. More...
 
const polyMeshmesh () 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
 
OstreamwriteCut (Ostream &os, const label cut, const scalar) const
 Write cut description to Ostream. More...
 
OstreamwriteCuts (Ostream &os, const labelList &, const scalarField &) const
 Write cut descriptions to Ostream. More...
 
void operator= (const edgeVertex &)=delete
 Disallow default bitwise assignment. More...
 

Static Public Member Functions

static autoPtr< cellLooperNew (const word &type, const polyMesh &mesh)
 Return a reference to the selected cellLooper. More...
 
- Static Public Member Functions inherited from edgeVertex
static void updateLabels (const labelList &map, List< refineCell > &)
 Update refine list from map. Used to update cell/face labels. More...
 
static void updateLabels (const labelList &map, Map< label > &)
 Update map from map. Used to update cell/face labels. More...
 
static void updateLabels (const labelList &map, labelHashSet &)
 Update map from map. Used to update cell/face labels. More...
 
static bool isEdge (const primitiveMesh &mesh, const label eVert)
 Is eVert an edge? More...
 
static label getEdge (const primitiveMesh &mesh, const label eVert)
 Convert eVert to edge label. More...
 
static label getVertex (const primitiveMesh &mesh, const label eVert)
 Convert eVert to vertex label. More...
 
static label vertToEVert (const primitiveMesh &mesh, const label vertI)
 Convert pointi to eVert. More...
 
static label edgeToEVert (const primitiveMesh &mesh, const label edgeI)
 Convert edgeI to eVert. More...
 
static point coord (const primitiveMesh &, const label cut, const scalar weight)
 Return coordinate of cut (uses weight if edgeCut) More...
 
static label cutPairToEdge (const primitiveMesh &, const label cut0, const label cut1)
 Find mesh edge (or -1) between two cuts. More...
 

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. More...
 
label getFirstVertEdge (const label facei, const label vertI) const
 Get first edge connected to vertI and on facei. More...
 
labelList getVertEdgesNonFace (const label celli, const label facei, const label vertI) const
 Get edges (on cell) connected to vertI which are not on facei. More...
 
label getMisAlignedEdge (const vector &refDir, const label celli) const
 Return edge from cellEdges that is most perpendicular. More...
 

Detailed Description

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.

Source files

Definition at line 69 of file cellLooper.H.

Constructor & Destructor Documentation

◆ cellLooper() [1/2]

cellLooper ( const polyMesh mesh)

Construct from components.

Definition at line 197 of file cellLooper.C.

◆ cellLooper() [2/2]

cellLooper ( const cellLooper )
delete

Disallow default bitwise copy construction.

◆ ~cellLooper()

~cellLooper ( )
virtual

Destructor.

Definition at line 205 of file cellLooper.C.

Referenced by cellLooper::clone().

Here is the caller graph for this function:

Member Function Documentation

◆ getVertFacesNonEdge()

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 68 of file cellLooper.C.

References Foam::meshTools::faceOnCell(), forAll, Foam::meshTools::getEdgeFaces(), cellLooper::getFirstVertEdge(), mesh, pFaces, primitiveMesh::pointFaces(), List< T >::setSize(), and List< T >::size().

Referenced by cellLooper::New().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getFirstVertEdge()

Foam::label getFirstVertEdge ( const label  facei,
const label  vertI 
) const
protected

Get first edge connected to vertI and on facei.

Definition at line 104 of file cellLooper.C.

References Foam::abort(), Foam::e, primitiveMesh::edges(), edge::end(), primitiveMesh::faceEdges(), Foam::FatalError, FatalErrorInFunction, forAll, cellLooper::getVertEdgesNonFace(), mesh, and edge::start().

Referenced by cellLooper::getVertFacesNonEdge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVertEdgesNonFace()

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 133 of file cellLooper.C.

References Foam::meshTools::edgeOnCell(), primitiveMesh::faceEdges(), Foam::findIndex(), forAll, cellLooper::getMisAlignedEdge(), mesh, primitiveMesh::pointEdges(), List< T >::setSize(), and List< T >::size().

Referenced by cellLooper::getFirstVertEdge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getMisAlignedEdge()

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 167 of file cellLooper.C.

References primitiveMesh::cellEdges(), forAll, Foam::mag(), mesh, and Foam::meshTools::normEdgeVec().

Referenced by topoCellLooper::cut(), and cellLooper::getVertEdgesNonFace().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ TypeName()

TypeName ( "cellLooper"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
cellLooper  ,
word  ,
(const polyMesh &mesh ,
(mesh  
)

◆ clone()

autoPtr<cellLooper> clone ( ) const
inline

Clone.

Definition at line 136 of file cellLooper.H.

References cellLooper::cut(), cellLooper::New(), NotImplemented, cellLooper::operator=(), Foam::type(), and cellLooper::~cellLooper().

Here is the call graph for this function:

◆ New()

Foam::autoPtr< Foam::cellLooper > New ( const word type,
const polyMesh mesh 
)
static

Return a reference to the selected cellLooper.

Definition at line 43 of file cellLooper.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, cellLooper::getVertFacesNonEdge(), mesh, and Foam::nl.

Referenced by cellLooper::clone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cut() [1/2]

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 successful. Still might not be compatible with existing cuts but this should be handled by caller).

Implemented in topoCellLooper, geomCellLooper, and hexCellLooper.

Referenced by cellLooper::clone(), and cellCuts::nonAnchorPoints().

Here is the caller graph for this function:

◆ cut() [2/2]

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 topoCellLooper, geomCellLooper, and hexCellLooper.

◆ operator=()

void operator= ( const cellLooper )
delete

Disallow default bitwise assignment.

Referenced by cellLooper::clone().

Here is the caller graph for this function:

The documentation for this class was generated from the following files: