mesh_triangle_interface.h
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 00019 #ifndef LIBMESH_MESH_TRIANGLE_INTERFACE_H 00020 #define LIBMESH_MESH_TRIANGLE_INTERFACE_H 00021 00022 00023 #include "libmesh/libmesh_config.h" 00024 00025 #ifdef LIBMESH_HAVE_TRIANGLE 00026 00027 // Local Includes 00028 #include "libmesh/enum_elem_type.h" 00029 #include "libmesh/libmesh.h" 00030 #include "libmesh/mesh_serializer.h" 00031 00032 // C++ includes 00033 #include <cstddef> 00034 #include <vector> 00035 00036 namespace libMesh 00037 { 00038 00039 // Forward Declarations 00040 00041 class UnstructuredMesh; 00042 00049 class TriangleInterface 00050 { 00051 public: 00058 explicit 00059 TriangleInterface(UnstructuredMesh& mesh); 00060 00064 ~TriangleInterface() {} 00065 00070 enum TriangulationType 00071 { 00077 GENERATE_CONVEX_HULL = 0, 00078 00089 PSLG = 1, 00090 00094 INVALID_TRIANGULATION_TYPE 00095 }; 00096 00102 class Hole; 00103 class PolygonHole; 00104 class ArbitraryHole; 00105 00110 void triangulate(); 00111 00115 ElemType& elem_type() {return _elem_type;} 00116 00120 Real& desired_area() {return _desired_area;} 00121 00125 TriangulationType& triangulation_type() {return _triangulation_type;} 00126 00130 bool& insert_extra_points() {return _insert_extra_points;} 00131 00136 bool& smooth_after_generating() {return _smooth_after_generating;} 00137 00142 void attach_hole_list(const std::vector<Hole*>* holes) {_holes = holes;} 00143 00155 std::vector<std::pair<unsigned int, unsigned int> > segments; 00156 00157 private: 00161 UnstructuredMesh& _mesh; 00162 00167 const std::vector<Hole*>* _holes; 00168 00173 ElemType _elem_type; 00174 00178 Real _desired_area; 00179 00185 TriangulationType _triangulation_type; 00186 00192 bool _insert_extra_points; 00193 00198 bool _smooth_after_generating; 00199 00203 MeshSerializer _serializer; 00204 }; 00205 00206 } // namespace libMesh 00207 00208 00209 00210 #endif // LIBMESH_HAVE_TRIANGLE 00211 00212 #endif // ifndef LIBMESH_MESH_TRIANGLE_INTERFACE_H
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:47 UTC
Hosted By: