Go to the documentation of this file.
37 #ifndef edgeCollapser_H
38 #define edgeCollapser_H
119 const vector& collapseAxis,
163 const scalar targetFaceSize,
177 const label otherPointI,
292 const bool allowCellCollapse =
false
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
scalarField calcTargetFaceSizes() const
Return the target length scale for each face.
Calculates points shared by more than two processor patches or cyclic patches.
label countEdgesOnFace(const face &f, List< pointEdgeCollapse > &allPointInfo) const
Count the number of edges on the face that will exist as a result.
label markMergeEdges(const scalar maxCos, const labelList &pointPriority, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Mark (in collapseEdge) any edges to merge.
label breakStringsAtEdges(const PackedBoolList &markedEdges, PackedBoolList &collapseEdge, List< pointEdgeCollapse > &allPointInfo) const
Helper function that breaks strings of collapses if an edge is not.
static HashSet< label > checkBadFaces(const polyMesh &mesh, const dictionary &meshQualityDict)
Calls motionSmoother::checkMesh and returns a set of bad faces.
Direct mesh changes based on v1.3 polyTopoChange syntax.
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
void collapseToEdge(const label faceI, const pointField &pts, const labelList &pointPriority, const vector &collapseAxis, const point &fC, const labelList &facePtsNeg, const labelList &facePtsPos, const scalarList &dNeg, const scalarList &dPos, const scalar dShift, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Collapse a face to an edge, marking the collapsed edges and new.
A HashTable to objects of type <T> with a label key.
labelPair markFaceZoneEdges(const faceZone &fZone, const scalarField &faceFilterFactor, const labelList &pointPriority, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Marks edges in the faceZone indirectPatchFaces for collapse.
void filterFace(const Map< DynamicList< label > > &collapseStrings, const List< pointEdgeCollapse > &allPointInfo, face &f) const
Renumber f with new vertices. Removes consecutive duplicates.
label markSmallEdges(const scalarField &minEdgeLen, const labelList &pointPriority, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Mark (in collapseEdge) any edges to collapse.
const scalar guardFraction_
Controls collapse of a face to an edge.
Mesh consisting of general polyhedral cells.
Does polyTopoChanges to remove edges. Can remove faces due to edge collapse but can not remove cells ...
void determineDuplicatePointsOnFace(const face &f, PackedBoolList &markedPoints, labelHashSet &uniqueCollapses, labelHashSet &duplicateCollapses, List< pointEdgeCollapse > &allPointInfo) const
Prevent face pinching by finding points in a face that will be.
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.
edgeCollapser(const edgeCollapser &)
Disallow default bitwise copy construct.
A subset of mesh faces organised as a primitive patch.
void faceCollapseAxisAndAspectRatio(const face &f, const point &fC, vector &collapseAxis, scalar &aspectRatio) const
Do an eigenvector analysis of the face to get its collapse axis.
void operator=(const edgeCollapser &)
Disallow default bitwise assignment.
void consistentCollapse(const globalIndex &globalPoints, const labelList &pointPriority, const Map< point > &collapsePointToLocation, PackedBoolList &collapseEdge, List< pointEdgeCollapse > &allPointInfo, const bool allowCellCollapse=false) const
Ensure that the collapse is parallel consistent and update.
const scalar maxCollapseFaceToPointSideLengthCoeff_
Only collapse face to a point if high aspect ratio.
labelPair markSmallSliverFaces(const scalarField &faceFilterFactor, const labelList &pointPriority, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Find small faces and sliver faces in the mesh and mark the.
A list of keyword definitions, which are a keyword followed by any number of values (e....
bool setRefinement(const List< pointEdgeCollapse > &allPointInfo, polyTopoChange &meshMod) const
Play commands into polyTopoChange to create mesh.
Calculates a unique integer (label so might not have enough room - 2G max) for processor + local inde...
const double e
Elementary charge.
label syncCollapse(const globalIndex &globalPoints, const labelList &boundaryPoint, const PackedBoolList &collapseEdge, const Map< point > &collapsePointToLocation, List< pointEdgeCollapse > &allPointInfo) const
Given the collapse information, propagates the information using.
const scalar allowEarlyCollapseCoeff_
Fraction of maxCollapseFaceToPointSideLengthCoeff_ to use when.
void collapseToPoint(const label &faceI, const pointField &pts, const labelList &pointPriority, const point &fC, const labelList &facePts, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
Collapse a face to a point, marking the collapsed edges and new.
collapseType collapseFace(const labelList &pointPriority, const face &f, const label faceI, const scalar targetFaceSize, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation, const scalarField &faceFilterFactor) const
Decides whether a face should be collapsed (and if so it it is to a.
An ordered pair of two objects of type <T> with first() and second() elements.
label edgeMaster(const labelList &pointPriority, const edge &e) const
Return label of point that has the highest priority. This will be.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const Switch allowEarlyCollapseToPoint_
Allow a face to be collapsed to a point early, before the test.
bool isFaceCollapsed(const face &f, List< pointEdgeCollapse > &allPointInfo) const
Does the face have fewer than 3 edges as a result of the potential.
static label checkMeshQuality(const polyMesh &mesh, const dictionary &meshQualityDict, PackedBoolList &isErrorPoint)
Check mesh and mark points on faces in error.
A face is a list of labels corresponding to mesh vertices.
label collapseEdge(triSurface &surf, const scalar minLen)
Keep collapsing all edges < minLen.
labelList edgesFromPoints(const label &faceI, const labelList &pointLabels) const
Create an edgeList of edges in faceI which have both their points.
void checkBoundaryPointMergeEdges(const label pointI, const label otherPointI, const labelList &pointPriority, Map< point > &collapsePointToLocation) const
Decides which points in an edge to collapse, based on their priority.
const polyMesh & mesh_
Reference to mesh.
labelList pointLabels(nPoints, -1)
ClassName("edgeCollapser")
Runtime type information.