Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions
topoCellLooper Class Reference

Implementation of cellLooper. This one recognizes splitHexes and tries to make a cut such that if the neighbour was split (in a previous iteration) this one also gets split in the same direction so that the result will be a mesh without splitHexes. More...

Inheritance diagram for topoCellLooper:
Inheritance graph
[legend]
Collaboration diagram for topoCellLooper:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("topoCellLooper")
 Runtime type information. More...
 
 topoCellLooper (const polyMesh &mesh)
 Construct from components. More...
 
virtual ~topoCellLooper ()
 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
 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
 Same but now also base point of cut provided (instead of always. More...
 
- Public Member Functions inherited from hexCellLooper
 TypeName ("hexCellLooper")
 Runtime type information. More...
 
 hexCellLooper (const polyMesh &mesh)
 Construct from components. More...
 
virtual ~hexCellLooper ()
 Destructor. More...
 
- Public Member Functions inherited from geomCellLooper
 TypeName ("geomCellLooper")
 Runtime type information. More...
 
 geomCellLooper (const polyMesh &mesh)
 Construct from components. More...
 
virtual ~geomCellLooper ()
 Destructor. More...
 
- Public Member Functions inherited from cellLooper
 TypeName ("cellLooper")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, cellLooper, word,(const polyMesh &mesh),(mesh))
 
 cellLooper (const polyMesh &mesh)
 Construct from components. More...
 
autoPtr< cellLooperclone () const
 Clone. More...
 
virtual ~cellLooper ()
 Destructor. More...
 
- Public Member Functions inherited from edgeVertex
 edgeVertex (const polyMesh &mesh)
 Construct from mesh. 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...
 

Static Public Attributes

static const scalar featureCos = Foam::cos(degToRad(10.0))
 Cos of angle for feature recognition (of splitHexes) More...
 

Private Member Functions

void walkFace (const cellFeatures &features, const label faceI, const label startEdgeI, const label startVertI, const label nFeaturePts, label &edgeI, label &vertI) const
 Walk across superface discarding non-feature points. More...
 
labelList getSuperEdge (const cellFeatures &features, const label faceI, const label startEdgeI, const label startVertI) const
 Returns list of vertices on 'superEdge' i.e. list of edges connected. More...
 
label getAlignedNonFeatureEdge (const vector &refDir, const label cellI, const cellFeatures &features) const
 
void walkAcrossFace (const cellFeatures &features, const label faceI, const label startEdgeI, const label startVertI, const label nFeats, label &edgeI, label &vertI) const
 Starts from edge and vertex on edge on face (or neighbouring face) More...
 
void walkSplitHex (const label cellI, const cellFeatures &features, const label fromFaceI, const label fromEdgeI, const label fromVertI, DynamicList< label > &loop, DynamicList< scalar > &loopWeights) const
 Walks splitcell circumference. Sets loop/loopweights to walk on. More...
 
 topoCellLooper (const topoCellLooper &)
 Disallow default bitwise copy construct. More...
 
void operator= (const topoCellLooper &)
 Disallow default bitwise assignment. More...
 

Static Private Member Functions

template<class T >
static void subsetList (const label startI, const label freeI, DynamicList< T > &lst)
 In-memory truncate a list. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from geomCellLooper
static scalar snapTol ()
 
static void setSnapTol (const scalar tol)
 
- Static Public Member Functions inherited from cellLooper
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 inherited from cellLooper
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...
 
- Protected Attributes inherited from hexCellLooper
const cellModelhex_
 Reference to hex cell shape. More...
 

Detailed Description

Implementation of cellLooper. This one recognizes splitHexes and tries to make a cut such that if the neighbour was split (in a previous iteration) this one also gets split in the same direction so that the result will be a mesh without splitHexes.

'splitHexes' are cells of which the 'featureEdges' (see cellFeatures class) form a hex. The remaining non-feature edges are assumed to result from splitting the neighbour and this class tries to start from one of these and cut through to an opposite edge.

The current set of cuts (vertIsCut, edgeIsCut, edgeWeight) are not being used by this implementation.

All non-splitHexes are done by the parent classes.

Source files

Definition at line 66 of file topoCellLooper.H.

Constructor & Destructor Documentation

◆ topoCellLooper() [1/2]

topoCellLooper ( const topoCellLooper )
private

Disallow default bitwise copy construct.

◆ topoCellLooper() [2/2]

topoCellLooper ( const polyMesh mesh)

Construct from components.

Definition at line 683 of file topoCellLooper.C.

◆ ~topoCellLooper()

~topoCellLooper ( )
virtual

Destructor.

Definition at line 691 of file topoCellLooper.C.

Member Function Documentation

◆ subsetList()

void subsetList ( const label  startI,
const label  freeI,
DynamicList< T > &  lst 
)
staticprivate

In-memory truncate a list.

Definition at line 54 of file topoCellLooper.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and DynamicList::setCapacity().

Here is the call graph for this function:

◆ walkFace()

void walkFace ( const cellFeatures features,
const label  faceI,
const label  startEdgeI,
const label  startVertI,
const label  nFeaturePts,
label edgeI,
label vertI 
) const
private

Walk across superface discarding non-feature points.

Definition at line 133 of file topoCellLooper.C.

References Foam::meshTools::edgeOnFace(), cellFeatures::isFeatureVertex(), mesh, and Foam::meshTools::otherEdge().

Here is the call graph for this function:

◆ getSuperEdge()

Foam::labelList getSuperEdge ( const cellFeatures features,
const label  faceI,
const label  startEdgeI,
const label  startVertI 
) const
private

Returns list of vertices on 'superEdge' i.e. list of edges connected.

by non-feature points. First and last are feature points, ones inbetween are not.

Definition at line 198 of file topoCellLooper.C.

References cellFeatures::isFeaturePoint(), mesh, Foam::meshTools::otherEdge(), List::setSize(), and List::size().

Here is the call graph for this function:

◆ getAlignedNonFeatureEdge()

Foam::label getAlignedNonFeatureEdge ( const vector refDir,
const label  cellI,
const cellFeatures features 
) const
private

Definition at line 240 of file topoCellLooper.C.

References Foam::constant::electromagnetic::e, forAll, cellFeatures::isFeatureEdge(), Foam::mag(), mesh, and n.

Here is the call graph for this function:

◆ walkAcrossFace()

void walkAcrossFace ( const cellFeatures features,
const label  faceI,
const label  startEdgeI,
const label  startVertI,
const label  nFeats,
label edgeI,
label vertI 
) const
private

Starts from edge and vertex on edge on face (or neighbouring face)

and steps either to existing vertex (vertI != -1) or to edge (vertI == -1) by walking point-edge and crossing nFeats featurePoints.

Definition at line 287 of file topoCellLooper.C.

References Foam::endl(), Foam::Pout, List::size(), and Foam::meshTools::walkFace().

Here is the call graph for this function:

◆ walkSplitHex()

void walkSplitHex ( const label  cellI,
const cellFeatures features,
const label  fromFaceI,
const label  fromEdgeI,
const label  fromVertI,
DynamicList< label > &  loop,
DynamicList< scalar > &  loopWeights 
) const
private

Walks splitcell circumference. Sets loop/loopweights to walk on.

outside of cell.

Definition at line 373 of file topoCellLooper.C.

References Foam::abort(), DynamicList::append(), Foam::endl(), Foam::meshTools::faceOnCell(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, Foam::meshTools::getSharedEdge(), mesh, Foam::meshTools::otherFace(), pFaces, Foam::Pout, and List::size().

Here is the call graph for this function:

◆ operator=()

void operator= ( const topoCellLooper )
private

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "topoCellLooper"  )

Runtime type information.

◆ cut() [1/2]

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.

Reimplemented from hexCellLooper.

Definition at line 698 of file topoCellLooper.C.

References primitiveMesh::cells(), cellShapes, hexCellLooper::cut(), primitiveMesh::edges(), cellFeatures::faces(), Foam::meshTools::getEdgeFaces(), Foam::isA(), mesh, List::size(), and List::transfer().

Here is the call graph for this function:

◆ cut() [2/2]

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)

Reimplemented from hexCellLooper.

Definition at line 809 of file topoCellLooper.C.

References hexCellLooper::cut().

Here is the call graph for this function:

Field Documentation

◆ featureCos

const Foam::scalar featureCos = Foam::cos(degToRad(10.0))
static

Cos of angle for feature recognition (of splitHexes)

Definition at line 161 of file topoCellLooper.H.


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