Public Member Functions | |
triSurfaceCleanupDuplicates (const meshOctree &octree, const scalar tol=1e-6) | |
Construct from meshOctree and tolerance. More... | |
~triSurfaceCleanupDuplicates () | |
void | mergeIdentities () |
merge duplicate vertices and triangles More... | |
Private Member Functions | |
bool | checkDuplicateTriangles () |
Check duplicate triangles. More... | |
bool | mergeDuplicatePoints () |
Check duplicate points. More... | |
void | updateTriangleLabels (const labelLongList &) |
update triangle mapping More... | |
triSurfaceCleanupDuplicates (const triSurfaceCleanupDuplicates &) | |
Disallow default bitwise copy construct. More... | |
void | operator= (const triSurfaceCleanupDuplicates &) |
Disallow default bitwise assignment. More... | |
Private Attributes | |
const scalar | tolerance_ |
tolerance for points More... | |
triSurf & | surf_ |
reference to triSurf More... | |
const meshOctree & | octree_ |
reference to octree More... | |
labelLongList | newTriangleLabel_ |
new triangle labels in case some of them is removed More... | |
bool | done_ |
check if the operation has already been performed More... | |
Definition at line 53 of file triSurfaceCleanupDuplicates.H.
|
private |
Disallow default bitwise copy construct.
triSurfaceCleanupDuplicates | ( | const meshOctree & | octree, |
const scalar | tol = 1e-6 |
||
) |
Construct from meshOctree and tolerance.
Definition at line 40 of file triSurfaceCleanupDuplicates.C.
Definition at line 52 of file triSurfaceCleanupDuplicates.C.
|
private |
Check duplicate triangles.
check if there exist duplicate triangles
return if there exist no duplicate triangles
create new list of triangles and store it in the surface mesh
Definition at line 45 of file triSurfaceCleanupDuplicatesFunctions.C.
References Foam::endl(), triSurfModifier::facetsAccess(), forAll, Foam::Info, triSurfAddressing::pointFacets(), triSurfFacets::size(), LongList< T, Offset >::size(), triSurfaceCleanupDuplicates::surf_, triSurfFacets::updateFacetsSubsets(), and triSurfaceCleanupDuplicates::updateTriangleLabels().
Referenced by triSurfaceCleanupDuplicates::mergeIdentities().
|
private |
Check duplicate points.
check if there exist any vertices closer than the prescribed tolerance
find if there exist no duplicate points
remove vertices and update node labels
remove triangles containing duplicate points
update the surface
Definition at line 104 of file triSurfaceCleanupDuplicatesFunctions.C.
References triSurfAddressing::clearAddressing(), triSurfAddressing::clearGeometry(), meshOctree::containedTriangles(), Foam::endl(), triSurfFacets::facets(), triSurfModifier::facetsAccess(), forAll, Foam::Info, Foam::magSqr(), triSurfaceCleanupDuplicates::newTriangleLabel_, triSurfPoints::nPoints(), meshOctree::numberOfLeaves(), triSurfaceCleanupDuplicates::octree_, points, triSurfPoints::points(), LongList< T, Offset >::setSize(), triSurfFacets::size(), Foam::sqr(), triSurfaceCleanupDuplicates::surf_, triSurfaceCleanupDuplicates::tolerance_, triSurfFacets::updateFacetsSubsets(), and triSurfaceCleanupDuplicates::updateTriangleLabels().
Referenced by triSurfaceCleanupDuplicates::mergeIdentities().
|
private |
update triangle mapping
update addressing between the original triangles and the cleaned mesh
Definition at line 246 of file triSurfaceCleanupDuplicatesFunctions.C.
References forAll.
Referenced by triSurfaceCleanupDuplicates::checkDuplicateTriangles(), and triSurfaceCleanupDuplicates::mergeDuplicatePoints().
|
private |
Disallow default bitwise assignment.
void mergeIdentities | ( | ) |
merge duplicate vertices and triangles
Definition at line 57 of file triSurfaceCleanupDuplicates.C.
References triSurfaceCleanupDuplicates::checkDuplicateTriangles(), triSurfaceCleanupDuplicates::done_, Foam::endl(), Foam::exit(), Foam::FatalError, forAll, triSurfaceCleanupDuplicates::mergeDuplicatePoints(), triSurfaceCleanupDuplicates::newTriangleLabel_, UPstream::parRun(), LongList< T, Offset >::setSize(), triSurfFacets::size(), triSurfaceCleanupDuplicates::surf_, and WarningIn.
|
private |
tolerance for points
Definition at line 57 of file triSurfaceCleanupDuplicates.H.
Referenced by triSurfaceCleanupDuplicates::mergeDuplicatePoints().
|
private |
reference to triSurf
Definition at line 60 of file triSurfaceCleanupDuplicates.H.
Referenced by triSurfaceCleanupDuplicates::checkDuplicateTriangles(), triSurfaceCleanupDuplicates::mergeDuplicatePoints(), and triSurfaceCleanupDuplicates::mergeIdentities().
|
private |
reference to octree
Definition at line 63 of file triSurfaceCleanupDuplicates.H.
Referenced by triSurfaceCleanupDuplicates::mergeDuplicatePoints().
|
private |
new triangle labels in case some of them is removed
Definition at line 66 of file triSurfaceCleanupDuplicates.H.
Referenced by triSurfaceCleanupDuplicates::mergeDuplicatePoints(), and triSurfaceCleanupDuplicates::mergeIdentities().
|
private |
check if the operation has already been performed
Definition at line 69 of file triSurfaceCleanupDuplicates.H.
Referenced by triSurfaceCleanupDuplicates::mergeIdentities().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.