$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 #ifndef LIBMESH_MESH_TRIANGLE_HOLES_H 00019 #define LIBMESH_MESH_TRIANGLE_HOLES_H 00020 00021 #include "libmesh/libmesh_config.h" 00022 00023 #ifdef LIBMESH_HAVE_TRIANGLE 00024 00025 // Local includes 00026 #include "libmesh/mesh_triangle_interface.h" 00027 #include "libmesh/point.h" 00028 00029 // C++ includes 00030 00031 namespace libMesh 00032 { 00033 00040 class TriangleInterface::Hole 00041 { 00042 public: 00046 Hole() {} 00047 00051 virtual ~Hole() {} 00052 00056 virtual unsigned int n_points() const = 0; 00057 00061 virtual Point point(const unsigned int n) const = 0; 00062 00066 virtual Point inside() const = 0; 00067 }; 00068 00069 00070 00071 00072 00077 class TriangleInterface::PolygonHole : public TriangleInterface::Hole 00078 { 00079 public: 00085 PolygonHole(const Point& center, Real radius, unsigned int n_points); 00086 00087 virtual unsigned int n_points() const; 00088 00089 virtual Point point(const unsigned int n) const; 00090 00091 virtual Point inside() const; 00092 00093 private: 00097 Point _center; 00098 00102 Real _radius; 00103 00109 unsigned int _n_points; 00110 }; 00111 00112 00113 00114 00122 class TriangleInterface::ArbitraryHole : public TriangleInterface::Hole 00123 { 00124 public: 00129 ArbitraryHole(const Point& center, 00130 const std::vector<Point>& points); 00131 00132 virtual unsigned int n_points() const; 00133 00134 virtual Point point(const unsigned int n) const; 00135 00136 virtual Point inside() const; 00137 00138 private: 00142 Point _center; 00143 00148 const std::vector<Point>& _points; 00149 }; 00150 00151 } // namespace libMesh 00152 00153 #endif // LIBMESH_HAVE_TRIANGLE 00154 00155 #endif // LIBMESH_MESH_TRIANGLE_HOLES_H