libMesh
mesh_triangle_interface.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2025 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_TRIANGLE_INTERFACE_H
20 #define LIBMESH_MESH_TRIANGLE_INTERFACE_H
21 
22 
23 #include "libmesh/libmesh_config.h"
24 
25 #ifdef LIBMESH_HAVE_TRIANGLE
26 
27 // Local Includes
28 #include "libmesh/mesh_serializer.h"
29 #include "libmesh/triangulator_interface.h"
30 
31 namespace libMesh
32 {
33 
42 {
43 public:
50  explicit
52 
56  virtual ~TriangleInterface() = default;
57 
61  virtual void triangulate() override;
62 
66  std::string & extra_flags() {return _extra_flags;}
67 
68 private:
72  std::string _extra_flags;
73 
78 };
79 
80 } // namespace libMesh
81 
82 #endif // LIBMESH_HAVE_TRIANGLE
83 
84 #endif // ifndef LIBMESH_MESH_TRIANGLE_INTERFACE_H
virtual void triangulate() override
Internally, this calls Triangle's triangulate routine.
virtual ~TriangleInterface()=default
Empty destructor.
std::string _extra_flags
Additional flags to be passed to triangle.
MeshBase & mesh
The libMesh namespace provides an interface to certain functionality in the library.
The UnstructuredMesh class is derived from the MeshBase class.
std::string & extra_flags()
Sets and/or gets additional flags to be passed to triangle.
MeshSerializer _serializer
Triangle only operates on serial meshes.
Temporarily serialize a DistributedMesh for non-distributed-mesh capable code paths.
A C++ interface between LibMesh and the Triangle library written by J.R.
TriangleInterface(UnstructuredMesh &mesh)
The constructor.