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

Description of cuts across cells. More...

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

Public Member Functions

 ClassName ("cellCuts")
 Runtime type information. More...
 
 cellCuts (const polyMesh &mesh, const labelList &cutCells, const labelList &meshVerts, const labelList &meshEdges, const scalarField &meshEdgeWeights)
 Construct from cells to cut and pattern of cuts. More...
 
 cellCuts (const polyMesh &mesh, const labelList &meshVerts, const labelList &meshEdges, const scalarField &meshEdgeWeights)
 Construct from pattern of cuts. Detect cells to cut. More...
 
 cellCuts (const polyMesh &mesh, const labelList &cellLabels, const labelListList &cellLoops, const List< scalarField > &cellEdgeWeights)
 Construct from complete cellLoops through specified cells. More...
 
 cellCuts (const polyMesh &mesh, const cellLooper &cellCutter, const List< refineCell > &refCells)
 Construct from list of cells to cut and direction to cut in. More...
 
 cellCuts (const polyMesh &mesh, const cellLooper &cellCutter, const labelList &cellLabels, const List< plane > &cutPlanes)
 Construct from list of cells to cut and plane to cut with and. More...
 
 cellCuts (const polyMesh &mesh, const boolList &pointIsCut, const boolList &edgeIsCut, const scalarField &edgeWeight, const Map< edge > &faceSplitCut, const labelListList &cellLoops, const label nLoops, const labelListList &cellAnchorPoints)
 Construct from components. More...
 
 ~cellCuts ()
 Destructor. More...
 
void clearOut ()
 Clear out demand driven storage. More...
 
const boolListpointIsCut () const
 Is mesh point cut. More...
 
const boolListedgeIsCut () const
 Is edge cut. More...
 
const scalarFieldedgeWeight () const
 If edge is cut gives weight (ratio between start() and end()) More...
 
const labelListListfaceCuts () const
 Cuts per existing face (includes those along edge of face) More...
 
const Map< edge > & faceSplitCut () const
 Gives for split face the two cuts that split the face into two. More...
 
const labelListListcellLoops () const
 For each cut cell the cut along the circumference. More...
 
label nLoops () const
 Number of valid cell loops. More...
 
const labelListListcellAnchorPoints () const
 For each cut cell the points on the 'anchor' side of the cell. More...
 
pointField loopPoints (const label cellI) const
 Returns coordinates of points on loop for given cell. More...
 
labelList nonAnchorPoints (const labelList &cellPoints, const labelList &anchorPoints, const labelList &loop) const
 Invert anchor point selection. More...
 
void flip (const label cellI)
 Flip loop for cellI. Updates anchor points as well. More...
 
void flipLoopOnly (const label cellI)
 Flip loop for cellI. Does not update anchors. Use with care. More...
 
void writeOBJ (Ostream &os, const pointField &loopPoints, label &vertI) const
 debugging:Write list of cuts to stream in OBJ format More...
 
void writeOBJ (Ostream &os) const
 debugging:Write all of cuts to stream in OBJ format More...
 
void writeCellOBJ (const fileName &dir, const label cellI) const
 debugging:Write edges of cell and loop 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...
 

Private Member Functions

void writeUncutOBJ (const fileName &, const label cellI) const
 Debugging: write cell's edges and any cut vertices and edges. More...
 
void writeOBJ (const fileName &dir, const label cellI, const pointField &loopPoints, const labelList &anchors) const
 Debugging: write cell's edges, loop and anchors to directory. More...
 
label edgeEdgeToFace (const label cellI, const label edgeA, const label edgeB) const
 Find face on cell using the two edges. More...
 
label edgeVertexToFace (const label cellI, const label edgeI, const label vertI) const
 Find face on cell using an edge and a vertex. More...
 
label vertexVertexToFace (const label cellI, const label vertA, const label vertB) const
 Find face using two vertices (guaranteed not to be along edge) More...
 
void calcFaceCuts () const
 Calculate faceCuts in face vertex order. More...
 
label findEdge (const label faceI, const label v0, const label v1) const
 Find edge (or -1) on faceI using vertices v0,v1. More...
 
label loopFace (const label cellI, const labelList &loop) const
 Find face on which all cuts are (very rare) or -1. More...
 
bool walkPoint (const label cellI, const label startCut, const label exclude0, const label exclude1, const label otherCut, label &nVisited, labelList &visited) const
 Cross otherCut into next faces (not exclude0, exclude1) More...
 
bool crossEdge (const label cellI, const label startCut, const label faceI, const label otherCut, label &nVisited, labelList &visited) const
 Cross cut (which is edge on faceI) onto next face. More...
 
bool addCut (const label cellI, const label cut, label &nVisited, labelList &visited) const
 
bool walkFace (const label cellI, const label startCut, const label faceI, const label cut, label &lastCut, label &beforeLastCut, label &nVisited, labelList &visited) const
 Walk across faceI following cuts, starting at cut. Stores cuts. More...
 
bool walkCell (const label cellI, const label startCut, const label faceI, const label prevCut, label &nVisited, labelList &visited) const
 Walk across cuts (cut edges or cut vertices) of cell. Stops when. More...
 
void calcCellLoops (const labelList &cutCells)
 Determine for every cut cell the face it is cut by. More...
 
bool checkFaces (const label cellI, const labelList &anchorPoints) const
 Are there enough faces on anchor side of cellI? More...
 
void walkEdges (const label cellI, const label pointI, const label status, Map< label > &edgeStatus, Map< label > &pointStatus) const
 Walk unset edges of single cell from starting point and. More...
 
bool loopAnchorConsistent (const label cellI, const pointField &loopPts, const labelList &anchorPoints) const
 Check anchor points on 'outside' of loop. More...
 
bool calcAnchors (const label cellI, const labelList &loop, const pointField &loopPts, labelList &anchorPoints) const
 Determines set of anchor points given a loop. The loop should. More...
 
pointField loopPoints (const labelList &loop, const scalarField &loopWeights) const
 Returns coordinates of points on loop with explicitly provided. More...
 
scalarField loopWeights (const labelList &loop) const
 Returns weights of loop. Inverse of loopPoints. More...
 
bool validEdgeLoop (const labelList &loop, const scalarField &loopWeights) const
 Check if cut edges in loop are compatible with ones in. More...
 
label countFaceCuts (const label faceI, const labelList &loop) const
 Counts number of cuts on face. More...
 
bool conservativeValidLoop (const label cellI, const labelList &loop) const
 Determines if loop through cellI consistent with existing. More...
 
bool validLoop (const label cellI, const labelList &loop, const scalarField &loopWeights, Map< edge > &newFaceSplitCut, labelList &anchorPoints) const
 Check if loop is compatible with existing cut pattern in. More...
 
void setFromCellLoops ()
 Update basic cut information from cellLoops. Assumes cellLoops_. More...
 
bool setFromCellLoop (const label cellI, const labelList &loop, const scalarField &loopWeights)
 Update basic cut information for single cell from cellLoop. More...
 
void setFromCellLoops (const labelList &cellLabels, const labelListList &cellLoops, const List< scalarField > &cellLoopWeights)
 Update basic cut information from cellLoops. Checks for. More...
 
void setFromCellCutter (const cellLooper &, const List< refineCell > &refCells)
 Cut cells and update basic cut information from cellLoops. More...
 
void setFromCellCutter (const cellLooper &, const labelList &cellLabels, const List< plane > &)
 Same as above but now cut with prescribed plane. More...
 
void orientPlanesAndLoops ()
 Set orientation of loops. More...
 
void calcLoopsAndAddressing (const labelList &cutCells)
 Top level driver: adressing calculation and loop detection. More...
 
void check () const
 Check various consistencies. More...
 
 cellCuts (const cellCuts &)
 Disallow default bitwise copy construct. More...
 
void operator= (const cellCuts &)
 Disallow default bitwise assignment. More...
 

Static Private Member Functions

static label findPartIndex (const labelList &, const label n, const label val)
 Find value in first n elements of list. More...
 
static boolList expand (const label size, const labelList &labels)
 Create boolList with all labels specified set to true. More...
 
static scalarField expand (const label, const labelList &, const scalarField &)
 Create scalarField with all specified labels set to corresponding. More...
 
static label firstUnique (const labelList &lst, const Map< label > &)
 Returns -1 or index of first element of lst that cannot be found. More...
 

Private Attributes

boolList pointIsCut_
 Is mesh point cut. More...
 
boolList edgeIsCut_
 Is edge cut. More...
 
scalarField edgeWeight_
 If edge is cut gives weight (0->start() to 1->end()) More...
 
labelListListfaceCutsPtr_
 Cuts per existing face (includes those along edge of face) More...
 
Map< edgefaceSplitCut_
 Per face : cut across edge (so not along existing edge) More...
 
labelListList cellLoops_
 Loop across cell circumference. More...
 
label nLoops_
 Number of valid loops in cellLoops_. More...
 
labelListList cellAnchorPoints_
 For each cut cell the points on the 'anchor' side of the cell. More...
 

Additional Inherited Members

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

Detailed Description

Description of cuts across cells.

Description of cut is given as list of vertices and list of edges to be cut (and position on edge).

Does some checking of correctness/non-overlapping of cuts. 2x2x2 refinement has to be done in three passes since cuts can not overlap (would make addressing too complicated)

Introduces concept of 'cut' which is either an existing vertex or a edge.

Input can either be

  1. list of cut vertices and list of cut edges. Constructs cell circumference walks ('cellLoops').
  2. list of cell circumference walks. Will filter them so they don't overlap.
  3. cellWalker and list of cells to refine (refineCell). Constructs cellLoops and does B. cellWalker is class which can cut a single cell using a plane through the cell centre and in a certain normal direction

CellCuts constructed from cellLoops (B, C) can have multiple cut-edges and/or cut-point as long as there is per face only one (or none) cut across a face, i.e. a face can only be split into two faces.

The information available after construction:

AnchorPoints: connected loops have to be oriented in the same way to be able to grow new internal faces out of the same bottom faces. (limitation of the mapping procedure). The loop is cellLoop is oriented such that the normal of it points towards the anchorPoints. This is the only routine which uses geometric information.

Limitations:

Source files

Definition at line 108 of file cellCuts.H.

Constructor & Destructor Documentation

◆ cellCuts() [1/7]

cellCuts ( const cellCuts )
private

Disallow default bitwise copy construct.

◆ cellCuts() [2/7]

cellCuts ( const polyMesh mesh,
const labelList cutCells,
const labelList meshVerts,
const labelList meshEdges,
const scalarField meshEdgeWeights 
)

Construct from cells to cut and pattern of cuts.

Definition at line 2687 of file cellCuts.C.

References Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

◆ cellCuts() [3/7]

cellCuts ( const polyMesh mesh,
const labelList meshVerts,
const labelList meshEdges,
const scalarField meshEdgeWeights 
)

Construct from pattern of cuts. Detect cells to cut.

Definition at line 2733 of file cellCuts.C.

References Foam::endl(), Foam::identity(), mesh, primitiveMesh::nCells(), and Foam::Pout.

Here is the call graph for this function:

◆ cellCuts() [4/7]

cellCuts ( const polyMesh mesh,
const labelList cellLabels,
const labelListList cellLoops,
const List< scalarField > &  cellEdgeWeights 
)

Construct from complete cellLoops through specified cells.

Checks for consistency. Constructs cut-cut addressing and cellAnchorPoints.

Definition at line 2777 of file cellCuts.C.

References Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

◆ cellCuts() [5/7]

cellCuts ( const polyMesh mesh,
const cellLooper cellCutter,
const List< refineCell > &  refCells 
)

Construct from list of cells to cut and direction to cut in.

(always through cell centre) and celllooper.

Definition at line 2822 of file cellCuts.C.

References Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

◆ cellCuts() [6/7]

cellCuts ( const polyMesh mesh,
const cellLooper cellCutter,
const labelList cellLabels,
const List< plane > &  cutPlanes 
)

Construct from list of cells to cut and plane to cut with and.

celllooper. (constructor above always cuts through cell centre)

Definition at line 2866 of file cellCuts.C.

References Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

◆ cellCuts() [7/7]

cellCuts ( const polyMesh mesh,
const boolList pointIsCut,
const boolList edgeIsCut,
const scalarField edgeWeight,
const Map< edge > &  faceSplitCut,
const labelListList cellLoops,
const label  nLoops,
const labelListList cellAnchorPoints 
)

Construct from components.

Definition at line 2913 of file cellCuts.C.

References Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

◆ ~cellCuts()

~cellCuts ( )

Destructor.

Definition at line 2944 of file cellCuts.C.

Member Function Documentation

◆ findPartIndex()

Foam::label findPartIndex ( const labelList elems,
const label  n,
const label  val 
)
staticprivate

Find value in first n elements of list.

Definition at line 49 of file cellCuts.C.

◆ expand() [1/2]

Foam::boolList expand ( const label  size,
const labelList labels 
)
staticprivate

Create boolList with all labels specified set to true.

(and rest to false)

Definition at line 67 of file cellCuts.C.

References forAll, and Foam::labelI.

◆ expand() [2/2]

Foam::scalarField expand ( const label  size,
const labelList labels,
const scalarField weights 
)
staticprivate

Create scalarField with all specified labels set to corresponding.

value in scalarField.

Definition at line 83 of file cellCuts.C.

References forAll, and Foam::labelI.

◆ firstUnique()

Foam::label firstUnique ( const labelList lst,
const Map< label > &  map 
)
staticprivate

Returns -1 or index of first element of lst that cannot be found.

in map.

Definition at line 101 of file cellCuts.C.

References forAll.

◆ writeUncutOBJ()

void writeUncutOBJ ( const fileName dir,
const label  cellI 
) const
private

Debugging: write cell's edges and any cut vertices and edges.

(so no cell loop determined yet)

Cell edges

Loop cutting cell in two

Definition at line 121 of file cellCuts.C.

References cells, Foam::constant::electromagnetic::e, forAll, mesh, OFstream::name(), Foam::name(), Foam::nl, points, Foam::Pout, w(), and writeOBJ().

Here is the call graph for this function:

◆ writeOBJ() [1/3]

void writeOBJ ( const fileName dir,
const label  cellI,
const pointField loopPoints,
const labelList anchors 
) const
private

Debugging: write cell's edges, loop and anchors to directory.

Cell edges

Loop cutting cell in two

Anchors for cell

Definition at line 179 of file cellCuts.C.

References cells, Foam::endl(), forAll, mesh, OFstream::name(), Foam::name(), Foam::nl, points, Foam::Pout, and writeOBJ().

Referenced by refinementIterator::setRefinement().

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

◆ edgeEdgeToFace()

Foam::label edgeEdgeToFace ( const label  cellI,
const label  edgeA,
const label  edgeB 
) const
private

Find face on cell using the two edges.

Definition at line 228 of file cellCuts.C.

References Foam::endl(), Foam::findIndex(), forAll, mesh, and WarningInFunction.

Here is the call graph for this function:

◆ edgeVertexToFace()

Foam::label edgeVertexToFace ( const label  cellI,
const label  edgeI,
const label  vertI 
) const
private

Find face on cell using an edge and a vertex.

Definition at line 269 of file cellCuts.C.

References Foam::endl(), f(), Foam::findIndex(), forAll, mesh, and WarningInFunction.

Here is the call graph for this function:

◆ vertexVertexToFace()

Foam::label vertexVertexToFace ( const label  cellI,
const label  vertA,
const label  vertB 
) const
private

Find face using two vertices (guaranteed not to be along edge)

Definition at line 309 of file cellCuts.C.

References Foam::endl(), f(), Foam::findIndex(), forAll, mesh, and WarningInFunction.

Here is the call graph for this function:

◆ calcFaceCuts()

void calcFaceCuts ( ) const
private

◆ findEdge()

Foam::label findEdge ( const label  faceI,
const label  v0,
const label  v1 
) const
private

Find edge (or -1) on faceI using vertices v0,v1.

Definition at line 482 of file cellCuts.C.

References Foam::e, primitiveMesh::edges(), primitiveMesh::faceEdges(), forAll, and mesh.

Referenced by cellCuts::calcFaceCuts().

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

◆ loopFace()

Foam::label loopFace ( const label  cellI,
const labelList loop 
) const
private

Find face on which all cuts are (very rare) or -1.

Definition at line 512 of file cellCuts.C.

References primitiveMesh::cells(), f(), primitiveMesh::faceEdges(), polyMesh::faces(), Foam::findIndex(), forAll, and mesh.

Here is the call graph for this function:

◆ walkPoint()

bool walkPoint ( const label  cellI,
const label  startCut,
const label  exclude0,
const label  exclude1,
const label  otherCut,
label nVisited,
labelList visited 
) const
private

Cross otherCut into next faces (not exclude0, exclude1)

Definition at line 564 of file cellCuts.C.

References Foam::meshTools::faceOnCell(), forAll, mesh, pFaces, and primitiveMesh::pointFaces().

Here is the call graph for this function:

◆ crossEdge()

bool crossEdge ( const label  cellI,
const label  startCut,
const label  faceI,
const label  otherCut,
label nVisited,
labelList visited 
) const
private

Cross cut (which is edge on faceI) onto next face.

Definition at line 620 of file cellCuts.C.

References mesh, and Foam::meshTools::otherFace().

Here is the call graph for this function:

◆ addCut()

bool addCut ( const label  cellI,
const label  cut,
label nVisited,
labelList visited 
) const
private

Definition at line 665 of file cellCuts.C.

References Foam::endl(), Foam::Pout, and List::setSize().

Here is the call graph for this function:

◆ walkFace()

bool walkFace ( const label  cellI,
const label  startCut,
const label  faceI,
const label  cut,
label lastCut,
label beforeLastCut,
label nVisited,
labelList visited 
) const
private

Walk across faceI following cuts, starting at cut. Stores cuts.

visited

Definition at line 701 of file cellCuts.C.

References Foam::endl(), List::size(), and WarningInFunction.

Here is the call graph for this function:

◆ walkCell()

bool walkCell ( const label  cellI,
const label  startCut,
const label  faceI,
const label  prevCut,
label nVisited,
labelList visited 
) const
private

Walk across cuts (cut edges or cut vertices) of cell. Stops when.

hit cut already visited. Returns true when loop of 3 or more vertices found.

Definition at line 793 of file cellCuts.C.

References Foam::endl(), f1, Foam::meshTools::findEdge(), Foam::meshTools::getEdgeFaces(), mesh, Foam::Pout, List::setSize(), and Foam::meshTools::walkFace().

Here is the call graph for this function:

◆ calcCellLoops()

void calcCellLoops ( const labelList cutCells)
private

Determine for every cut cell the face it is cut by.

Definition at line 990 of file cellCuts.C.

References primitiveMesh::cells(), Foam::endl(), polyMesh::faceNeighbour(), polyMesh::faceOwner(), forAll, Foam::labelMin, mesh, nPoints, Foam::Pout, List::setSize(), and List::size().

Here is the call graph for this function:

◆ checkFaces()

bool checkFaces ( const label  cellI,
const labelList anchorPoints 
) const
private

Are there enough faces on anchor side of cellI?

◆ walkEdges()

void walkEdges ( const label  cellI,
const label  pointI,
const label  status,
Map< label > &  edgeStatus,
Map< label > &  pointStatus 
) const
private

Walk unset edges of single cell from starting point and.

marks visited edges and vertices with status.

Definition at line 1145 of file cellCuts.C.

References Foam::meshTools::edgeOnCell(), primitiveMesh::edges(), forAll, mesh, and primitiveMesh::pointEdges().

Here is the call graph for this function:

◆ loopAnchorConsistent()

bool loopAnchorConsistent ( const label  cellI,
const pointField loopPts,
const labelList anchorPoints 
) const
private

Check anchor points on 'outside' of loop.

Definition at line 1214 of file cellCuts.C.

References f(), forAll, Foam::identity(), mesh, polyMesh::points(), List::size(), and Vector< scalar >::zero.

Here is the call graph for this function:

◆ calcAnchors()

bool calcAnchors ( const label  cellI,
const labelList loop,
const pointField loopPts,
labelList anchorPoints 
) const
private

◆ loopPoints() [1/2]

Foam::pointField loopPoints ( const labelList loop,
const scalarField loopWeights 
) const
private

Returns coordinates of points on loop with explicitly provided.

weights.

Definition at line 1600 of file cellCuts.C.

References forAll, and List::size().

Here is the call graph for this function:

◆ loopWeights()

Foam::scalarField loopWeights ( const labelList loop) const
private

Returns weights of loop. Inverse of loopPoints.

Definition at line 1616 of file cellCuts.C.

References forAll, and List::size().

Here is the call graph for this function:

◆ validEdgeLoop()

bool validEdgeLoop ( const labelList loop,
const scalarField loopWeights 
) const
private

Check if cut edges in loop are compatible with ones in.

edgeIsCut_

Definition at line 1641 of file cellCuts.C.

References primitiveMesh::edges(), forAll, Foam::mag(), mesh, points, and geomCellLooper::snapTol().

Here is the call graph for this function:

◆ countFaceCuts()

Foam::label countFaceCuts ( const label  faceI,
const labelList loop 
) const
private

Counts number of cuts on face.

Definition at line 1679 of file cellCuts.C.

References f(), primitiveMesh::faceEdges(), polyMesh::faces(), Foam::findIndex(), forAll, and mesh.

Here is the call graph for this function:

◆ conservativeValidLoop()

bool conservativeValidLoop ( const label  cellI,
const labelList loop 
) const
private

Determines if loop through cellI consistent with existing.

pattern.

Definition at line 1729 of file cellCuts.C.

References Foam::e, primitiveMesh::edgeFaces(), primitiveMesh::edges(), forAll, mesh, pFaces, primitiveMesh::pointEdges(), primitiveMesh::pointFaces(), and List::size().

Here is the call graph for this function:

◆ validLoop()

bool validLoop ( const label  cellI,
const labelList loop,
const scalarField loopWeights,
Map< edge > &  newFaceSplitCut,
labelList anchorPoints 
) const
private

Check if loop is compatible with existing cut pattern in.

pointIsCut, edgeIsCut, faceSplitCut. Calculates and returns for current cell the cut faces and the points on one side of the loop.

Definition at line 1824 of file cellCuts.C.

References Foam::e, primitiveMesh::edges(), edge::end(), Foam::endl(), Foam::meshTools::findEdge(), forAll, mesh, List::size(), edge::start(), and WarningInFunction.

Here is the call graph for this function:

◆ setFromCellLoops() [1/2]

void setFromCellLoops ( )
private

Update basic cut information from cellLoops. Assumes cellLoops_.

already set and consistent.

Definition at line 1990 of file cellCuts.C.

References Foam::endl(), forAll, forAllConstIter(), List::size(), and WarningInFunction.

Here is the call graph for this function:

◆ setFromCellLoop()

bool setFromCellLoop ( const label  cellI,
const labelList loop,
const scalarField loopWeights 
)
private

Update basic cut information for single cell from cellLoop.

Definition at line 2077 of file cellCuts.C.

References cells, forAll, forAllConstIter(), mesh, Foam::nl, points, List::size(), List::transfer(), and Foam::meshTools::writeOBJ().

Here is the call graph for this function:

◆ setFromCellLoops() [2/2]

void setFromCellLoops ( const labelList cellLabels,
const labelListList cellLoops,
const List< scalarField > &  cellLoopWeights 
)
private

Update basic cut information from cellLoops. Checks for.

consistency with existing cut pattern.

Definition at line 2175 of file cellCuts.C.

References forAll, List::setSize(), and List::size().

Here is the call graph for this function:

◆ setFromCellCutter() [1/2]

void setFromCellCutter ( const cellLooper cellCutter,
const List< refineCell > &  refCells 
)
private

Cut cells and update basic cut information from cellLoops.

Checks each loop for consistency with existing cut pattern.

Definition at line 2213 of file cellCuts.C.

References DynamicList::append(), refineCell::cellNo(), cells, cellLooper::cut(), refineCell::direction(), Foam::endl(), forAll, mesh, points, Foam::Pout, DynamicList::shrink(), writeOBJ(), and Foam::meshTools::writeOBJ().

Here is the call graph for this function:

◆ setFromCellCutter() [2/2]

void setFromCellCutter ( const cellLooper cellCutter,
const labelList cellLabels,
const List< plane > &  cellCutPlanes 
)
private

Same as above but now cut with prescribed plane.

Definition at line 2329 of file cellCuts.C.

References DynamicList::append(), cells, cellLooper::cut(), Foam::endl(), forAll, mesh, points, Foam::Pout, DynamicList::shrink(), writeOBJ(), and Foam::meshTools::writeOBJ().

Here is the call graph for this function:

◆ orientPlanesAndLoops()

void orientPlanesAndLoops ( )
private

Set orientation of loops.

Definition at line 2440 of file cellCuts.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Pout, and List::size().

Here is the call graph for this function:

◆ calcLoopsAndAddressing()

void calcLoopsAndAddressing ( const labelList cutCells)
private

Top level driver: adressing calculation and loop detection.

Definition at line 2497 of file cellCuts.C.

References Foam::abort(), primitiveMesh::edges(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, mesh, Foam::Pout, and List::size().

Here is the call graph for this function:

◆ check()

void check ( ) const
private

◆ operator=()

void operator= ( const cellCuts )
private

Disallow default bitwise assignment.

◆ ClassName()

ClassName ( "cellCuts"  )

Runtime type information.

◆ clearOut()

void clearOut ( )

Clear out demand driven storage.

Definition at line 2950 of file cellCuts.C.

References Foam::deleteDemandDrivenData().

Here is the call graph for this function:

◆ pointIsCut()

const boolList& pointIsCut ( ) const
inline

Is mesh point cut.

Definition at line 534 of file cellCuts.H.

References cellCuts::pointIsCut_.

Referenced by meshCutAndRemove::setRefinement().

Here is the caller graph for this function:

◆ edgeIsCut()

const boolList& edgeIsCut ( ) const
inline

Is edge cut.

Definition at line 540 of file cellCuts.H.

References cellCuts::edgeIsCut_.

Referenced by meshCutAndRemove::setRefinement(), and meshCutter::setRefinement().

Here is the caller graph for this function:

◆ edgeWeight()

const scalarField& edgeWeight ( ) const
inline

If edge is cut gives weight (ratio between start() and end())

Definition at line 546 of file cellCuts.H.

References cellCuts::edgeWeight_.

Referenced by meshCutAndRemove::setRefinement(), and meshCutter::setRefinement().

Here is the caller graph for this function:

◆ faceCuts()

const labelListList& faceCuts ( ) const
inline

Cuts per existing face (includes those along edge of face)

Cuts in no particular order

Definition at line 553 of file cellCuts.H.

Referenced by cellCuts::calcFaceCuts().

Here is the caller graph for this function:

◆ faceSplitCut()

const Map<edge>& faceSplitCut ( ) const
inline

Gives for split face the two cuts that split the face into two.

Definition at line 563 of file cellCuts.H.

References cellCuts::faceSplitCut_.

Referenced by meshCutAndRemove::setRefinement(), and meshCutter::setRefinement().

Here is the caller graph for this function:

◆ cellLoops()

const labelListList& cellLoops ( ) const
inline

For each cut cell the cut along the circumference.

Definition at line 569 of file cellCuts.H.

References cellCuts::cellLoops_.

Referenced by meshCutAndRemove::faceCells(), meshCutter::faceCells(), meshCutAndRemove::findCutCell(), meshCutter::findCutCell(), meshCutAndRemove::setRefinement(), and meshCutter::setRefinement().

Here is the caller graph for this function:

◆ nLoops()

label nLoops ( ) const
inline

Number of valid cell loops.

Definition at line 575 of file cellCuts.H.

References cellCuts::nLoops_.

Referenced by refinementIterator::setRefinement(), meshCutAndRemove::setRefinement(), and meshCutter::setRefinement().

Here is the caller graph for this function:

◆ cellAnchorPoints()

const labelListList& cellAnchorPoints ( ) const
inline

For each cut cell the points on the 'anchor' side of the cell.

Definition at line 581 of file cellCuts.H.

References cellCuts::cellAnchorPoints_.

Referenced by meshCutAndRemove::faceCells(), meshCutter::faceCells(), meshCutAndRemove::setRefinement(), and meshCutter::setRefinement().

Here is the caller graph for this function:

◆ loopPoints() [2/2]

Foam::pointField loopPoints ( const label  cellI) const

Returns coordinates of points on loop for given cell.

Uses cellLoops_ and edgeWeight_

Definition at line 2958 of file cellCuts.C.

References forAll, and List::size().

Here is the call graph for this function:

◆ nonAnchorPoints()

Foam::labelList nonAnchorPoints ( const labelList cellPoints,
const labelList anchorPoints,
const labelList loop 
) const

Invert anchor point selection.

Definition at line 1183 of file cellCuts.C.

References Foam::findIndex(), forAll, List::setSize(), and List::size().

Here is the call graph for this function:

◆ flip()

void flip ( const label  cellI)

Flip loop for cellI. Updates anchor points as well.

Definition at line 2984 of file cellCuts.C.

References mesh, and Foam::reverse().

Here is the call graph for this function:

◆ flipLoopOnly()

void flipLoopOnly ( const label  cellI)

Flip loop for cellI. Does not update anchors. Use with care.

(only if you're sure loop orientation is wrong)

Definition at line 3002 of file cellCuts.C.

References Foam::reverse().

Here is the call graph for this function:

◆ writeOBJ() [2/3]

void writeOBJ ( Ostream os,
const pointField loopPoints,
label vertI 
) const

debugging:Write list of cuts to stream in OBJ format

Definition at line 3011 of file cellCuts.C.

References Foam::endl(), forAll, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::z().

Here is the call graph for this function:

◆ writeOBJ() [3/3]

void writeOBJ ( Ostream os) const

debugging:Write all of cuts to stream in OBJ format

Definition at line 3037 of file cellCuts.C.

References forAll, and writeOBJ().

Here is the call graph for this function:

◆ writeCellOBJ()

void writeCellOBJ ( const fileName dir,
const label  cellI 
) const

debugging:Write edges of cell and loop

Definition at line 3048 of file cellCuts.C.

References writeOBJ().

Here is the call graph for this function:

Field Documentation

◆ pointIsCut_

boolList pointIsCut_
private

Is mesh point cut.

Definition at line 117 of file cellCuts.H.

Referenced by cellCuts::calcFaceCuts(), and cellCuts::pointIsCut().

◆ edgeIsCut_

boolList edgeIsCut_
private

Is edge cut.

Definition at line 120 of file cellCuts.H.

Referenced by cellCuts::calcFaceCuts(), and cellCuts::edgeIsCut().

◆ edgeWeight_

scalarField edgeWeight_
private

If edge is cut gives weight (0->start() to 1->end())

Definition at line 123 of file cellCuts.H.

Referenced by cellCuts::edgeWeight().

◆ faceCutsPtr_

labelListList* faceCutsPtr_
mutableprivate

Cuts per existing face (includes those along edge of face)

Cuts in no particular order.

Definition at line 130 of file cellCuts.H.

Referenced by cellCuts::calcFaceCuts().

◆ faceSplitCut_

Map<edge> faceSplitCut_
private

Per face : cut across edge (so not along existing edge)

(can only be one per face)

Definition at line 134 of file cellCuts.H.

Referenced by cellCuts::faceSplitCut().

◆ cellLoops_

labelListList cellLoops_
private

Loop across cell circumference.

Definition at line 140 of file cellCuts.H.

Referenced by cellCuts::cellLoops().

◆ nLoops_

label nLoops_
private

Number of valid loops in cellLoops_.

Definition at line 143 of file cellCuts.H.

Referenced by cellCuts::nLoops().

◆ cellAnchorPoints_

labelListList cellAnchorPoints_
private

For each cut cell the points on the 'anchor' side of the cell.

Definition at line 146 of file cellCuts.H.

Referenced by cellCuts::cellAnchorPoints().


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