Go to the documentation of this file.
245 const label startCut,
247 const label exclude0,
248 const label exclude1,
250 const label otherCut,
260 const label startCut,
262 const label otherCut,
283 const label startCut,
288 label& beforeLastCut,
299 const label startCut,
void flip(const label cellI)
Flip loop for cellI. Updates anchor points as well.
label edgeEdgeToFace(const label cellI, const label edgeA, const label edgeB) const
Find face on cell using the two edges.
scalarField loopWeights(const labelList &loop) const
Returns weights of loop. Inverse of loopPoints.
labelListList * faceCutsPtr_
Cuts per existing face (includes those along edge of face)
label nLoops() const
Number of valid cell loops.
void calcLoopsAndAddressing(const labelList &cutCells)
Top level driver: adressing calculation and loop detection.
const boolList & pointIsCut() const
Is mesh point cut.
label vertexVertexToFace(const label cellI, const label vertA, const label vertB) const
Find face using two vertices (guaranteed not to be along edge)
const Map< edge > & faceSplitCut() const
Gives for split face the two cuts that split the face into two.
boolList edgeIsCut_
Is edge cut.
A class for handling file names.
void calcFaceCuts() const
Calculate faceCuts in face vertex order.
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.
void operator=(const cellCuts &)
Disallow default bitwise assignment.
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.
boolList pointIsCut_
Is mesh point cut.
cellCuts(const cellCuts &)
Disallow default bitwise copy construct.
Combines edge or vertex in single label. Used to specify cuts across cell circumference.
A HashTable to objects of type <T> with a label key.
const labelListList & cellAnchorPoints() const
For each cut cell the points on the 'anchor' side of the cell.
void writeCellOBJ(const fileName &dir, const label cellI) const
debugging:Write edges of cell and loop
label nLoops_
Number of valid loops in cellLoops_.
Mesh consisting of general polyhedral cells.
static label firstUnique(const labelList &lst, const Map< label > &)
Returns -1 or index of first element of lst that cannot be found.
const scalarField & edgeWeight() const
If edge is cut gives weight (ratio between start() and end())
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Pre-declare SubField and related Field type.
const labelListList & faceCuts() const
Cuts per existing face (includes those along edge of face)
const labelListList & cellLoops() const
For each cut cell the cut along the circumference.
Abstract base class. Concrete implementations know how to cut a cell (i.e. determine a loop around th...
void calcCellLoops(const labelList &cutCells)
Determine for every cut cell the face it is cut by.
label loopFace(const label cellI, const labelList &loop) const
Find face on which all cuts are (very rare) or -1.
bool checkFaces(const label cellI, const labelList &anchorPoints) const
Are there enough faces on anchor side of cellI?
Patchify triangles based on orientation w.r.t other (triangulated or triangulatable) surfaces.
bool conservativeValidLoop(const label cellI, const labelList &loop) const
Determines if loop through cellI consistent with existing.
labelList nonAnchorPoints(const labelList &cellPoints, const labelList &anchorPoints, const labelList &loop) const
Invert anchor point selection.
bool validEdgeLoop(const labelList &loop, const scalarField &loopWeights) const
Check if cut edges in loop are compatible with ones in.
labelListList cellAnchorPoints_
For each cut cell the points on the 'anchor' side of the cell.
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.
scalarField edgeWeight_
If edge is cut gives weight (0->start() to 1->end())
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.
static boolList expand(const label size, const labelList &labels)
Create boolList with all labels specified set to true.
void setFromCellLoops()
Update basic cut information from cellLoops. Assumes cellLoops_.
bool loopAnchorConsistent(const label cellI, const pointField &loopPts, const labelList &anchorPoints) const
Check anchor points on 'outside' of loop.
void writeUncutOBJ(const fileName &, const label cellI) const
Debugging: write cell's edges and any cut vertices and edges.
void flipLoopOnly(const label cellI)
Flip loop for cellI. Does not update anchors. Use with care.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const boolList & edgeIsCut() const
Is edge cut.
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.
void check() const
Check various consistencies.
label countFaceCuts(const label faceI, const labelList &loop) const
Counts number of cuts on face.
ClassName("cellCuts")
Runtime type information.
static label findPartIndex(const labelList &, const label n, const label val)
Find value in first n elements of list.
label findEdge(const label faceI, const label v0, const label v1) const
Find edge (or -1) on faceI using vertices v0,v1.
void clearOut()
Clear out demand driven storage.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
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)
void orientPlanesAndLoops()
Set orientation of loops.
Map< edge > faceSplitCut_
Per face : cut across edge (so not along existing edge)
pointField loopPoints(const labelList &loop, const scalarField &loopWeights) const
Returns coordinates of points on loop with explicitly provided.
void setFromCellCutter(const cellLooper &, const List< refineCell > &refCells)
Cut cells and update basic cut information from cellLoops.
bool setFromCellLoop(const label cellI, const labelList &loop, const scalarField &loopWeights)
Update basic cut information for single cell from cellLoop.
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.
label edgeVertexToFace(const label cellI, const label edgeI, const label vertI) const
Find face on cell using an edge and a vertex.
bool addCut(const label cellI, const label cut, label &nVisited, labelList &visited) const
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.
Description of cuts across cells.
labelListList cellLoops_
Loop across cell circumference.
const polyMesh & mesh() const