Public Types | Public Member Functions | Static Public Member Functions | List of all members
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...
 
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...
 

Static Public Member Functions

static HashSet< labelcheckBadFaces (const polyMesh &mesh, const dictionary &meshQualityDict)
 Calls motionSmoother::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

Enumerator
noCollapse 
toPoint 
toEdge 

Definition at line 71 of file edgeCollapser.H.

Constructor & Destructor Documentation

edgeCollapser ( const polyMesh mesh)

Construct from mesh.

Definition at line 1239 of file edgeCollapser.C.

edgeCollapser ( const polyMesh mesh,
const dictionary dict 
)

Construct from mesh and dict.

Definition at line 1250 of file edgeCollapser.C.

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

Here is the call graph for this function:

Member Function Documentation

ClassName ( "edgeCollapser"  )

Runtime type information.

Foam::HashSet< Foam::label > checkBadFaces ( const polyMesh mesh,
const dictionary meshQualityDict 
)
static

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

Definition at line 46 of file edgeCollapser.C.

References motionSmootherAlgo::checkMesh(), edgeCollapser::checkMeshQuality(), 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:

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 82 of file edgeCollapser.C.

References Foam::abort(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), face::centre(), edgeCollapser::checkBadFaces(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::clear(), List< T >::clear(), HashTable< T, Key, Hash >::clear(), collapseEdge(), polyPatch::coupled(), Foam::det(), Foam::e, face::edges(), Foam::eigenValues(), Foam::eigenVector(), UList< T >::empty(), edge::end(), Foam::endl(), f(), polyPatch::faceCells(), polyMesh::faces(), Foam::FatalError, FatalErrorIn, UList< T >::fcIndex(), Foam::findIndex(), UList< T >::first(), forAll, forAllConstIter(), HashTable< T, Key, Hash >::found(), HashTable< T, label, Hash< label > >::found(), face::inertia(), Foam::inplaceReorder(), HashSet< Key, Hash >::insert(), Foam::invert(), Foam::labelMax, Foam::labelMin, UList< T >::last(), Foam::longestEdge(), face::mag(), Foam::mag(), Foam::magSqr(), Foam::max(), edge::otherVertex(), patches, pointLabels(), points, Foam::pow(), face::prevLabel(), Foam::returnReduce(), HashTable< T, label, Hash< label > >::set(), List< T >::setSize(), List< T >::size(), VectorSpace< Form, Cmpt, nCmpt >::size(), HashTable< T, Key, Hash >::size(), UList< T >::size(), Foam::sortedOrder(), Foam::sqr(), Foam::sqrt(), edge::start(), polyPatch::start(), syncTools::swapBoundaryFaceList(), syncTools::syncPointList(), globalIndex::toGlobal(), Foam::toPoint(), WarningIn, Vector< Cmpt >::x(), Vector< Cmpt >::y(), and Vector< Cmpt >::zero.

Referenced by edgeCollapser::checkBadFaces(), polyMeshFilter::copyMesh(), and polyMeshFilter::filterEdges().

Here is the caller graph for this function:

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 1662 of file edgeCollapser.C.

References Foam::abort(), cells, primitiveMesh::cells(), primitiveMesh::edges(), Foam::endl(), primitiveMesh::faceEdges(), polyMesh::faces(), Foam::FatalError, FatalErrorIn, forAll, Foam::Info, edgeCollapser::markSmallEdges(), primitiveMesh::nEdges(), primitiveMesh::nFaces(), Foam::nl, primitiveMesh::nPoints(), primitiveMesh::pointEdges(), Foam::reduce(), Foam::returnReduce(), List< T >::size(), syncTools::syncEdgeList(), and syncTools::syncPointList().

Referenced by edgeCollapser::setRefinement().

Here is the call graph for this function:

Here is the caller graph for this function:

bool setRefinement ( const List< pointEdgeCollapse > &  allPointInfo,
polyTopoChange meshMod 
) const
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 1860 of file edgeCollapser.C.

References Foam::average(), primitiveMesh::edges(), edge::end(), forAll, edge::mag(), edgeCollapser::markMergeEdges(), points, polyMesh::points(), HashTable< T, label, Hash< label > >::set(), and edge::start().

Referenced by edgeCollapser::consistentCollapse().

Here is the call graph for this function:

Here is the caller graph for this function:

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 1912 of file edgeCollapser.C.

References removePoints::countPointUsage(), primitiveMesh::edges(), forAll, Foam::mag(), edgeCollapser::markSmallSliverFaces(), primitiveMesh::pointEdges(), points, polyMesh::points(), and List< T >::size().

Referenced by edgeCollapser::markSmallEdges().

Here is the call graph for this function:

Here is the caller graph for this function:

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 conjuctions with edgeCollapser to synchronise the collapses and modify the mesh

Definition at line 1999 of file edgeCollapser.C.

References Foam::abort(), polyMesh::faces(), Foam::FatalError, FatalErrorIn, forAll, edgeCollapser::markFaceZoneEdges(), edgeCollapser::noCollapse, edgeCollapser::toEdge, and edgeCollapser::toPoint.

Referenced by edgeCollapser::markMergeEdges().

Here is the call graph for this function:

Here is the caller graph for this function:

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 2060 of file edgeCollapser.C.

References Foam::abort(), polyMesh::faces(), Foam::FatalError, FatalErrorIn, forAll, edgeCollapser::noCollapse, edgeCollapser::toEdge, edgeCollapser::toPoint, and faceZone::whichFace().

Referenced by edgeCollapser::markSmallSliverFaces().

Here is the call graph for this function:

Here is the caller graph for this function:


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