mesh_triangle_holes.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2018 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 #ifndef LIBMESH_MESH_TRIANGLE_HOLES_H
19 #define LIBMESH_MESH_TRIANGLE_HOLES_H
20 
21 #include "libmesh/libmesh_config.h"
22 
23 #ifdef LIBMESH_HAVE_TRIANGLE
24 
25 // Local includes
27 #include "libmesh/point.h"
28 
29 // C++ includes
30 
31 namespace libMesh
32 {
33 
45 {
46 public:
50  Hole() {}
51 
55  virtual ~Hole() {}
56 
60  virtual unsigned int n_points() const = 0;
61 
65  virtual Point point(const unsigned int n) const = 0;
66 
70  virtual Point inside() const = 0;
71 };
72 
73 
74 
75 
76 
82 {
83 public:
89  PolygonHole(const Point & center, Real radius, unsigned int n_points);
90 
91  virtual unsigned int n_points() const override;
92 
93  virtual Point point(const unsigned int n) const override;
94 
95  virtual Point inside() const override;
96 
97 private:
102 
107 
113  unsigned int _n_points;
114 };
115 
116 
117 
118 
127 {
128 public:
133  ArbitraryHole(const Point & center,
134  const std::vector<Point> & points);
135 
136  virtual unsigned int n_points() const override;
137 
138  virtual Point point(const unsigned int n) const override;
139 
140  virtual Point inside() const override;
141 
142 private:
147 
152  const std::vector<Point> & _points;
153 };
154 
155 } // namespace libMesh
156 
157 #endif // LIBMESH_HAVE_TRIANGLE
158 
159 #endif // LIBMESH_MESH_TRIANGLE_HOLES_H
Class for parameterizing 2D holes to be meshed with Triangle.
virtual Point point(const unsigned int n) const override
virtual unsigned int n_points() const override
ArbitraryHole(const Point &center, const std::vector< Point > &points)
virtual Point inside() const override
virtual unsigned int n_points() const =0
virtual unsigned int n_points() const override
PolygonHole(const Point &center, Real radius, unsigned int n_points)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual Point inside() const =0
virtual Point inside() const override
virtual Point point(const unsigned int n) const =0
A geometric point in (x,y,z) space.
Definition: point.h:38
virtual Point point(const unsigned int n) const override