Public Member Functions | Private Member Functions | Private Attributes
removePoints Class Reference

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

Collaboration diagram for removePoints:
Collaboration graph
[legend]

Public Member Functions

 ClassName ("removePoints")
 Runtime type information. More...
 
 removePoints (const polyMesh &mesh, const bool undoable=false)
 Construct from mesh. 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...
 

Private Member Functions

void modifyFace (const label faceI, const face &, polyTopoChange &) const
 Change the vertices of the face whilst keeping everything else. More...
 
 removePoints (const removePoints &)
 Disallow default bitwise copy construct. More...
 
void operator= (const removePoints &)
 Disallow default bitwise assignment. More...
 

Private Attributes

const polyMeshmesh_
 Reference to mesh. More...
 
const bool undoable_
 Whether undoable. More...
 
pointField savedPoints_
 If undoable: deleted points. More...
 
labelList savedFaceLabels_
 If undoable: per stored face the original mesh face label. More...
 
faceList savedFaces_
 If undoable: per stored face the vertices. Negative indices. 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 removePoints )
private

Disallow default bitwise copy construct.

◆ removePoints() [2/2]

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

Construct from mesh.

Definition at line 153 of file removePoints.C.

Member Function Documentation

◆ modifyFace()

void modifyFace ( const label  faceI,
const face newFace,
polyTopoChange meshMod 
) const
private

Change the vertices of the face whilst keeping everything else.

(patch, zone) the same.

Definition at line 100 of file removePoints.C.

References faceZone::flipMap(), polyTopoChange::setAction(), and faceZone::whichFace().

Here is the call graph for this function:

◆ operator=()

void operator= ( const removePoints )
private

Disallow default bitwise assignment.

◆ 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 114 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 166 of file removePoints.C.

References List::clear(), edge::commonVertex(), Foam::constant::electromagnetic::e, f(), forAll, Foam::mag(), edge::otherVertex(), points, Foam::returnReduce(), and List::setSize().

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

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 317 of file removePoints.C.

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

Referenced by meshRefinement::doRemovePoints().

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

◆ updateMesh()

void updateMesh ( const mapPolyMesh map)

◆ 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 579 of file removePoints.C.

References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, forAll, HashTable::found(), HashSet< Key, Hash >::insert(), Vector< scalar >::max, List::setSize(), List::size(), HashTable::size(), faceSet::sync(), syncTools::syncBoundaryFaceList(), and HashTable::toc().

Referenced by meshRefinement::doRestorePoints().

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 791 of file removePoints.C.

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

Referenced by meshRefinement::doRestorePoints().

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

Field Documentation

◆ mesh_

const polyMesh& mesh_
private

Reference to mesh.

Definition at line 64 of file removePoints.H.

Referenced by removePoints::updateMesh().

◆ undoable_

const bool undoable_
private

Whether undoable.

Definition at line 67 of file removePoints.H.

Referenced by removePoints::updateMesh().

◆ savedPoints_

pointField savedPoints_
private

If undoable: deleted points.

Definition at line 70 of file removePoints.H.

Referenced by removePoints::updateMesh().

◆ savedFaceLabels_

labelList savedFaceLabels_
private

If undoable: per stored face the original mesh face label.

Definition at line 73 of file removePoints.H.

Referenced by removePoints::updateMesh().

◆ savedFaces_

faceList savedFaces_
private

If undoable: per stored face the vertices. Negative indices.

refer to deletedPoints_

Definition at line 77 of file removePoints.H.

Referenced by removePoints::updateMesh().


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