removePoints Class Reference

Removes selected points from mesh and updates faces using these points. More...

Public Member Functions

 ClassName ("removePoints")
 Runtime type information. More...
 
 removePoints (const polyMesh &mesh, const bool undoable=false)
 Construct from mesh. More...
 
 removePoints (const removePoints &)=delete
 Disallow default bitwise copy construction. More...
 
const labelListsavedFaceLabels () const
 If undoable: affected face labels. Already restored faces. More...
 
label countPointUsage (const scalar minCos, boolList &pointCanBeDeleted) const
 Mark in pointCanBeDeleted the points that can be deleted. More...
 
void setRefinement (const boolList &, polyTopoChange &)
 Play commands into polyTopoChange to remove points. Gets. More...
 
void updateMesh (const mapPolyMesh &)
 Force recalculation of locally stored data on topological change. More...
 
void getUnrefimentSet (const labelList &undoFaces, labelList &localFaces, labelList &localPoints) const
 Given set of faces to restore calculates a consistent set of. More...
 
void setUnrefinement (const labelList &localFaces, const labelList &localPoints, polyTopoChange &)
 Restore selected faces and vertices. More...
 
void operator= (const removePoints &)=delete
 Disallow default bitwise assignment. More...
 

Detailed Description

Removes selected points from mesh and updates faces using these points.

Source files

Definition at line 58 of file removePoints.H.

Constructor & Destructor Documentation

◆ removePoints() [1/2]

removePoints ( const polyMesh mesh,
const bool  undoable = false 
)

Construct from mesh.

Definition at line 132 of file removePoints.C.

References removePoints::countPointUsage().

Referenced by faceEqOp< T, CombineOp >::operator()().

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

◆ removePoints() [2/2]

removePoints ( const removePoints )
delete

Disallow default bitwise copy construction.

Member Function Documentation

◆ ClassName()

ClassName ( "removePoints"  )

Runtime type information.

◆ savedFaceLabels()

const labelList& savedFaceLabels ( ) const
inline

If undoable: affected face labels. Already restored faces.

will be -1.

Definition at line 111 of file removePoints.H.

Referenced by meshRefinement::doRemovePoints(), and meshRefinement::mergeEdgesUndo().

Here is the caller graph for this function:

◆ countPointUsage()

Foam::label countPointUsage ( const scalar  minCos,
boolList pointCanBeDeleted 
) const

Mark in pointCanBeDeleted the points that can be deleted.

(parallel synchronised) and returns the global number of these points. (this number is the global number before synchronisation so might be off!) A point can be deleted if

  • it is not used by any edge. or
  • is used by only two edges
  • these two edges are sufficiently in line (cos > minCos)
  • all processors agree that point can be deleted.

Definition at line 145 of file removePoints.C.

References List< T >::clear(), edge::commonVertex(), Foam::e, f(), forAll, Foam::mag(), edge::otherVertex(), points, Foam::returnReduce(), removePoints::setRefinement(), List< T >::setSize(), List< T >::size(), and syncTools::syncPointList().

Referenced by edgeCollapser::markMergeEdges(), meshRefinement::mergeEdgesUndo(), and removePoints::removePoints().

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

◆ setRefinement()

void setRefinement ( const boolList pointCanBeDeleted,
polyTopoChange meshMod 
)

Play commands into polyTopoChange to remove points. Gets.

boolList (output of countPointUsage) as input. Does no check for whether resulting face is legal. Since pointCanBeDeleted is synced all coupled faces should decide the same.

Definition at line 296 of file removePoints.C.

References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter(), HashSet< Key, Hash >::insert(), HashTable< T, Key, Hash >::insert(), Foam::nl, pFaces, HashTable< T, Key, Hash >::resize(), polyTopoChange::setAction(), List< T >::setSize(), List< T >::size(), and HashTable< T, Key, Hash >::size().

Referenced by removePoints::countPointUsage(), and meshRefinement::doRemovePoints().

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

◆ updateMesh()

void updateMesh ( const mapPolyMesh map)

Force recalculation of locally stored data on topological change.

Definition at line 456 of file removePoints.C.

References Foam::abort(), f(), Foam::FatalError, FatalErrorInFunction, forAll, removePoints::getUnrefimentSet(), Foam::nl, mapPolyMesh::reverseFaceMap(), mapPolyMesh::reversePointMap(), List< T >::setSize(), and List< T >::size().

Referenced by meshRefinement::doRemovePoints(), and meshRefinement::doRestorePoints().

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

◆ getUnrefimentSet()

void getUnrefimentSet ( const labelList undoFaces,
labelList localFaces,
labelList localPoints 
) const

Given set of faces to restore calculates a consistent set of.

saved faces (indices into savedFaces_) and saved vertices (indices into savedPoints_) to restore. The undoFaces have to be synced.

Definition at line 558 of file removePoints.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, HashTable< T, Key, Hash >::found(), VectorSpace< Vector< scalar >, scalar, 3 >::max, List< T >::setSize(), removePoints::setUnrefinement(), List< T >::size(), HashTable< T, Key, Hash >::size(), faceSet::sync(), and syncTools::syncBoundaryFaceList().

Referenced by meshRefinement::doRestorePoints(), and removePoints::updateMesh().

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

◆ setUnrefinement()

void setUnrefinement ( const labelList localFaces,
const labelList localPoints,
polyTopoChange meshMod 
)

Restore selected faces and vertices.

Definition at line 770 of file removePoints.C.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, forAll, VectorSpace< Vector< scalar >, scalar, 3 >::max, polyTopoChange::setAction(), List< T >::setSize(), and List< T >::size().

Referenced by meshRefinement::doRestorePoints(), and removePoints::getUnrefimentSet().

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

◆ operator=()

void operator= ( const removePoints )
delete

Disallow default bitwise assignment.


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