Line data Source code
1 : // The libMesh Finite Element Library. 2 : // Copyright (C) 2002-2023 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_NETGEN_INTERFACE_H 20 : #define LIBMESH_MESH_NETGEN_INTERFACE_H 21 : 22 : #include "libmesh/libmesh_config.h" 23 : 24 : #ifdef LIBMESH_HAVE_NETGEN 25 : 26 : // Local includes 27 : #include "libmesh/mesh_serializer.h" 28 : #include "libmesh/mesh_tet_interface.h" 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 Elem; 41 : 42 : /** 43 : * Class \p NetGenMeshInterface provides an interface for 44 : * tetrahedralization of meshes using the NetGen library. For 45 : * information about TetGen cf. 46 : * <a href="https://github.com/NGSolve/netgen/">NetGen github 47 : * repository</a>. 48 : * 49 : * \author Roy H. Stogner 50 : * \date 2024 51 : */ 52 : class NetGenMeshInterface : public MeshTetInterface 53 : { 54 : public: 55 : 56 : /** 57 : * Constructor. Takes a reference to the mesh containing the 58 : * triangulated surface which is to be tetrahedralized. 59 : */ 60 : explicit 61 : NetGenMeshInterface (UnstructuredMesh & mesh); 62 : 63 : /** 64 : * Empty destructor. 65 : */ 66 0 : virtual ~NetGenMeshInterface() override = default; 67 : 68 : /** 69 : * Method invokes NetGen library to compute a tetrahedralization 70 : */ 71 : virtual void triangulate () override; 72 : 73 : protected: 74 : 75 : /** 76 : * Tetgen only operates on serial meshes. 77 : */ 78 : MeshSerializer _serializer; 79 : }; 80 : 81 : } // namespace libMesh 82 : 83 : #endif // LIBMESH_HAVE_NETGEN 84 : 85 : #endif // LIBMESH_MESH_NETGEN_INTERFACE_H