edgeCollapser Class Reference

Does polyTopoChanges to remove edges. Can remove faces due to edge collapse but can not remove cells due to face removal! Also removes unused points. More...

Public Types

enum  collapseType { noCollapse = 0 , toPoint = 1 , toEdge = 2 }
 

Public Member Functions

 ClassName ("edgeCollapser")
 Runtime type information. More...
 
 edgeCollapser (const polyMesh &mesh)
 Construct from mesh. More...
 
 edgeCollapser (const polyMesh &mesh, const dictionary &dict)
 Construct from mesh and dict. More...
 
 edgeCollapser (const edgeCollapser &)=delete
 Disallow default bitwise copy construction. More...
 
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. More...
 
bool setRefinement (const List< pointEdgeCollapse > &allPointInfo, polyTopoChange &meshMod) const
 Play commands into polyTopoChange to create mesh. More...
 
label markSmallEdges (const scalarField &minEdgeLen, const labelList &pointPriority, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
 Mark (in collapseEdge) any edges to collapse. More...
 
label markMergeEdges (const scalar maxCos, const labelList &pointPriority, PackedBoolList &collapseEdge, Map< point > &collapsePointToLocation) const
 Mark (in collapseEdge) any edges to merge. More...
 
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. More...
 
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. More...
 
void operator= (const edgeCollapser &)=delete
 Disallow default bitwise assignment. More...
 

Static Public Member Functions

static labelHashSet checkBadFaces (const polyMesh &mesh, const dictionary &meshQualityDict)
 Calls meshCheck::checkMesh and returns a set of bad faces. More...
 
static label checkMeshQuality (const polyMesh &mesh, const dictionary &meshQualityDict, PackedBoolList &isErrorPoint)
 Check mesh and mark points on faces in error. More...
 

Detailed Description

Does polyTopoChanges to remove edges. Can remove faces due to edge collapse but can not remove cells due to face removal! Also removes unused points.

Source files

Definition at line 66 of file edgeCollapser.H.

Member Enumeration Documentation

◆ collapseType

Enumerator
noCollapse 
toPoint 
toEdge 

Definition at line 71 of file edgeCollapser.H.

Constructor & Destructor Documentation

◆ edgeCollapser() [1/3]

edgeCollapser ( const polyMesh mesh)

Construct from mesh.

Definition at line 1201 of file edgeCollapser.C.

◆ edgeCollapser() [2/3]

edgeCollapser ( const polyMesh mesh,
const dictionary dict 
)

Construct from mesh and dict.

Definition at line 1211 of file edgeCollapser.C.

References Foam::endl(), Foam::Info, and Foam::nl.

Here is the call graph for this function:

◆ edgeCollapser() [3/3]

edgeCollapser ( const edgeCollapser )
delete

Disallow default bitwise copy construction.

Member Function Documentation

◆ ClassName()

ClassName ( "edgeCollapser"  )

Runtime type information.

◆ checkBadFaces()

Foam::labelHashSet checkBadFaces ( const polyMesh mesh,
const dictionary meshQualityDict 
)
static

Calls meshCheck::checkMesh and returns a set of bad faces.

Definition at line 45 of file edgeCollapser.C.

References DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), Foam::meshCheck::checkMesh(), Foam::endl(), primitiveMesh::faceAreas(), forAll, Foam::Info, Foam::mag(), and primitiveMesh::nFaces().

Referenced by edgeCollapser::checkMeshQuality().

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

◆ checkMeshQuality()

Foam::label checkMeshQuality ( const polyMesh mesh,
const dictionary meshQualityDict,
PackedBoolList isErrorPoint 
)
static

Check mesh and mark points on faces in error.

Returns boolList with points in error set

Definition at line 81 of file edgeCollapser.C.

References edgeCollapser::checkBadFaces(), f(), polyMesh::faces(), forAll, forAllConstIter, Foam::returnReduce(), HashTable< T, Key, Hash >::size(), and syncTools::syncPointList().

Referenced by polyMeshFilter::filterEdges().

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

◆ consistentCollapse()

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.

allPointInfo. Returns a list of edge collapses that is consistent across coupled boundaries and a list of pointEdgeCollapses.

Definition at line 1603 of file edgeCollapser.C.

References Foam::abort(), cells, collapseEdge(), Foam::endl(), f(), Foam::FatalError, FatalErrorInFunction, forAll, Foam::Info, Foam::nl, Foam::reduce(), Foam::returnReduce(), List< T >::size(), syncTools::syncEdgeList(), and syncTools::syncPointList().

Here is the call graph for this function:

◆ setRefinement()

◆ markSmallEdges()

Foam::label markSmallEdges ( const scalarField minEdgeLen,
const labelList pointPriority,
PackedBoolList collapseEdge,
Map< point > &  collapsePointToLocation 
) const

Mark (in collapseEdge) any edges to collapse.

Definition at line 1778 of file edgeCollapser.C.

References Foam::average(), collapseEdge(), Foam::e, forAll, points, and HashTable< T, Key, Hash >::set().

Here is the call graph for this function:

◆ markMergeEdges()

Foam::label markMergeEdges ( const scalar  maxCos,
const labelList pointPriority,
PackedBoolList collapseEdge,
Map< point > &  collapsePointToLocation 
) const

Mark (in collapseEdge) any edges to merge.

Definition at line 1830 of file edgeCollapser.C.

References collapseEdge(), removePoints::countPointUsage(), forAll, Foam::mag(), points, and List< T >::size().

Here is the call graph for this function:

◆ markSmallSliverFaces()

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

edges that need to be collapsed in order to remove these faces. Also returns a map of new locations for points that will move as a result of the collapse. Use in conjunctions with edgeCollapser to synchronise the collapses and modify the mesh

Definition at line 1917 of file edgeCollapser.C.

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

Here is the call graph for this function:

◆ markFaceZoneEdges()

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

Definition at line 1978 of file edgeCollapser.C.

References Foam::abort(), collapseEdge(), f(), Foam::FatalError, FatalErrorInFunction, forAll, and Zone< ZoneType, ZonesType >::localIndex().

Here is the call graph for this function:

◆ operator=()

void operator= ( const edgeCollapser )
delete

Disallow default bitwise assignment.


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