Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
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:
Inheritance graph
[legend]
Collaboration diagram for cellLooper:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("cellLooper")
 
 declareRunTimeSelectionTable (autoPtr, cellLooper, word,(const polyMesh &mesh),(mesh))
 
 cellLooper (const polyMesh &mesh)
 
autoPtr< cellLooperclone () const
 
virtual ~cellLooper ()=default
 
virtual bool cut (const vector &refDir, const label celli, const boolList &vertIsCut, const boolList &edgeIsCut, const scalarField &edgeWeight, labelList &loop, scalarField &loopWeights) const =0
 
virtual bool cut (const plane &cutPlane, const label celli, const boolList &vertIsCut, const boolList &edgeIsCut, const scalarField &edgeWeight, labelList &loop, scalarField &loopWeights) const =0
 
- Public Member Functions inherited from edgeVertex
 edgeVertex (const polyMesh &mesh)
 
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
 
OstreamwriteCuts (Ostream &os, const labelList &, const scalarField &) const
 

Static Public Member Functions

static autoPtr< cellLooperNew (const word &type, const polyMesh &mesh)
 
- Static Public Member Functions inherited from edgeVertex
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)
 

Protected Member Functions

labelList getVertFacesNonEdge (const label celli, const label edgeI, const label vertI) const
 
label getFirstVertEdge (const label facei, const label vertI) const
 
labelList getVertEdgesNonFace (const label celli, const label facei, const label vertI) const
 
label getMisAlignedEdge (const vector &refDir, const label celli) const
 
 cellLooper (const cellLooper &)=delete
 
void operator= (const cellLooper &)=delete
 

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

Constructor & Destructor Documentation

◆ cellLooper() [1/2]

cellLooper ( const cellLooper )
protecteddelete

◆ cellLooper() [2/2]

cellLooper ( const polyMesh mesh)
explicit

Definition at line 192 of file cellLooper.C.

◆ ~cellLooper()

virtual ~cellLooper ( )
virtualdefault

Member Function Documentation

◆ getVertFacesNonEdge()

Foam::labelList getVertFacesNonEdge ( const label  celli,
const label  edgeI,
const label  vertI 
) const
protected

Definition at line 63 of file cellLooper.C.

References Foam::meshTools::faceOnCell(), forAll, Foam::meshTools::getEdgeFaces(), mesh, pFaces, and List::setSize().

Here is the call graph for this function:

◆ getFirstVertEdge()

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

Definition at line 99 of file cellLooper.C.

References Foam::abort(), Foam::constant::electromagnetic::e, Foam::FatalError, FatalErrorInFunction, forAll, and mesh.

Here is the call graph for this function:

◆ getVertEdgesNonFace()

Foam::labelList getVertEdgesNonFace ( const label  celli,
const label  facei,
const label  vertI 
) const
protected

Definition at line 128 of file cellLooper.C.

References Foam::meshTools::edgeOnCell(), forAll, mesh, and List::setSize().

Here is the call graph for this function:

◆ getMisAlignedEdge()

Foam::label getMisAlignedEdge ( const vector refDir,
const label  celli 
) const
protected

Definition at line 162 of file cellLooper.C.

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

Here is the call graph for this function:

◆ operator=()

void operator= ( const cellLooper )
protecteddelete

◆ TypeName()

TypeName ( "cellLooper"  )

◆ declareRunTimeSelectionTable()

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

◆ clone()

autoPtr<cellLooper> clone ( ) const
inline

Definition at line 138 of file cellLooper.H.

References NotImplemented.

◆ New()

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

Definition at line 39 of file cellLooper.C.

References Foam::exit(), Foam::FatalError, FatalErrorInLookup, and mesh.

Here is the call 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

◆ 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

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