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... | |
const labelList & | savedFaceLabels () 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 polyMesh & | mesh_ |
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... | |
Removes selected points from mesh and updates faces using these points.
Definition at line 58 of file removePoints.H.
|
private |
Disallow default bitwise copy construct.
removePoints | ( | const polyMesh & | mesh, |
const bool | undoable = false |
||
) |
Construct from mesh.
Definition at line 153 of file removePoints.C.
|
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().
|
private |
Disallow default bitwise assignment.
ClassName | ( | "removePoints" | ) |
Runtime type information.
|
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().
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
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().
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().
void updateMesh | ( | const mapPolyMesh & | map | ) |
Force recalculation of locally stored data on topological change.
Definition at line 477 of file removePoints.C.
References Foam::abort(), f(), polyMesh::faces(), Foam::FatalError, FatalErrorInFunction, forAll, removePoints::mesh_, Foam::nl, polyMesh::points(), mapPolyMesh::reverseFaceMap(), mapPolyMesh::reversePointMap(), removePoints::savedFaceLabels_, removePoints::savedFaces_, removePoints::savedPoints_, List::setSize(), List::size(), and removePoints::undoable_.
Referenced by meshRefinement::doRemovePoints(), and meshRefinement::doRestorePoints().
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().
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().
|
private |
Reference to mesh.
Definition at line 64 of file removePoints.H.
Referenced by removePoints::updateMesh().
|
private |
Whether undoable.
Definition at line 67 of file removePoints.H.
Referenced by removePoints::updateMesh().
|
private |
If undoable: deleted points.
Definition at line 70 of file removePoints.H.
Referenced by removePoints::updateMesh().
|
private |
If undoable: per stored face the original mesh face label.
Definition at line 73 of file removePoints.H.
Referenced by removePoints::updateMesh().
|
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().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.