1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | cfMesh: A library for mesh generation
5 \\ / A nd | Author: Franjo Juretic (franjo.juretic@c-fields.com)
6 \\/ M anipulation | Copyright (C) Creative Fields, Ltd.
7 -------------------------------------------------------------------------------
9 This file is part of cfMesh.
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.
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
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/>.
28 A class which extracts tet mesh out of an octree structure
31 voronoiMeshExtractor.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef voronoiMeshExtractor_H
36 #define voronoiMeshExtractor_H
38 #include "polyMeshGenModifier.H"
40 #include "tetCreatorOctree.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 /*---------------------------------------------------------------------------*\
49 Class voronoiMeshExtractor Declaration
50 \*---------------------------------------------------------------------------*/
52 class voronoiMeshExtractor
56 tetCreatorOctree tetCreator_;
58 //- reference to the mesh
61 //- edges connected to a vertex in the tet mesh
62 mutable VRWGraph* pointEdgesPtr_;
64 //- edges of the tetrahedrization
65 mutable LongList<edge>* edgesPtr_;
67 //- tets around each edge
68 mutable VRWGraph* edgeTetsPtr_;
70 //- is edge at the boundary
71 mutable boolList* boundaryEdgePtr_;
73 // Private member functions
74 //- create and return addressing
75 void createAddressing() const;
77 const VRWGraph& pointEdges() const;
78 const LongList<edge>& edges() const;
79 const VRWGraph& edgeTets() const;
80 const boolList& boundaryEdge() const;
82 //- create points of the voronoi mesh
86 void createPolyMesh();
88 //- delete all pointer data
91 // Private copy constructor
92 //- Disallow default bitwise copy construct
93 voronoiMeshExtractor(const voronoiMeshExtractor&);
95 //- Disallow default bitwise assignment
96 void operator=(const voronoiMeshExtractor&);
98 // Private static data
99 //- positive orientation
100 static label sameOrientation_[6];
102 //- opposite orientation
103 static label oppositeOrientation_[6];
109 //- Construct from octree and mesh data
112 const meshOctree& octree,
113 const IOdictionary& meshDict,
119 ~voronoiMeshExtractor();
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 } // End namespace Foam
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 // ************************************************************************* //