voronoiMeshExtractor.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  voronoiMeshExtractor
26 
27 Description
28  A class which extracts tet mesh out of an octree structure
29 
30 SourceFiles
31  voronoiMeshExtractor.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef voronoiMeshExtractor_H
36 #define voronoiMeshExtractor_H
37 
38 #include "polyMeshGenModifier.H"
39 #include "partTet.H"
40 #include "tetCreatorOctree.H"
41 #include "VRWGraph.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class voronoiMeshExtractor Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 {
54  // Private data
55  //- create tets
57 
58  //- reference to the mesh
60 
61  //- edges connected to a vertex in the tet mesh
62  mutable VRWGraph* pointEdgesPtr_;
63 
64  //- edges of the tetrahedrization
65  mutable LongList<edge>* edgesPtr_;
66 
67  //- tets around each edge
68  mutable VRWGraph* edgeTetsPtr_;
69 
70  //- is edge at the boundary
71  mutable boolList* boundaryEdgePtr_;
72 
73  // Private member functions
74  //- create and return addressing
75  void createAddressing() const;
76 
77  const VRWGraph& pointEdges() const;
78  const LongList<edge>& edges() const;
79  const VRWGraph& edgeTets() const;
80  const boolList& boundaryEdge() const;
81 
82  //- create points of the voronoi mesh
83  void createPoints();
84 
85  //- create mesh data
86  void createPolyMesh();
87 
88  //- delete all pointer data
89  void clearOut();
90 
91  // Private copy constructor
92  //- Disallow default bitwise copy construct
94 
95  //- Disallow default bitwise assignment
96  void operator=(const voronoiMeshExtractor&);
97 
98  // Private static data
99  //- positive orientation
100  static label sameOrientation_[6];
101 
102  //- opposite orientation
103  static label oppositeOrientation_[6];
104 
105 public:
106 
107  // Constructors
108 
109  //- Construct from octree and mesh data
111  (
112  const meshOctree& octree,
113  const IOdictionary& meshDict,
115  );
116 
117  // Destructor
118 
120 
121 
122  // Member Functions
123  void createMesh();
124 };
125 
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 } // End namespace Foam
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 #endif
134 
135 // ************************************************************************* //
Foam::voronoiMeshExtractor::sameOrientation_
static label sameOrientation_[6]
positive orientation
Definition: voronoiMeshExtractor.H:99
Foam::voronoiMeshExtractor::voronoiMeshExtractor
voronoiMeshExtractor(const voronoiMeshExtractor &)
Disallow default bitwise copy construct.
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:53
Foam::voronoiMeshExtractor::mesh_
polyMeshGen & mesh_
reference to the mesh
Definition: voronoiMeshExtractor.H:58
Foam::voronoiMeshExtractor::createAddressing
void createAddressing() const
create and return addressing
Definition: voronoiMeshExtractorAddressing.C:44
Foam::voronoiMeshExtractor::edgesPtr_
LongList< edge > * edgesPtr_
edges of the tetrahedrization
Definition: voronoiMeshExtractor.H:64
VRWGraph.H
polyMeshGenModifier.H
Foam::polyMeshGen
Definition: polyMeshGen.H:46
Foam::voronoiMeshExtractor::pointEdges
const VRWGraph & pointEdges() const
Definition: voronoiMeshExtractorAddressing.C:193
Foam::voronoiMeshExtractor::createPoints
void createPoints()
create points of the voronoi mesh
Definition: voronoiMeshExtractorCreateMesh.C:44
tetCreatorOctree.H
Foam::voronoiMeshExtractor::clearOut
void clearOut()
delete all pointer data
Definition: voronoiMeshExtractor.C:46
Foam::voronoiMeshExtractor::createMesh
void createMesh()
Definition: voronoiMeshExtractor.C:81
Foam::LongList< edge >
Foam::voronoiMeshExtractor::edgeTetsPtr_
VRWGraph * edgeTetsPtr_
tets around each edge
Definition: voronoiMeshExtractor.H:67
Foam::voronoiMeshExtractor
Definition: voronoiMeshExtractor.H:51
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::voronoiMeshExtractor::createPolyMesh
void createPolyMesh()
create mesh data
Definition: voronoiMeshExtractorCreateMesh.C:72
Foam::voronoiMeshExtractor::oppositeOrientation_
static label oppositeOrientation_[6]
opposite orientation
Definition: voronoiMeshExtractor.H:102
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:18
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::voronoiMeshExtractor::~voronoiMeshExtractor
~voronoiMeshExtractor()
Definition: voronoiMeshExtractor.C:74
Foam::voronoiMeshExtractor::tetCreator_
tetCreatorOctree tetCreator_
create tets
Definition: voronoiMeshExtractor.H:55
Foam::voronoiMeshExtractor::pointEdgesPtr_
VRWGraph * pointEdgesPtr_
edges connected to a vertex in the tet mesh
Definition: voronoiMeshExtractor.H:61
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:59
Foam::voronoiMeshExtractor::edges
const LongList< edge > & edges() const
Definition: voronoiMeshExtractorAddressing.C:201
Foam::meshOctree
Definition: meshOctree.H:55
Foam::tetCreatorOctree
Definition: tetCreatorOctree.H:53
Foam::voronoiMeshExtractor::boundaryEdge
const boolList & boundaryEdge() const
Definition: voronoiMeshExtractorAddressing.C:217
Foam::VRWGraph
Definition: VRWGraph.H:101
Foam::voronoiMeshExtractor::operator=
void operator=(const voronoiMeshExtractor &)
Disallow default bitwise assignment.
Foam::voronoiMeshExtractor::edgeTets
const VRWGraph & edgeTets() const
Definition: voronoiMeshExtractorAddressing.C:209
Foam::voronoiMeshExtractor::boundaryEdgePtr_
boolList * boundaryEdgePtr_
is edge at the boundary
Definition: voronoiMeshExtractor.H:70
partTet.H