Forward compatibility: flex
[foam-extend-3.2.git] / src / mesh / cfMesh / voronoiMesh / voronoiMeshExtractor / voronoiMeshExtractor.H
blob0be6a62f77bd70918a8877acac976179a1a5b230
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.
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
19     for more details.
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/>.
24 Class
25     voronoiMeshExtractor
27 Description
28     A class which extracts tet mesh out of an octree structure
30 SourceFiles
31     voronoiMeshExtractor.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef voronoiMeshExtractor_H
36 #define voronoiMeshExtractor_H
38 #include "polyMeshGenModifier.H"
39 #include "partTet.H"
40 #include "tetCreatorOctree.H"
41 #include "VRWGraph.H"
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 namespace Foam
48 /*---------------------------------------------------------------------------*\
49                     Class voronoiMeshExtractor Declaration
50 \*---------------------------------------------------------------------------*/
52 class voronoiMeshExtractor
54     // Private data
55         //- create tets
56         tetCreatorOctree tetCreator_;
58         //- reference to the mesh
59         polyMeshGen& 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
83         void createPoints();
85         //- create mesh data
86         void createPolyMesh();
88         //- delete all pointer data
89         void clearOut();
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];
105 public:
107     // Constructors
109         //- Construct from octree and mesh data
110         voronoiMeshExtractor
111         (
112             const meshOctree& octree,
113             const IOdictionary& meshDict,
114             polyMeshGen& mesh
115         );
117     // Destructor
119         ~voronoiMeshExtractor();
122     // Member Functions
123         void createMesh();
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
129 } // End namespace Foam
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
133 #endif
135 // ************************************************************************* //