$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 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_WRAPPER_H 00020 #define LIBMESH_MESH_TRIANGLE_WRAPPER_H 00021 00022 #include "libmesh/libmesh_config.h" 00023 00024 #ifdef LIBMESH_HAVE_TRIANGLE 00025 00026 // Local Includes 00027 #include "libmesh/libmesh_common.h" // Real 00028 #include "libmesh/enum_elem_type.h" // For ElemType declaration below 00029 00030 // C++ includes 00031 #include <cstddef> 00032 00033 namespace libMesh 00034 { 00035 // Forward declarations 00036 class UnstructuredMesh; 00037 00038 // Make sure Triangle uses our "Real" as its "REAL" 00039 typedef Real REAL; 00040 00046 namespace TriangleWrapper 00047 { 00048 extern "C" 00049 { 00050 #include "triangle.h" 00051 } 00052 00053 enum IO_Type { 00054 INPUT = 0, 00055 OUTPUT = 1, 00056 BOTH = 2}; 00057 00064 void init(triangulateio& t); 00065 00077 void destroy(triangulateio& t, IO_Type); 00078 00085 void copy_tri_to_mesh(const triangulateio& triangle_data_input, 00086 UnstructuredMesh& mesh_output, 00087 const ElemType type); 00088 } // namespace TriangleWrapper 00089 } // namespace libMesh 00090 00091 00092 #endif // LIBMESH_HAVE_TRIANGLE 00093 00094 #endif // LIBMESH_MESH_TRIANGLE_WRAPPER_H