FreeFOAM The Cross-Platform CFD Toolkit
hexCellLooper Class Reference

Implementation of cellLooper. More...

#include <dynamicMesh/hexCellLooper.H>


Detailed Description

Implementation of cellLooper.

This one walks hexes in a topological way:

  • cross edge to other face
  • cross face by walking edge-point-edge across to reach the other side. (edges are always cut through the middle)

For anything else (tet, prism, .. poly) it will use geomCellLooper (which does a purely geometric cut using a plane through cell centre)

Source files

Definition at line 61 of file hexCellLooper.H.

+ Inheritance diagram for hexCellLooper:
+ Collaboration diagram for hexCellLooper:

List of all members.

Public Member Functions

 TypeName ("hexCellLooper")
 Runtime type information.
 hexCellLooper (const polyMesh &mesh)
 Construct from components.
virtual ~hexCellLooper ()
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.
- Public Member Functions inherited from geomCellLooper
 TypeName ("geomCellLooper")
 Runtime type information.
 geomCellLooper (const polyMesh &mesh)
 Construct from components.
virtual ~geomCellLooper ()
- Public Member Functions inherited from cellLooper
 TypeName ("cellLooper")
 Runtime type information.
 declareRunTimeSelectionTable (autoPtr, cellLooper, word,(const polyMesh &mesh),(mesh))
 cellLooper (const polyMesh &mesh)
 Construct from components.
autoPtr< cellLooperclone () const
 Clone.
virtual ~cellLooper ()
- Public Member Functions inherited from edgeVertex
 edgeVertex (const polyMesh &mesh)
 Construct from 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
 Write cut description to Ostream.
OstreamwriteCuts (Ostream &os, const labelList &, const scalarField &) const
 Write cut descriptions to Ostream.

Protected Attributes

const cellModelhex_
 Reference to hex cell shape.

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.
- 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.
static void updateLabels (const labelList &map, Map< label > &)
 Update map from map. Used to update cell/face labels.
static void updateLabels (const labelList &map, labelHashSet &)
 Update map from map. Used to update cell/face labels.
static bool isEdge (const primitiveMesh &mesh, const label eVert)
 is eVert an edge?
static label getEdge (const primitiveMesh &mesh, const label eVert)
 convert eVert to edge label
static label getVertex (const primitiveMesh &mesh, const label eVert)
 convert eVert to vertex label
static label vertToEVert (const primitiveMesh &mesh, const label vertI)
 Convert pointI to eVert.
static label edgeToEVert (const primitiveMesh &mesh, const label edgeI)
 Convert edgeI to eVert.
static point coord (const primitiveMesh &, const label cut, const scalar weight)
 Return coordinate of cut (uses weight if edgeCut)
static label cutPairToEdge (const primitiveMesh &, const label cut0, const label cut1)
 Find mesh edge (or -1) between two cuts.

Constructor & Destructor Documentation

hexCellLooper ( const polyMesh mesh)

Construct from components.

Definition at line 160 of file hexCellLooper.C.

~hexCellLooper ( )
virtual

Definition at line 169 of file hexCellLooper.C.


Member Function Documentation

TypeName ( "hexCellLooper"  )

Runtime type information.

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 geomCellLooper.

Reimplemented in topoCellLooper.

Definition at line 176 of file hexCellLooper.C.

References Foam::abort(), cells, cellShapes, geomCellLooper::cut(), Foam::meshTools::cutDirToEdge(), UList< T >::empty(), Foam::endl(), Foam::FatalError, FatalErrorIn, forAll, Foam::meshTools::getEdgeFaces(), mesh, Foam::name(), points, Foam::Pout, List< T >::setSize(), List< T >::size(), WarningIn, and Foam::meshTools::writeOBJ().

Referenced by topoCellLooper::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)

Reimplemented from geomCellLooper.

Reimplemented in topoCellLooper.

Definition at line 281 of file hexCellLooper.C.

References geomCellLooper::cut().


Member Data Documentation

const cellModel& hex_
protected

Reference to hex cell shape.

Definition at line 71 of file hexCellLooper.H.


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