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

Refinement of (split) hexes using polyTopoChange. More...

Collaboration diagram for hexRef8:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("hexRef8")
 Runtime type information. More...
 
 hexRef8 (const polyMesh &mesh, const bool readHistory=true)
 Construct from mesh, read_if_present refinement data. More...
 
 hexRef8 (const polyMesh &mesh, const labelList &cellLevel, const labelList &pointLevel, const refinementHistory &history, const scalar level0Edge=-GREAT)
 Construct from mesh and un/refinement data and optional size of. More...
 
 hexRef8 (const polyMesh &mesh, const labelList &cellLevel, const labelList &pointLevel, const scalar level0Edge=-GREAT)
 Construct from mesh and refinement data and optional size of. More...
 
const polyMeshmesh () const
 
const labelIOListcellLevel () const
 
const labelIOListpointLevel () const
 
const refinementHistoryhistory () const
 
scalar level0EdgeLength () const
 Typical edge length between unrefined points. More...
 
label faceLevel (const label faceI) const
 Gets level such that the face has four points <= level. More...
 
labelList consistentRefinement (const labelList &cellsToRefine, const bool maxSet) const
 Given valid mesh and current cell level and proposed. More...
 
labelList consistentSlowRefinement (const label maxFaceDiff, const labelList &cellsToRefine, const labelList &facesToCheck, const label maxPointDiff, const labelList &pointsToCheck) const
 Like consistentRefinement but slower: More...
 
labelList consistentSlowRefinement2 (const label maxFaceDiff, const labelList &cellsToRefine, const labelList &facesToCheck) const
 Like consistentSlowRefinement but uses different meshWave. More...
 
labelListList setRefinement (const labelList &cells, polyTopoChange &)
 Insert refinement. All selected cells will be split into 8. More...
 
void updateMesh (const mapPolyMesh &)
 Update local numbering for changed mesh. More...
 
void storeData (const labelList &pointsToStore, const labelList &facesToStore, const labelList &cellsToStore)
 Signal points/face/cells for which to store data. More...
 
void updateMesh (const mapPolyMesh &, const Map< label > &pointsToRestore, const Map< label > &facesToRestore, const Map< label > &cellsToRestore)
 Update local numbering + undo. More...
 
void subset (const labelList &pointMap, const labelList &faceMap, const labelList &cellMap)
 Update local numbering for subsetted mesh. More...
 
void distribute (const mapDistributePolyMesh &)
 Update local numbering for mesh redistribution. More...
 
void checkMesh () const
 Debug: Check coupled mesh for correctness. More...
 
void checkRefinementLevels (const label maxPointDiff, const labelList &pointsToCheck) const
 Debug: Check 2:1 consistency across faces. More...
 
const cellShapeListcellShapes () const
 Utility: get hexes as cell shapes. More...
 
labelList getSplitPoints () const
 Return the points at the centre of top-level split cells. More...
 
labelList consistentUnrefinement (const labelList &pointsToUnrefine, const bool maxSet) const
 Given proposed. More...
 
void setUnrefinement (const labelList &splitPointLabels, polyTopoChange &)
 Remove some refinement. Needs to be supplied output of. More...
 
void setInstance (const fileName &inst)
 
bool write () const
 Force writing refinement+history to polyMesh directory. More...
 
 ClassName ("hexRef8")
 Runtime type information. More...
 
 hexRef8 (const polyMesh &mesh, const bool readHistory=true)
 Construct from mesh, read_if_present refinement data. More...
 
 hexRef8 (const polyMesh &mesh, const labelList &cellLevel, const labelList &pointLevel, const refinementHistory &history, const scalar level0Edge=-GREAT)
 Construct from mesh and un/refinement data and optional size of. More...
 
 hexRef8 (const polyMesh &mesh, const labelList &cellLevel, const labelList &pointLevel, const scalar level0Edge=-GREAT)
 Construct from mesh and refinement data and optional size of. More...
 
const polyMeshmesh () const
 
const labelIOListcellLevel () const
 
const labelIOListpointLevel () const
 
const refinementHistoryhistory () const
 
scalar level0EdgeLength () const
 Typical edge length between unrefined points. More...
 
label faceLevel (const label faceI) const
 Gets level such that the face has four points <= level. More...
 
labelList consistentRefinement (const labelList &cellsToRefine, const bool maxSet) const
 Given valid mesh and current cell level and proposed. More...
 
labelList consistentSlowRefinement (const label maxFaceDiff, const labelList &cellsToRefine, const labelList &facesToCheck, const label maxPointDiff, const labelList &pointsToCheck) const
 Like consistentRefinement but slower: More...
 
labelList consistentSlowRefinement2 (const label maxFaceDiff, const labelList &cellsToRefine, const labelList &facesToCheck) const
 Like consistentSlowRefinement but uses different meshWave. More...
 
labelListList setRefinement (const labelList &cells, polyTopoChange &)
 Insert refinement. All selected cells will be split into 8. More...
 
void updateMesh (const mapPolyMesh &)
 Update local numbering for changed mesh. More...
 
void storeData (const labelList &pointsToStore, const labelList &facesToStore, const labelList &cellsToStore)
 Signal points/face/cells for which to store data. More...
 
void updateMesh (const mapPolyMesh &, const Map< label > &pointsToRestore, const Map< label > &facesToRestore, const Map< label > &cellsToRestore)
 Update local numbering + undo. More...
 
void subset (const labelList &pointMap, const labelList &faceMap, const labelList &cellMap)
 Update local numbering for subsetted mesh. More...
 
void distribute (const mapDistributePolyMesh &)
 Update local numbering for mesh redistribution. More...
 
void checkMesh () const
 Debug: Check coupled mesh for correctness. More...
 
void checkRefinementLevels (const label maxPointDiff, const labelList &pointsToCheck) const
 Debug: Check 2:1 consistency across faces. More...
 
const cellShapeListcellShapes () const
 Utility: get hexes as cell shapes. More...
 
labelList getSplitPoints () const
 Return the points at the centre of top-level split cells. More...
 
labelList consistentUnrefinement (const labelList &pointsToUnrefine, const bool maxSet) const
 Given proposed. More...
 
void setUnrefinement (const labelList &splitPointLabels, polyTopoChange &)
 Remove some refinement. Needs to be supplied output of. More...
 
void setInstance (const fileName &inst)
 
bool write () const
 Force writing refinement+history to polyMesh directory. More...
 

Private Member Functions

void getFaceInfo (const label faceI, label &patchID, label &zoneID, label &zoneFlip) const
 Get patch and zone info. More...
 
label addFace (polyTopoChange &meshMod, const label faceI, const face &newFace, const label own, const label nei) const
 Adds a face on top of existing faceI. Reverses if necessary. More...
 
label addInternalFace (polyTopoChange &meshMod, const label meshFaceI, const label meshPointI, const face &newFace, const label own, const label nei) const
 Adds internal face from point. No checks on reversal. More...
 
void modFace (polyTopoChange &meshMod, const label faceI, const face &newFace, const label own, const label nei) const
 Modifies existing faceI for either new owner/neighbour or new face. More...
 
scalar getLevel0EdgeLength () const
 
label getAnchorCell (const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const label cellI, const label faceI, const label pointI) const
 Get cell added to point of cellI (if any) More...
 
void getFaceNeighbours (const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const label faceI, const label pointI, label &own, label &nei) const
 Get new owner and neighbour (in unspecified order) of pointI. More...
 
label findMinLevel (const labelList &f) const
 Get index of minimum pointlevel. More...
 
label findMaxLevel (const labelList &f) const
 Get maximum pointlevel. More...
 
label countAnchors (const labelList &, const label) const
 Count number of vertices <= anchorLevel. More...
 
void dumpCell (const label cellI) const
 Debugging: dump cell as .obj file. More...
 
label findLevel (const label faceI, const face &f, const label startFp, const bool searchForward, const label wantedLevel) const
 Find index of point with wantedLevel, starting from fp. More...
 
void insertEdgeSplit (const labelList &edgeMidPoint, const label p0, const label p1, DynamicList< label > &verts) const
 If p0 and p1 are existing vertices check if edge is split and insert. More...
 
label storeMidPointInfo (const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const labelList &cellMidPoint, const labelList &edgeMidPoint, const label cellI, const label faceI, const bool faceOrder, const label midPointI, const label anchorPointI, const label faceMidPointI, Map< edge > &midPointToAnchors, Map< edge > &midPointToFaceMids, polyTopoChange &meshMod) const
 Store in maps correspondence from midpoint to anchors and faces. More...
 
void createInternalFromSplitFace (const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const labelList &cellMidPoint, const labelList &faceMidPoint, const labelList &edgeMidPoint, const label cellI, const label faceI, Map< edge > &midPointToAnchors, Map< edge > &midPointToFaceMids, polyTopoChange &meshMod, label &nFacesAdded) const
 Create all internal faces from an unsplit face. More...
 
void createInternalFaces (const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const labelList &cellMidPoint, const labelList &faceMidPoint, const labelList &faceAnchorLevel, const labelList &edgeMidPoint, const label cellI, polyTopoChange &meshMod) const
 Create all internal faces to split cellI into 8. More...
 
void walkFaceToMid (const labelList &edgeMidPoint, const label cLevel, const label faceI, const label startFp, DynamicList< label > &faceVerts) const
 Store vertices from startFp upto face split point. More...
 
void walkFaceFromMid (const labelList &edgeMidPoint, const label cLevel, const label faceI, const label startFp, DynamicList< label > &faceVerts) const
 Same as walkFaceToMid but now walk back. More...
 
label faceConsistentRefinement (const bool maxSet, PackedBoolList &refineCell) const
 Updates refineCell so consistent 2:1 refinement. Returns local. More...
 
void checkWantedRefinementLevels (const labelList &) const
 Check wanted refinement for 2:1 consistency. More...
 
void collectLevelPoints (const labelList &f, const label level, DynamicList< label > &points) const
 Collect all points on face of certain level. More...
 
void collectLevelPoints (const labelList &meshPoints, const labelList &f, const label level, DynamicList< label > &points) const
 Collect all points on face (in local numbering) of certain level. More...
 
bool matchHexShape (const label cellI, const label cellLevel, DynamicList< face > &quads) const
 Collect all faces with four corner points and return true if. More...
 
 hexRef8 (const hexRef8 &)
 Disallow default bitwise copy construct. More...
 
void operator= (const hexRef8 &)
 Disallow default bitwise assignment. More...
 
void getFaceInfo (const label faceI, label &patchID, label &zoneID, label &zoneFlip) const
 Get patch and zone info. More...
 
label addFace (polyTopoChange &meshMod, const label faceI, const face &newFace, const label own, const label nei) const
 Adds a face on top of existing faceI. Reverses if necessary. More...
 
label addInternalFace (polyTopoChange &meshMod, const label meshFaceI, const label meshPointI, const face &newFace, const label own, const label nei) const
 Adds internal face from point. No checks on reversal. More...
 
void modFace (polyTopoChange &meshMod, const label faceI, const face &newFace, const label own, const label nei) const
 Modifies existing faceI for either new owner/neighbour or new face. More...
 
scalar getLevel0EdgeLength () const
 
label getAnchorCell (const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const label cellI, const label faceI, const label pointI) const
 Get cell added to point of cellI (if any) More...
 
void getFaceNeighbours (const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const label faceI, const label pointI, label &own, label &nei) const
 Get new owner and neighbour (in unspecified order) of pointI. More...
 
label findMinLevel (const labelList &f) const
 Get index of minimum pointlevel. More...
 
label findMaxLevel (const labelList &f) const
 Get maximum pointlevel. More...
 
label countAnchors (const labelList &, const label) const
 Count number of vertices <= anchorLevel. More...
 
void dumpCell (const label cellI) const
 Debugging: dump cell as .obj file. More...
 
label findLevel (const label faceI, const face &f, const label startFp, const bool searchForward, const label wantedLevel) const
 Find index of point with wantedLevel, starting from fp. More...
 
void insertEdgeSplit (const labelList &edgeMidPoint, const label p0, const label p1, DynamicList< label > &verts) const
 If p0 and p1 are existing vertices check if edge is split and insert. More...
 
label storeMidPointInfo (const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const labelList &cellMidPoint, const labelList &edgeMidPoint, const label cellI, const label faceI, const bool faceOrder, const label midPointI, const label anchorPointI, const label faceMidPointI, Map< edge > &midPointToAnchors, Map< edge > &midPointToFaceMids, polyTopoChange &meshMod) const
 Store in maps correspondence from midpoint to anchors and faces. More...
 
void createInternalFromSplitFace (const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const labelList &cellMidPoint, const labelList &faceMidPoint, const labelList &edgeMidPoint, const label cellI, const label faceI, Map< edge > &midPointToAnchors, Map< edge > &midPointToFaceMids, polyTopoChange &meshMod, label &nFacesAdded) const
 Create all internal faces from an unsplit face. More...
 
void createInternalFaces (const labelListList &cellAnchorPoints, const labelListList &cellAddedCells, const labelList &cellMidPoint, const labelList &faceMidPoint, const labelList &faceAnchorLevel, const labelList &edgeMidPoint, const label cellI, polyTopoChange &meshMod) const
 Create all internal faces to split cellI into 8. More...
 
void walkFaceToMid (const labelList &edgeMidPoint, const label cLevel, const label faceI, const label startFp, DynamicList< label > &faceVerts) const
 Store vertices from startFp upto face split point. More...
 
void walkFaceFromMid (const labelList &edgeMidPoint, const label cLevel, const label faceI, const label startFp, DynamicList< label > &faceVerts) const
 Same as walkFaceToMid but now walk back. More...
 
label faceConsistentRefinement (const bool maxSet, PackedBoolList &refineCell) const
 Updates refineCell so consistent 2:1 refinement. Returns local. More...
 
void checkWantedRefinementLevels (const labelList &) const
 Check wanted refinement for 2:1 consistency. More...
 
void collectLevelPoints (const labelList &f, const label level, DynamicList< label > &points) const
 Collect all points on face of certain level. More...
 
void collectLevelPoints (const labelList &meshPoints, const labelList &f, const label level, DynamicList< label > &points) const
 Collect all points on face (in local numbering) of certain level. More...
 
bool matchHexShape (const label cellI, const label cellLevel, DynamicList< face > &quads) const
 Collect all faces with four corner points and return true if. More...
 
 hexRef8 (const hexRef8 &)
 Disallow default bitwise copy construct. More...
 
void operator= (const hexRef8 &)
 Disallow default bitwise assignment. More...
 

Static Private Member Functions

static void reorder (const labelList &map, const label len, const label null, labelList &elems)
 Reorder according to map. More...
 
static void checkInternalOrientation (polyTopoChange &meshMod, const label cellI, const label faceI, const point &ownPt, const point &neiPt, const face &newFace)
 debug:check orientation of added internal face More...
 
static void checkBoundaryOrientation (polyTopoChange &meshMod, const label cellI, const label faceI, const point &ownPt, const point &boundaryPt, const face &newFace)
 debug:check orientation of new boundary face More...
 
static void reorder (const labelList &map, const label len, const label null, labelList &elems)
 Reorder according to map. More...
 
static void checkInternalOrientation (polyTopoChange &meshMod, const label cellI, const label faceI, const point &ownPt, const point &neiPt, const face &newFace)
 debug:check orientation of added internal face More...
 
static void checkBoundaryOrientation (polyTopoChange &meshMod, const label cellI, const label faceI, const point &ownPt, const point &boundaryPt, const face &newFace)
 debug:check orientation of new boundary face More...
 

Private Attributes

const polyMeshmesh_
 Reference to underlying mesh. More...
 
labelIOList cellLevel_
 Per cell the refinement level. More...
 
labelIOList pointLevel_
 Per point the refinement level. More...
 
uniformDimensionedScalarField level0Edge_
 Typical edge length between unrefined points. More...
 
refinementHistory history_
 Refinement history. More...
 
removeFaces faceRemover_
 Face remover engine. More...
 
Map< labelsavedPointLevel_
 Level of saved points. More...
 
Map< labelsavedCellLevel_
 Level of saved cells. More...
 
autoPtr< cellShapeListcellShapesPtr_
 Cell shapes when seen as split hexes. More...
 

Detailed Description

Refinement of (split) hexes using polyTopoChange.

Source files

Source files

Definition at line 64 of file hexRef4.H.

Constructor & Destructor Documentation

◆ hexRef8() [1/8]

hexRef8 ( const hexRef8 )
private

Disallow default bitwise copy construct.

◆ hexRef8() [2/8]

hexRef8 ( const polyMesh mesh,
const bool  readHistory = true 
)

◆ hexRef8() [3/8]

hexRef8 ( const polyMesh mesh,
const labelList cellLevel,
const labelList pointLevel,
const refinementHistory history,
const scalar  level0Edge = -GREAT 
)

Construct from mesh and un/refinement data and optional size of.

starting cells

Definition at line 2048 of file hexRef4.C.

References Foam::abort(), Foam::polyMeshGenChecks::checkMesh(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ hexRef8() [4/8]

hexRef8 ( const polyMesh mesh,
const labelList cellLevel,
const labelList pointLevel,
const scalar  level0Edge = -GREAT 
)

Construct from mesh and refinement data and optional size of.

starting cells

Definition at line 2157 of file hexRef4.C.

References Foam::abort(), Foam::polyMeshGenChecks::checkMesh(), Foam::endl(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ hexRef8() [5/8]

hexRef8 ( const hexRef8 )
private

Disallow default bitwise copy construct.

◆ hexRef8() [6/8]

hexRef8 ( const polyMesh mesh,
const bool  readHistory = true 
)

Construct from mesh, read_if_present refinement data.

(from write below). If readHistory is true does read_if_present of refinement history. If false clears all history

◆ hexRef8() [7/8]

hexRef8 ( const polyMesh mesh,
const labelList cellLevel,
const labelList pointLevel,
const refinementHistory history,
const scalar  level0Edge = -GREAT 
)

Construct from mesh and un/refinement data and optional size of.

starting cells

◆ hexRef8() [8/8]

hexRef8 ( const polyMesh mesh,
const labelList cellLevel,
const labelList pointLevel,
const scalar  level0Edge = -GREAT 
)

Construct from mesh and refinement data and optional size of.

starting cells

Member Function Documentation

◆ reorder() [1/2]

void reorder ( const labelList map,
const label  len,
const label  null,
labelList elems 
)
staticprivate

Reorder according to map.

Definition at line 69 of file hexRef8.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, and List::transfer().

Here is the call graph for this function:

◆ getFaceInfo() [1/2]

void getFaceInfo ( const label  faceI,
label patchID,
label zoneID,
label zoneFlip 
) const
private

Get patch and zone info.

Definition at line 98 of file hexRef8.C.

References faceZone::flipMap(), and faceZone::whichFace().

Here is the call graph for this function:

◆ addFace() [1/2]

Foam::label addFace ( polyTopoChange meshMod,
const label  faceI,
const face newFace,
const label  own,
const label  nei 
) const
private

Adds a face on top of existing faceI. Reverses if necessary.

Definition at line 127 of file hexRef8.C.

References face::reverseFace(), and polyTopoChange::setAction().

Here is the call graph for this function:

◆ addInternalFace() [1/2]

Foam::label addInternalFace ( polyTopoChange meshMod,
const label  meshFaceI,
const label  meshPointI,
const face newFace,
const label  own,
const label  nei 
) const
private

Adds internal face from point. No checks on reversal.

Definition at line 192 of file hexRef8.C.

References polyTopoChange::setAction().

Here is the call graph for this function:

◆ modFace() [1/2]

void modFace ( polyTopoChange meshMod,
const label  faceI,
const face newFace,
const label  own,
const label  nei 
) const
private

Modifies existing faceI for either new owner/neighbour or new face.

points. Reverses if necessary.

Definition at line 288 of file hexRef4.C.

References face::reverseFace(), and polyTopoChange::setAction().

Here is the call graph for this function:

◆ getLevel0EdgeLength() [1/2]

Foam::scalar getLevel0EdgeLength ( ) const
private

◆ getAnchorCell() [1/2]

Foam::label getAnchorCell ( const labelListList cellAnchorPoints,
const labelListList cellAddedCells,
const label  cellI,
const label  faceI,
const label  pointI 
) const
private

Get cell added to point of cellI (if any)

Definition at line 536 of file hexRef4.C.

References Foam::abort(), Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, and Foam::Perr.

Here is the call graph for this function:

◆ getFaceNeighbours() [1/2]

void getFaceNeighbours ( const labelListList cellAnchorPoints,
const labelListList cellAddedCells,
const label  faceI,
const label  pointI,
label own,
label nei 
) const
private

Get new owner and neighbour (in unspecified order) of pointI.

on faceI.

Definition at line 593 of file hexRef4.C.

◆ findMinLevel() [1/2]

Foam::label findMinLevel ( const labelList f) const
private

Get index of minimum pointlevel.

Definition at line 632 of file hexRef4.C.

References f(), forAll, and Foam::labelMax.

Here is the call graph for this function:

◆ findMaxLevel() [1/2]

Foam::label findMaxLevel ( const labelList f) const
private

Get maximum pointlevel.

Definition at line 653 of file hexRef4.C.

References f(), forAll, and Foam::labelMin.

Here is the call graph for this function:

◆ countAnchors() [1/2]

Foam::label countAnchors ( const labelList f,
const label  anchorLevel 
) const
private

Count number of vertices <= anchorLevel.

Definition at line 674 of file hexRef4.C.

References f(), and forAll.

Here is the call graph for this function:

◆ dumpCell() [1/2]

void dumpCell ( const label  cellI) const
private

Debugging: dump cell as .obj file.

Definition at line 692 of file hexRef4.C.

References Foam::endl(), f(), forAll, OFstream::name(), Foam::name(), Foam::nl, Foam::Pout, and Foam::meshTools::writeOBJ().

Here is the call graph for this function:

◆ findLevel() [1/2]

Foam::label findLevel ( const label  faceI,
const face f,
const label  startFp,
const bool  searchForward,
const label  wantedLevel 
) const
private

Find index of point with wantedLevel, starting from fp.

Definition at line 734 of file hexRef4.C.

References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, and forAll.

Here is the call graph for this function:

◆ checkInternalOrientation() [1/2]

void checkInternalOrientation ( polyTopoChange meshMod,
const label  cellI,
const label  faceI,
const point ownPt,
const point neiPt,
const face newFace 
)
staticprivate

debug:check orientation of added internal face

Definition at line 825 of file hexRef4.C.

References Foam::abort(), face::centre(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::identity(), n, face::normal(), polyTopoChange::points(), s(), and List::size().

Here is the call graph for this function:

◆ checkBoundaryOrientation() [1/2]

void checkBoundaryOrientation ( polyTopoChange meshMod,
const label  cellI,
const label  faceI,
const point ownPt,
const point boundaryPt,
const face newFace 
)
staticprivate

debug:check orientation of new boundary face

Definition at line 871 of file hexRef4.C.

References Foam::abort(), face::centre(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::identity(), Foam::magSqr(), n, face::normal(), polyTopoChange::points(), s(), List::size(), and WarningInFunction.

Here is the call graph for this function:

◆ insertEdgeSplit() [1/2]

void insertEdgeSplit ( const labelList edgeMidPoint,
const label  p0,
const label  p1,
DynamicList< label > &  verts 
) const
private

If p0 and p1 are existing vertices check if edge is split and insert.

splitPoint.

Definition at line 920 of file hexRef4.C.

References DynamicList::append(), and Foam::meshTools::findEdge().

Here is the call graph for this function:

◆ storeMidPointInfo() [1/2]

Foam::label storeMidPointInfo ( const labelListList cellAnchorPoints,
const labelListList cellAddedCells,
const labelList cellMidPoint,
const labelList edgeMidPoint,
const label  cellI,
const label  faceI,
const bool  faceOrder,
const label  midPointI,
const label  anchorPointI,
const label  faceMidPointI,
Map< edge > &  midPointToAnchors,
Map< edge > &  midPointToFaceMids,
polyTopoChange meshMod 
) const
private

Store in maps correspondence from midpoint to anchors and faces.

Definition at line 948 of file hexRef4.C.

References DynamicList::append(), Foam::e, face::flip(), edge::otherVertex(), and List::transfer().

Here is the call graph for this function:

◆ createInternalFromSplitFace() [1/2]

void createInternalFromSplitFace ( const labelListList cellAnchorPoints,
const labelListList cellAddedCells,
const labelList cellMidPoint,
const labelList faceMidPoint,
const labelList edgeMidPoint,
const label  cellI,
const label  faceI,
Map< edge > &  midPointToAnchors,
Map< edge > &  midPointToFaceMids,
polyTopoChange meshMod,
label nFacesAdded 
) const
private

Create all internal faces from an unsplit face.

◆ createInternalFaces() [1/2]

void createInternalFaces ( const labelListList cellAnchorPoints,
const labelListList cellAddedCells,
const labelList cellMidPoint,
const labelList faceMidPoint,
const labelList faceAnchorLevel,
const labelList edgeMidPoint,
const label  cellI,
polyTopoChange meshMod 
) const
private

Create all internal faces to split cellI into 8.

Definition at line 1178 of file hexRef4.C.

References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, and forAll.

Here is the call graph for this function:

◆ walkFaceToMid() [1/2]

void walkFaceToMid ( const labelList edgeMidPoint,
const label  cLevel,
const label  faceI,
const label  startFp,
DynamicList< label > &  faceVerts 
) const
private

Store vertices from startFp upto face split point.

Used when splitting face into 4.

Definition at line 1460 of file hexRef4.C.

References DynamicList::append(), and f().

Here is the call graph for this function:

◆ walkFaceFromMid() [1/2]

void walkFaceFromMid ( const labelList edgeMidPoint,
const label  cLevel,
const label  faceI,
const label  startFp,
DynamicList< label > &  faceVerts 
) const
private

Same as walkFaceToMid but now walk back.

Definition at line 1509 of file hexRef4.C.

References DynamicList::append(), and f().

Here is the call graph for this function:

◆ faceConsistentRefinement() [1/2]

Foam::label faceConsistentRefinement ( const bool  maxSet,
PackedBoolList refineCell 
) const
private

Updates refineCell so consistent 2:1 refinement. Returns local.

number of cells changed.

Definition at line 1564 of file hexRef4.C.

References forAll, and syncTools::swapBoundaryFaceList().

Here is the call graph for this function:

◆ checkWantedRefinementLevels() [1/2]

void checkWantedRefinementLevels ( const labelList cellsToRefine) const
private

Check wanted refinement for 2:1 consistency.

Definition at line 1651 of file hexRef4.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), Foam::nl, and syncTools::swapBoundaryFaceList().

Here is the call graph for this function:

◆ collectLevelPoints() [1/4]

void collectLevelPoints ( const labelList f,
const label  level,
DynamicList< label > &  points 
) const
private

Collect all points on face of certain level.

Definition at line 1749 of file hexRef4.C.

References f(), forAll, and points.

Here is the call graph for this function:

◆ collectLevelPoints() [2/4]

void collectLevelPoints ( const labelList meshPoints,
const labelList f,
const label  level,
DynamicList< label > &  points 
) const
private

Collect all points on face (in local numbering) of certain level.

Definition at line 1766 of file hexRef4.C.

References f(), forAll, and points.

Here is the call graph for this function:

◆ matchHexShape() [1/2]

bool matchHexShape ( const label  cellI,
const label  cellLevel,
DynamicList< face > &  quads 
) const
private

Collect all faces with four corner points and return true if.

hex was matched (6 faces of each four corner points)

Definition at line 1786 of file hexRef4.C.

References DynamicList::append(), DynamicList::clear(), PrimitivePatch< Face, FaceList, PointField, PointType >::edgeLoops(), f(), Foam::findIndex(), forAll, forAllConstIter(), PrimitivePatch< Face, FaceList, PointField, PointType >::meshPoints(), pFaces, Foam::reverse(), List::size(), and List::transfer().

Here is the call graph for this function:

◆ operator=() [1/2]

void operator= ( const hexRef8 )
private

Disallow default bitwise assignment.

◆ ClassName() [1/2]

ClassName ( "hexRef8"  )

Runtime type information.

◆ mesh() [1/2]

const polyMesh& mesh ( ) const
inline

Definition at line 384 of file hexRef4.H.

References hexRef8::mesh_.

◆ cellLevel() [1/2]

const labelIOList& cellLevel ( ) const
inline

Definition at line 389 of file hexRef4.H.

References hexRef8::cellLevel_.

Referenced by dynamicRefineFvMesh::dynamicRefineFvMesh(), autoRefineDriver::refinementInterfaceRefine(), and autoSnapDriver::smoothInternalDisplacement().

Here is the caller graph for this function:

◆ pointLevel() [1/2]

const labelIOList& pointLevel ( ) const
inline

Definition at line 394 of file hexRef4.H.

References hexRef8::pointLevel_.

Referenced by dynamicRefineFvMesh::dynamicRefineFvMesh().

Here is the caller graph for this function:

◆ history() [1/2]

const refinementHistory& history ( ) const
inline

Definition at line 399 of file hexRef4.H.

References hexRef8::history_.

◆ level0EdgeLength() [1/2]

scalar level0EdgeLength ( ) const
inline

Typical edge length between unrefined points.

Definition at line 405 of file hexRef4.H.

References hexRef8::level0Edge_, and dimensioned::value().

Here is the call graph for this function:

◆ faceLevel() [1/2]

Foam::label faceLevel ( const label  faceI) const

Gets level such that the face has four points <= level.

Definition at line 796 of file hexRef4.C.

References f(), and List::size().

Referenced by autoRefineDriver::refinementInterfaceRefine().

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

◆ consistentRefinement() [1/2]

Foam::labelList consistentRefinement ( const labelList cellsToRefine,
const bool  maxSet 
) const

Given valid mesh and current cell level and proposed.

cells to refine calculate any clashes (due to 2:1) and return ok list of cells to refine. Either adds cells to refine to set (maxSet = true) or removes cells to refine (maxSet = false)

Definition at line 2258 of file hexRef4.C.

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

Referenced by multiDirRefinement::refineHex8().

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

◆ consistentSlowRefinement() [1/2]

Foam::labelList consistentSlowRefinement ( const label  maxFaceDiff,
const labelList cellsToRefine,
const labelList facesToCheck,
const label  maxPointDiff,
const labelList pointsToCheck 
) const

Like consistentRefinement but slower:

  • specify number of cells between consecutive refinement levels (consistentRefinement equivalent to 1)
  • specify max level difference between point-connected cells. (-1 to disable) Note that with normal 2:1 limitation (maxFaceDiff=1) there can be 8:1 size difference across point connected cells so maxPointDiff allows you to make that less. cellsToRefine : cells we're thinking about refining. It will extend this set. All refinement levels will be at least maxFaceDiff layers thick. facesToCheck : additional faces where to implement the maxFaceDiff thickness (usually only boundary faces)

Definition at line 2333 of file hexRef4.C.

References Foam::abort(), DynamicList::append(), DynamicList::clear(), refinementData::count(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findIndices(), forAll, forAllConstIter(), FaceCellWave< Type, TrackingData >::iterate(), Foam::labelMin, Foam::mag(), Foam::max(), Foam::nl, Foam::Pout, Foam::reduce(), DynamicList::setCapacity(), FaceCellWave< Type, TrackingData >::setFaceInfo(), DynamicList::shrink(), List::size(), syncTools::swapBoundaryFaceList(), syncTools::syncPointList(), and refinementData::updateFace().

Here is the call graph for this function:

◆ consistentSlowRefinement2() [1/2]

Foam::labelList consistentSlowRefinement2 ( const label  maxFaceDiff,
const labelList cellsToRefine,
const labelList facesToCheck 
) const

Like consistentSlowRefinement but uses different meshWave.

(proper distance instead of toplogical count). No point checks yet.

Definition at line 2817 of file hexRef4.C.

References Foam::abort(), DynamicList::append(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::findIndices(), forAll, PackedList::get(), HashSet< Key, Hash >::insert(), Foam::nl, IOobject::objectPath(), Foam::Pout, FaceCellWave< Type, TrackingData >::propagationTol(), Foam::reduce(), DynamicList::shrink(), List::size(), HashTable::size(), and regIOobject::write().

Here is the call graph for this function:

◆ setRefinement() [1/2]

Foam::labelListList setRefinement ( const labelList cells,
polyTopoChange meshMod 
)

Insert refinement. All selected cells will be split into 8.

Returns per element in cells the 8 cells they were split into. Guarantees that the 0th element is the original cell label. Mapping: -split cells: 7 new ones get added from original -split faces: original gets modified; 3 new ones get added from original -added internal faces: added from original cell face(if that was internal) or created out-of-nothing (so will not get mapped!). Note: could make this inflate from point but that will allocate interpolation. -points added to split edge: added from edge start() -midpoints added: added from cellPoints[0].

Definition at line 3242 of file hexRef4.C.

References Foam::abort(), DynamicList::append(), Foam::polyMeshGenChecks::checkMesh(), Foam::e, Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, forAll, PackedList::get(), HashSet< Key, Hash >::insert(), Foam::labelMax, Foam::labelMin, Foam::max(), Foam::min(), OFstream::name(), Foam::nl, IOobject::objectPath(), Foam::Pout, PackedBoolList::set(), polyTopoChange::setAction(), List::setSize(), List::size(), HashTable::size(), syncTools::swapBoundaryFaceList(), syncTools::syncBoundaryFacePositions(), syncTools::syncEdgeList(), syncTools::syncEdgePositions(), syncTools::syncFaceList(), List::transfer(), PackedBoolList::unset(), regIOobject::write(), and Foam::meshTools::writeOBJ().

Referenced by multiDirRefinement::refineHex8().

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

◆ updateMesh() [1/4]

void updateMesh ( const mapPolyMesh map)

Update local numbering for changed mesh.

Definition at line 4287 of file hexRef4.C.

Referenced by multiDirRefinement::refineHex8().

Here is the caller graph for this function:

◆ storeData() [1/2]

void storeData ( const labelList pointsToStore,
const labelList facesToStore,
const labelList cellsToStore 
)

Signal points/face/cells for which to store data.

Definition at line 4262 of file hexRef4.C.

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

Here is the call graph for this function:

◆ updateMesh() [2/4]

void updateMesh ( const mapPolyMesh map,
const Map< label > &  pointsToRestore,
const Map< label > &  facesToRestore,
const Map< label > &  cellsToRestore 
)

Update local numbering + undo.

Data to restore given as new pointlabel + stored pointlabel (i.e. what was in pointsToStore)

Definition at line 4299 of file hexRef4.C.

References Foam::abort(), mapPolyMesh::cellMap(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter(), mapPolyMesh::nOldCells(), mapPolyMesh::nOldPoints(), mapPolyMesh::pointMap(), Foam::Pout, Foam::reorder(), mapPolyMesh::reverseCellMap(), mapPolyMesh::reversePointMap(), List::size(), and List::transfer().

Here is the call graph for this function:

◆ subset() [1/2]

void subset ( const labelList pointMap,
const labelList faceMap,
const labelList cellMap 
)

Update local numbering for subsetted mesh.

Gets new-to-old maps. Not compatible with unrefinement.

Definition at line 4489 of file hexRef4.C.

References Foam::abort(), Foam::endl(), Foam::faceMap(), Foam::FatalError, FatalErrorInFunction, Foam::findIndex(), forAll, Foam::nl, Foam::Pout, List::size(), List::transfer(), and WarningInFunction.

Here is the call graph for this function:

◆ distribute() [1/2]

void distribute ( const mapDistributePolyMesh map)

Update local numbering for mesh redistribution.

Definition at line 4572 of file hexRef4.C.

References mapDistributePolyMesh::distributeCellData(), mapDistributePolyMesh::distributePointData(), Foam::endl(), and Foam::Pout.

Here is the call graph for this function:

◆ checkMesh() [1/2]

void checkMesh ( ) const

Debug: Check coupled mesh for correctness.

Definition at line 4600 of file hexRef4.C.

References Foam::abort(), polyPatch::coupled(), Foam::e, Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::mag(), patchIdentifier::name(), IOstream::name(), patches, Foam::Pout, List::size(), polyPatch::start(), and syncTools::swapBoundaryFaceList().

Referenced by hexRef8::hexRef8().

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

◆ checkRefinementLevels() [1/2]

void checkRefinementLevels ( const label  maxPointDiff,
const labelList pointsToCheck 
) const

Debug: Check 2:1 consistency across faces.

maxPointDiff==-1 : only check 2:1 across faces maxPointDiff!=-1 : check point-connected cells.

Gives problems after first splitting off inside mesher.

// Hanging points { Any patches with points having only two edges.

boolList isHangingPoint(mesh_.nPoints(), false);

const polyBoundaryMesh& patches = mesh_.boundaryMesh();

forAll(patches, patchI) { const polyPatch& pp = patches[patchI];

const labelList& meshPoints = pp.meshPoints();

forAll(meshPoints, i) { label pointI = meshPoints[i];

const labelList& pEdges = mesh_.pointEdges()[pointI];

if (pEdges.size() == 2) { isHangingPoint[pointI] = true; } } }

syncTools::syncPointList ( mesh_, isHangingPoint, andEqOp<bool>(), // only if all decide it is hanging point true, // null false // no separation );

OFstream str(mesh_.time().path()/"hangingPoints.obj");

label nHanging = 0;

forAll(isHangingPoint, pointI) { if (isHangingPoint[pointI]) { nHanging++;

Pout<< "Hanging boundary point " << pointI << " at " << mesh_.points()[pointI] << endl; meshTools::writeOBJ(str, mesh_.points()[pointI]); } }

if (returnReduce(nHanging, sumOp<label>()) > 0) { FatalErrorInFunction << "Detected a point used by two edges only (hanging point)" << nl << "This is not allowed" << abort(FatalError); } }

Definition at line 4810 of file hexRef4.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::labelMax, Foam::labelMin, Foam::mag(), Foam::max(), Foam::nl, Foam::Pout, syncTools::swapBoundaryFaceList(), and syncTools::syncPointList().

Referenced by hexRef8::hexRef8().

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

◆ cellShapes() [1/2]

const Foam::cellShapeList & cellShapes ( ) const

Utility: get hexes as cell shapes.

Definition at line 5062 of file hexRef4.C.

References Foam::endl(), forAll, degenerateMatcher::match(), Foam::nl, Foam::Pout, and DynamicList::xfer().

Here is the call graph for this function:

◆ getSplitPoints() [1/2]

Foam::labelList getSplitPoints ( ) const

Return the points at the centre of top-level split cells.

that can be unsplit.

Definition at line 5129 of file hexRef4.C.

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

Here is the call graph for this function:

◆ consistentUnrefinement() [1/2]

Foam::labelList consistentUnrefinement ( const labelList pointsToUnrefine,
const bool  maxSet 
) const

Given proposed.

splitPoints to unrefine according to calculate any clashes (due to 2:1) and return ok list of points to unrefine. Either adds points to refine to set (maxSet = true) or removes points to refine (maxSet = false)

Definition at line 5333 of file hexRef4.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, PackedList::get(), Foam::Pout, Foam::reduce(), PackedBoolList::set(), syncTools::swapBoundaryFaceList(), and PackedBoolList::unset().

Here is the call graph for this function:

◆ setUnrefinement() [1/2]

void setUnrefinement ( const labelList splitPointLabels,
polyTopoChange meshMod 
)

Remove some refinement. Needs to be supplied output of.

consistentUnrefinement. Only call if undoable set. All 8 pointCells of a split point will be combined into the lowest numbered cell of those 8.

Definition at line 5567 of file hexRef4.C.

References Foam::abort(), Foam::polyMeshGenChecks::checkMesh(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, HashSet< Key, Hash >::insert(), Foam::min(), Foam::nl, IOobject::objectPath(), pFaces, Foam::Pout, List::size(), HashTable::size(), HashTable::toc(), and regIOobject::write().

Here is the call graph for this function:

◆ setInstance() [1/2]

void setInstance ( const fileName inst)

Definition at line 1733 of file hexRef4.C.

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

Here is the call graph for this function:

◆ write() [1/2]

bool write ( ) const

Force writing refinement+history to polyMesh directory.

Definition at line 5756 of file hexRef4.C.

◆ reorder() [2/2]

static void reorder ( const labelList map,
const label  len,
const label  null,
labelList elems 
)
staticprivate

Reorder according to map.

◆ getFaceInfo() [2/2]

void getFaceInfo ( const label  faceI,
label patchID,
label zoneID,
label zoneFlip 
) const
private

Get patch and zone info.

◆ addFace() [2/2]

label addFace ( polyTopoChange meshMod,
const label  faceI,
const face newFace,
const label  own,
const label  nei 
) const
private

Adds a face on top of existing faceI. Reverses if necessary.

◆ addInternalFace() [2/2]

label addInternalFace ( polyTopoChange meshMod,
const label  meshFaceI,
const label  meshPointI,
const face newFace,
const label  own,
const label  nei 
) const
private

Adds internal face from point. No checks on reversal.

◆ modFace() [2/2]

void modFace ( polyTopoChange meshMod,
const label  faceI,
const face newFace,
const label  own,
const label  nei 
) const
private

Modifies existing faceI for either new owner/neighbour or new face.

points. Reverses if necessary.

◆ getLevel0EdgeLength() [2/2]

scalar getLevel0EdgeLength ( ) const
private

◆ getAnchorCell() [2/2]

label getAnchorCell ( const labelListList cellAnchorPoints,
const labelListList cellAddedCells,
const label  cellI,
const label  faceI,
const label  pointI 
) const
private

Get cell added to point of cellI (if any)

◆ getFaceNeighbours() [2/2]

void getFaceNeighbours ( const labelListList cellAnchorPoints,
const labelListList cellAddedCells,
const label  faceI,
const label  pointI,
label own,
label nei 
) const
private

Get new owner and neighbour (in unspecified order) of pointI.

on faceI.

◆ findMinLevel() [2/2]

label findMinLevel ( const labelList f) const
private

Get index of minimum pointlevel.

◆ findMaxLevel() [2/2]

label findMaxLevel ( const labelList f) const
private

Get maximum pointlevel.

◆ countAnchors() [2/2]

label countAnchors ( const labelList ,
const  label 
) const
private

Count number of vertices <= anchorLevel.

◆ dumpCell() [2/2]

void dumpCell ( const label  cellI) const
private

Debugging: dump cell as .obj file.

◆ findLevel() [2/2]

label findLevel ( const label  faceI,
const face f,
const label  startFp,
const bool  searchForward,
const label  wantedLevel 
) const
private

Find index of point with wantedLevel, starting from fp.

◆ checkInternalOrientation() [2/2]

static void checkInternalOrientation ( polyTopoChange meshMod,
const label  cellI,
const label  faceI,
const point ownPt,
const point neiPt,
const face newFace 
)
staticprivate

debug:check orientation of added internal face

◆ checkBoundaryOrientation() [2/2]

static void checkBoundaryOrientation ( polyTopoChange meshMod,
const label  cellI,
const label  faceI,
const point ownPt,
const point boundaryPt,
const face newFace 
)
staticprivate

debug:check orientation of new boundary face

◆ insertEdgeSplit() [2/2]

void insertEdgeSplit ( const labelList edgeMidPoint,
const label  p0,
const label  p1,
DynamicList< label > &  verts 
) const
private

If p0 and p1 are existing vertices check if edge is split and insert.

splitPoint.

◆ storeMidPointInfo() [2/2]

label storeMidPointInfo ( const labelListList cellAnchorPoints,
const labelListList cellAddedCells,
const labelList cellMidPoint,
const labelList edgeMidPoint,
const label  cellI,
const label  faceI,
const bool  faceOrder,
const label  midPointI,
const label  anchorPointI,
const label  faceMidPointI,
Map< edge > &  midPointToAnchors,
Map< edge > &  midPointToFaceMids,
polyTopoChange meshMod 
) const
private

Store in maps correspondence from midpoint to anchors and faces.

◆ createInternalFromSplitFace() [2/2]

void createInternalFromSplitFace ( const labelListList cellAnchorPoints,
const labelListList cellAddedCells,
const labelList cellMidPoint,
const labelList faceMidPoint,
const labelList edgeMidPoint,
const label  cellI,
const label  faceI,
Map< edge > &  midPointToAnchors,
Map< edge > &  midPointToFaceMids,
polyTopoChange meshMod,
label nFacesAdded 
) const
private

Create all internal faces from an unsplit face.

◆ createInternalFaces() [2/2]

void createInternalFaces ( const labelListList cellAnchorPoints,
const labelListList cellAddedCells,
const labelList cellMidPoint,
const labelList faceMidPoint,
const labelList faceAnchorLevel,
const labelList edgeMidPoint,
const label  cellI,
polyTopoChange meshMod 
) const
private

Create all internal faces to split cellI into 8.

◆ walkFaceToMid() [2/2]

void walkFaceToMid ( const labelList edgeMidPoint,
const label  cLevel,
const label  faceI,
const label  startFp,
DynamicList< label > &  faceVerts 
) const
private

Store vertices from startFp upto face split point.

Used when splitting face into 4.

◆ walkFaceFromMid() [2/2]

void walkFaceFromMid ( const labelList edgeMidPoint,
const label  cLevel,
const label  faceI,
const label  startFp,
DynamicList< label > &  faceVerts 
) const
private

Same as walkFaceToMid but now walk back.

◆ faceConsistentRefinement() [2/2]

label faceConsistentRefinement ( const bool  maxSet,
PackedBoolList refineCell 
) const
private

Updates refineCell so consistent 2:1 refinement. Returns local.

number of cells changed.

◆ checkWantedRefinementLevels() [2/2]

void checkWantedRefinementLevels ( const labelList ) const
private

Check wanted refinement for 2:1 consistency.

◆ collectLevelPoints() [3/4]

void collectLevelPoints ( const labelList f,
const label  level,
DynamicList< label > &  points 
) const
private

Collect all points on face of certain level.

◆ collectLevelPoints() [4/4]

void collectLevelPoints ( const labelList meshPoints,
const labelList f,
const label  level,
DynamicList< label > &  points 
) const
private

Collect all points on face (in local numbering) of certain level.

◆ matchHexShape() [2/2]

bool matchHexShape ( const label  cellI,
const label  cellLevel,
DynamicList< face > &  quads 
) const
private

Collect all faces with four corner points and return true if.

hex was matched (6 faces of each four corner points)

◆ operator=() [2/2]

void operator= ( const hexRef8 )
private

Disallow default bitwise assignment.

◆ ClassName() [2/2]

ClassName ( "hexRef8"  )

Runtime type information.

◆ mesh() [2/2]

const polyMesh& mesh ( ) const
inline

Definition at line 384 of file hexRef8.H.

References hexRef8::mesh_.

◆ cellLevel() [2/2]

const labelIOList& cellLevel ( ) const
inline

Definition at line 389 of file hexRef8.H.

References hexRef8::cellLevel_.

◆ pointLevel() [2/2]

const labelIOList& pointLevel ( ) const
inline

Definition at line 394 of file hexRef8.H.

References hexRef8::pointLevel_.

◆ history() [2/2]

const refinementHistory& history ( ) const
inline

Definition at line 399 of file hexRef8.H.

References hexRef8::history_.

◆ level0EdgeLength() [2/2]

scalar level0EdgeLength ( ) const
inline

Typical edge length between unrefined points.

Definition at line 405 of file hexRef8.H.

References hexRef8::level0Edge_, and dimensioned::value().

Here is the call graph for this function:

◆ faceLevel() [2/2]

label faceLevel ( const label  faceI) const

Gets level such that the face has four points <= level.

◆ consistentRefinement() [2/2]

labelList consistentRefinement ( const labelList cellsToRefine,
const bool  maxSet 
) const

Given valid mesh and current cell level and proposed.

cells to refine calculate any clashes (due to 2:1) and return ok list of cells to refine. Either adds cells to refine to set (maxSet = true) or removes cells to refine (maxSet = false)

◆ consistentSlowRefinement() [2/2]

labelList consistentSlowRefinement ( const label  maxFaceDiff,
const labelList cellsToRefine,
const labelList facesToCheck,
const label  maxPointDiff,
const labelList pointsToCheck 
) const

Like consistentRefinement but slower:

  • specify number of cells between consecutive refinement levels (consistentRefinement equivalent to 1)
  • specify max level difference between point-connected cells. (-1 to disable) Note that with normal 2:1 limitation (maxFaceDiff=1) there can be 8:1 size difference across point connected cells so maxPointDiff allows you to make that less. cellsToRefine : cells we're thinking about refining. It will extend this set. All refinement levels will be at least maxFaceDiff layers thick. facesToCheck : additional faces where to implement the maxFaceDiff thickness (usually only boundary faces)

◆ consistentSlowRefinement2() [2/2]

labelList consistentSlowRefinement2 ( const label  maxFaceDiff,
const labelList cellsToRefine,
const labelList facesToCheck 
) const

Like consistentSlowRefinement but uses different meshWave.

(proper distance instead of toplogical count). No point checks yet.

◆ setRefinement() [2/2]

labelListList setRefinement ( const labelList cells,
polyTopoChange  
)

Insert refinement. All selected cells will be split into 8.

Returns per element in cells the 8 cells they were split into. Guarantees that the 0th element is the original cell label. Mapping: -split cells: 7 new ones get added from original -split faces: original gets modified; 3 new ones get added from original -added internal faces: added from original cell face(if that was internal) or created out-of-nothing (so will not get mapped!). Note: could make this inflate from point but that will allocate interpolation. -points added to split edge: added from edge start() -midpoints added: added from cellPoints[0].

◆ updateMesh() [3/4]

void updateMesh ( const mapPolyMesh )

Update local numbering for changed mesh.

◆ storeData() [2/2]

void storeData ( const labelList pointsToStore,
const labelList facesToStore,
const labelList cellsToStore 
)

Signal points/face/cells for which to store data.

◆ updateMesh() [4/4]

void updateMesh ( const mapPolyMesh ,
const Map< label > &  pointsToRestore,
const Map< label > &  facesToRestore,
const Map< label > &  cellsToRestore 
)

Update local numbering + undo.

Data to restore given as new pointlabel + stored pointlabel (i.e. what was in pointsToStore)

◆ subset() [2/2]

void subset ( const labelList pointMap,
const labelList faceMap,
const labelList cellMap 
)

Update local numbering for subsetted mesh.

Gets new-to-old maps. Not compatible with unrefinement.

◆ distribute() [2/2]

void distribute ( const mapDistributePolyMesh )

Update local numbering for mesh redistribution.

◆ checkMesh() [2/2]

void checkMesh ( ) const

Debug: Check coupled mesh for correctness.

◆ checkRefinementLevels() [2/2]

void checkRefinementLevels ( const label  maxPointDiff,
const labelList pointsToCheck 
) const

Debug: Check 2:1 consistency across faces.

maxPointDiff==-1 : only check 2:1 across faces maxPointDiff!=-1 : check point-connected cells.

◆ cellShapes() [2/2]

const cellShapeList& cellShapes ( ) const

Utility: get hexes as cell shapes.

◆ getSplitPoints() [2/2]

labelList getSplitPoints ( ) const

Return the points at the centre of top-level split cells.

that can be unsplit.

◆ consistentUnrefinement() [2/2]

labelList consistentUnrefinement ( const labelList pointsToUnrefine,
const bool  maxSet 
) const

Given proposed.

splitPoints to unrefine according to calculate any clashes (due to 2:1) and return ok list of points to unrefine. Either adds points to refine to set (maxSet = true) or removes points to refine (maxSet = false)

◆ setUnrefinement() [2/2]

void setUnrefinement ( const labelList splitPointLabels,
polyTopoChange  
)

Remove some refinement. Needs to be supplied output of.

consistentUnrefinement. Only call if undoable set. All 8 pointCells of a split point will be combined into the lowest numbered cell of those 8.

◆ setInstance() [2/2]

void setInstance ( const fileName inst)

◆ write() [2/2]

bool write ( ) const

Force writing refinement+history to polyMesh directory.

Field Documentation

◆ mesh_

const polyMesh & mesh_
private

Reference to underlying mesh.

Definition at line 69 of file hexRef4.H.

Referenced by hexRef8::getLevel0EdgeLength(), hexRef8::hexRef8(), and hexRef8::mesh().

◆ cellLevel_

labelIOList cellLevel_
private

Per cell the refinement level.

Definition at line 72 of file hexRef4.H.

Referenced by hexRef8::cellLevel(), hexRef8::getLevel0EdgeLength(), and hexRef8::hexRef8().

◆ pointLevel_

labelIOList pointLevel_
private

Per point the refinement level.

Definition at line 75 of file hexRef4.H.

Referenced by hexRef8::hexRef8(), and hexRef8::pointLevel().

◆ level0Edge_

uniformDimensionedScalarField level0Edge_
private

Typical edge length between unrefined points.

Definition at line 78 of file hexRef4.H.

Referenced by hexRef8::level0EdgeLength().

◆ history_

refinementHistory history_
private

Refinement history.

Definition at line 81 of file hexRef4.H.

Referenced by hexRef8::hexRef8(), and hexRef8::history().

◆ faceRemover_

removeFaces faceRemover_
private

Face remover engine.

Definition at line 84 of file hexRef4.H.

◆ savedPointLevel_

Map< label > savedPointLevel_
private

Level of saved points.

Definition at line 87 of file hexRef4.H.

◆ savedCellLevel_

Map< label > savedCellLevel_
private

Level of saved cells.

Definition at line 90 of file hexRef4.H.

◆ cellShapesPtr_

autoPtr< cellShapeList > cellShapesPtr_
mutableprivate

Cell shapes when seen as split hexes.

Definition at line 93 of file hexRef4.H.


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