Go to the documentation of this file.
42 #include "primitivePatch.H"
59 class mapDistributePolyMesh;
131 const label meshFaceI,
132 const label meshPointI,
189 const bool searchForward,
190 const label wantedLevel
214 const point& boundaryPt,
237 const bool faceOrder,
238 const label midPointI,
239 const label anchorPointI,
240 const label faceMidPointI,
367 const scalar level0Edge = -GREAT
377 const scalar level0Edge = -GREAT
443 const label maxFaceDiff,
446 const label maxPointDiff,
455 const label maxFaceDiff,
528 const label maxPointDiff,
void collectLevelPoints(const labelList &f, const label level, DynamicList< label > &points) const
Collect all points on face of certain level.
labelList consistentRefinement(const labelList &cellsToRefine, const bool maxSet) const
Given valid mesh and current cell level and proposed.
autoPtr< cellShapeList > cellShapesPtr_
Cell shapes when seen as split hexes.
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.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
const labelIOList & cellLevel() const
A class for handling file names.
ClassName("hexRef8")
Runtime type information.
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.
labelList getSplitPoints() const
Return the points at the centre of top-level split cells.
Direct mesh changes based on v1.3 polyTopoChange syntax.
void updateMesh(const mapPolyMesh &)
Update local numbering for changed mesh.
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.
void setInstance(const fileName &inst)
const Type & value() const
Return const reference to value.
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.
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.
const cellShapeList & cellShapes() const
Utility: get hexes as cell shapes.
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.
Mesh consisting of general polyhedral cells.
refinementHistory history_
Refinement history.
All refinement history. Used in unrefinement.
labelListList setRefinement(const labelList &cells, polyTopoChange &)
Insert refinement. All selected cells will be split into 8.
void checkRefinementLevels(const label maxPointDiff, const labelList &pointsToCheck) const
Debug: Check 2:1 consistency across faces.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Given list of faces to remove insert all the topology changes. Contains helper function to get consis...
static void reorder(const labelList &map, const label len, const label null, labelList &elems)
Reorder according to map.
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.
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
void getFaceInfo(const label faceI, label &patchID, label &zoneID, label &zoneFlip) const
Get patch and zone info.
uniformDimensionedScalarField level0Edge_
Typical edge length between unrefined points.
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)
void subset(const labelList &pointMap, const labelList &faceMap, const labelList &cellMap)
Update local numbering for subsetted mesh.
Map< label > savedCellLevel_
Level of saved cells.
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
const polyMesh & mesh() const
bool write() const
Force writing refinement+history to polyMesh directory.
labelIOList cellLevel_
Per cell the refinement level.
label findMaxLevel(const labelList &f) const
Get maximum pointlevel.
const refinementHistory & history() const
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.
void operator=(const hexRef8 &)
Disallow default bitwise assignment.
labelList consistentSlowRefinement2(const label maxFaceDiff, const labelList &cellsToRefine, const labelList &facesToCheck) const
Like consistentSlowRefinement but uses different meshWave.
void storeData(const labelList &pointsToStore, const labelList &facesToStore, const labelList &cellsToStore)
Signal points/face/cells for which to store data.
label faceLevel(const label faceI) const
Gets level such that the face has four points <= level.
label findMinLevel(const labelList &f) const
Get index of minimum pointlevel.
labelIOList pointLevel_
Per point the refinement level.
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.
Map< label > savedPointLevel_
Level of saved points.
labelList consistentSlowRefinement(const label maxFaceDiff, const labelList &cellsToRefine, const labelList &facesToCheck, const label maxPointDiff, const labelList &pointsToCheck) const
Like consistentRefinement but slower:
void setUnrefinement(const labelList &splitPointLabels, polyTopoChange &)
Remove some refinement. Needs to be supplied output of.
scalar level0EdgeLength() const
Typical edge length between unrefined points.
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.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
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.
Container with cells to refine. Refinement given as single direction.
removeFaces faceRemover_
Face remover engine.
Refinement of (split) hexes using polyTopoChange.
const labelIOList & pointLevel() const
scalar getLevel0EdgeLength() const
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label countAnchors(const labelList &, const label) const
Count number of vertices <= anchorLevel.
bool matchHexShape(const label cellI, const label cellLevel, DynamicList< face > &quads) const
Collect all faces with four corner points and return true if.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void distribute(const mapDistributePolyMesh &)
Update local numbering for mesh redistribution.
A face is a list of labels corresponding to mesh vertices.
void checkMesh() const
Debug: Check coupled mesh for correctness.
void dumpCell(const label cellI) const
Debugging: dump cell as .obj file.
Class containing mesh-to-mesh mapping information after a mesh distribution where we send parts of me...
const polyMesh & mesh_
Reference to underlying mesh.
labelList consistentUnrefinement(const labelList &pointsToUnrefine, const bool maxSet) const
Given proposed.
hexRef8(const hexRef8 &)
Disallow default bitwise copy construct.
label faceConsistentRefinement(const bool maxSet, PackedBoolList &refineCell) const
Updates refineCell so consistent 2:1 refinement. Returns local.
void checkWantedRefinementLevels(const labelList &) const
Check wanted refinement for 2:1 consistency.