mesh_tetgen_interface.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 #ifndef LIBMESH_MESH_TETGEN_INTERFACE_H
20 #define LIBMESH_MESH_TETGEN_INTERFACE_H
21 
22 #include "libmesh/libmesh_config.h"
23 #ifdef LIBMESH_HAVE_TETGEN
24 
25 
26 // Local includes
28 #include "libmesh/point.h" // used for specifying holes
29 
30 // C++ includes
31 #include <cstddef>
32 #include <map>
33 #include <string>
34 #include <vector>
35 
36 namespace libMesh
37 {
38 // Forward Declarations
39 class UnstructuredMesh;
40 class TetGenWrapper;
41 class Elem;
42 
55 {
56 public:
57 
61  explicit
63 
68 
72  void set_switches(const std::string &);
73 
78  void triangulate_pointset ();
79 
84  void pointset_convexhull ();
85 
91  void triangulate_conformingDelaunayMesh (double quality_constraint=0.,
92  double volume_constraint=0.);
93 
99  void triangulate_conformingDelaunayMesh_carvehole (const std::vector<Point> & holes,
100  double quality_constraint=0.,
101  double volume_constraint=0.);
102 
103 
104 
105 protected:
112  void fill_pointlist(TetGenWrapper & wrapper);
113 
118  void assign_nodes_to_elem(unsigned * node_labels, Elem * elem);
119 
132  unsigned check_hull_integrity();
133 
140  void process_hull_integrity_result(unsigned result);
141 
147 
152 
160  std::vector<unsigned> _sequential_to_libmesh_node_map;
161 
166 
171  std::string _switches;
172 };
173 
174 } // namespace libMesh
175 
176 #endif // LIBMESH_HAVE_TETGEN
177 
178 #endif // LIBMESH_MESH_TETGEN_INTERFACE_H
void set_switches(const std::string &)
void triangulate_conformingDelaunayMesh(double quality_constraint=0., double volume_constraint=0.)
The base class for all geometric element types.
Definition: elem.h:100
std::vector< unsigned > _sequential_to_libmesh_node_map
MeshBase & mesh
TetGenMeshInterface(UnstructuredMesh &mesh)
void process_hull_integrity_result(unsigned result)
Base class for Replicated and Distributed meshes.
void triangulate_conformingDelaunayMesh_carvehole(const std::vector< Point > &holes, double quality_constraint=0., double volume_constraint=0.)
void assign_nodes_to_elem(unsigned *node_labels, Elem *elem)
Temporarily serializes a DistributedMesh for output.
void fill_pointlist(TetGenWrapper &wrapper)