triSurfaceCleanupDuplicates.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | cfMesh: A library for mesh generation
4  \\ / O peration |
5  \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6  \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
8 License
9  This file is part of cfMesh.
10 
11  cfMesh is free software; you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by the
13  Free Software Foundation; either version 3 of the License, or (at your
14  option) any later version.
15 
16  cfMesh is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with cfMesh. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  triSurfaceCleanupDuplicates
26 
27 Description
28  Provides information regarding surface partitions on the surface
29  triangulation, and connectivity between various surface partitions.
30 
31 SourceFiles
32  triSurfaceCleanupDuplicatesDuplicates.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef triSurfaceCleanupDuplicates_H
37 #define triSurfaceCleanupDuplicates_H
38 
39 #include "triSurf.H"
40 #include "VRWGraph.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Forward declaration
48 class meshOctree;
49 
50 /*---------------------------------------------------------------------------*\
51  Class triSurfaceCleanupDuplicates Declaration
52 \*---------------------------------------------------------------------------*/
53 
55 {
56  // Private data
57  //- tolerance for points
58  const scalar tolerance_;
59 
60  //- reference to triSurf
61  triSurf& surf_;
62 
63  //- reference to octree
64  const meshOctree& octree_;
65 
66  //- new triangle labels in case some of them is removed
68 
69  //- check if the operation has already been performed
70  bool done_;
71 
72  // Private member functions
73  //- Check duplicate triangles
75 
76  //- Check duplicate points
77  bool mergeDuplicatePoints();
78 
79  //- update triangle mapping
81 
82  //- Disallow default bitwise copy construct
84 
85  //- Disallow default bitwise assignment
87 
88 public:
89 
90  // Constructors
91 
92  //- Construct from meshOctree and tolerance
94  (
95  const meshOctree& octree,
96  const scalar tol=1e-6
97  );
98 
99  // Destructor
100 
102 
103 
104  // Member Functions
105 
106  //- merge duplicate vertices and triangles
107  void mergeIdentities();
108 };
109 
110 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
111 
112 } // End namespace Foam
113 
114 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
115 
116 #endif
117 
118 // ************************************************************************* //
Foam::triSurfaceCleanupDuplicates::~triSurfaceCleanupDuplicates
~triSurfaceCleanupDuplicates()
Definition: triSurfaceCleanupDuplicates.C:52
Foam::triSurfaceCleanupDuplicates::updateTriangleLabels
void updateTriangleLabels(const labelLongList &)
update triangle mapping
Definition: triSurfaceCleanupDuplicatesFunctions.C:246
Foam::triSurfaceCleanupDuplicates
Definition: triSurfaceCleanupDuplicates.H:53
triSurf.H
Foam::triSurfaceCleanupDuplicates::surf_
triSurf & surf_
reference to triSurf
Definition: triSurfaceCleanupDuplicates.H:60
VRWGraph.H
Foam::triSurfaceCleanupDuplicates::tolerance_
const scalar tolerance_
tolerance for points
Definition: triSurfaceCleanupDuplicates.H:57
Foam::triSurfaceCleanupDuplicates::operator=
void operator=(const triSurfaceCleanupDuplicates &)
Disallow default bitwise assignment.
Foam::triSurfaceCleanupDuplicates::checkDuplicateTriangles
bool checkDuplicateTriangles()
Check duplicate triangles.
Definition: triSurfaceCleanupDuplicatesFunctions.C:45
Foam::triSurfaceCleanupDuplicates::triSurfaceCleanupDuplicates
triSurfaceCleanupDuplicates(const triSurfaceCleanupDuplicates &)
Disallow default bitwise copy construct.
Foam::LongList< label >
Foam::triSurfaceCleanupDuplicates::mergeIdentities
void mergeIdentities()
merge duplicate vertices and triangles
Definition: triSurfaceCleanupDuplicates.C:57
Foam::triSurfaceCleanupDuplicates::octree_
const meshOctree & octree_
reference to octree
Definition: triSurfaceCleanupDuplicates.H:63
Foam::triSurfaceCleanupDuplicates::newTriangleLabel_
labelLongList newTriangleLabel_
new triangle labels in case some of them is removed
Definition: triSurfaceCleanupDuplicates.H:66
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::e
const double e
Elementary charge.
Definition: doubleFloat.H:94
Foam::triSurfaceCleanupDuplicates::done_
bool done_
check if the operation has already been performed
Definition: triSurfaceCleanupDuplicates.H:69
Foam::triSurfaceCleanupDuplicates::mergeDuplicatePoints
bool mergeDuplicatePoints()
Check duplicate points.
Definition: triSurfaceCleanupDuplicatesFunctions.C:104
Foam::meshOctree
Definition: meshOctree.H:55
meshOctree
Octree for mesh generation.
Foam::triSurf
Definition: triSurf.H:59