18#ifndef LIBMESH_MESH_TRIANGLE_HOLES_H
19#define LIBMESH_MESH_TRIANGLE_HOLES_H
21#include "libmesh/libmesh_config.h"
24#include "libmesh/boundary_info.h"
25#include "libmesh/point.h"
26#include "libmesh/triangulator_interface.h"
27#include "libmesh/vector_value.h"
81 const unsigned int )
const
121 std::vector<unsigned int> seg;
149 Point ray_target)
const;
181 virtual unsigned int n_points()
const override;
183 virtual Point point(
const unsigned int n)
const override;
227 virtual Point point(
const unsigned int n)
const override;
273 std::vector<Point> points);
276 std::vector<Point> points,
292 virtual unsigned int n_points()
const override;
294 virtual Point point(
const unsigned int n)
const override;
351 std::set<std::size_t> ids = {});
353 virtual unsigned int n_points()
const override;
357 virtual Point point(
const unsigned int n)
const override;
360 const unsigned int n)
const override;
This is the MeshBase class.
A Point defines a location in LIBMESH_DIM dimensional Real space.
A way to translate and/or rotate an existing hole; perhaps to tile it in many places or to put it at ...
Point transform(const Point &p) const
Rotate-and-shift equations.
const Hole & _underlying
Hole to transform.
virtual unsigned int n_points() const override
The number of geometric points which define the hole.
Real _angle
Angle to rotate (counter-clockwise) by.
AffineHole(const Hole &underlying, Real angle, const Point &shift)
Constructor specifying the underlying hole, and the rotation angle (in radians, done first) and trans...
virtual Point point(const unsigned int n) const override
Return the nth point defining the hole.
Point _shift
(x,y) location to shift (0,0) to
virtual Point inside() const override
Return an (arbitrary) point which lies inside the hole.
Another concrete instantiation of the hole, this one should be sufficiently general for most non-poly...
virtual Point inside() const override
Return an (arbitrary) point which lies inside the hole.
ArbitraryHole(const ArbitraryHole &orig)=default
virtual unsigned int n_points() const override
The number of geometric points which define the hole.
std::vector< unsigned int > _segment_indices
std::vector< Point > _points
Reference to the vector of points which makes up the hole.
Point _center
arbitrary (x,y) location inside the hole
virtual std::vector< unsigned int > segment_indices() const override
Starting indices of points for a hole with multiple disconnected boundaries.
const std::vector< Point > & get_points() const
virtual Point point(const unsigned int n) const override
Return the nth point defining the hole.
void set_points(std::vector< Point > points)
An abstract class for defining a 2-dimensional hole.
bool contains(Point p) const
Return true iff p lies inside the hole.
std::vector< Real > find_ray_intersections(Point ray_start, Point ray_target) const
Helper function for contains(), also useful for MeshedHole::inside()
virtual bool refine_boundary_allowed() const
Get whether or not the triangulation is allowed to refine the mesh boundary when refining the interio...
virtual Point midpoint(const unsigned int, const unsigned int) const
Return the midpoint m along the side n defining the hole.
Real area() const
Return the area of the hole.
virtual Point point(const unsigned int n) const =0
Return the nth point defining the hole.
Point calculate_inside_point() const
Calculate an inside point based on our boundary.
virtual unsigned int n_points() const =0
The number of geometric points which define the hole.
virtual unsigned int n_midpoints() const
The number of geometric midpoints along each of the sides defining the hole.
virtual std::vector< unsigned int > segment_indices() const
Starting indices of points for a hole with multiple disconnected boundaries.
virtual void set_refine_boundary_allowed(bool refine_bdy_allowed)
Set whether or not a triangulator is allowed to refine the hole boundary when refining the mesh inter...
virtual ~Hole()=default
Destructor.
Hole()=default
Constructor.
bool _refine_bdy_allowed
Whether to allow boundary refinement.
virtual Point inside() const =0
Return an (arbitrary) point which lies inside the hole.
RealGradient areavec() const
Return a vector with right-hand-rule orientation and length of twice area() squared.
Another concrete instantiation of the hole, as general as ArbitraryHole, but based on an existing 1D ...
virtual Point point(const unsigned int n) const override
Return the nth point defining the hole.
virtual Point midpoint(const unsigned int m, const unsigned int n) const override
Return the midpoint m along the side n defining the hole.
virtual unsigned int n_points() const override
The number of geometric points which define the hole.
virtual Point inside() const override
Return an (arbitrary) point which lies inside the hole.
std::vector< Point > _midpoints
The sorted vector of midpoints in between points along the edges of the hole.
std::vector< Point > _points
The sorted vector of points which makes up the hole.
Point _center
An (x,y) location inside the hole.
virtual unsigned int n_midpoints() const override
The number of geometric midpoints along each of the sides defining the hole.
A concrete instantiation of the Hole class that describes polygonal (triangular, square,...
Point _center
(x,y) location of the center of the hole
virtual Point inside() const override
Return an (arbitrary) point which lies inside the hole.
virtual Point point(const unsigned int n) const override
Return the nth point defining the hole.
virtual unsigned int n_points() const override
The number of geometric points which define the hole.
Real _radius
circular hole radius
unsigned int _n_points
number of points used to describe the hole.
A class for defining a 2-dimensional region for Triangle.
Region(const Point ¢er, Real attribute=0, Real max_area=-std::numeric_limits< Real >::max())
Constructor.
const Point _center
Arbitrary (x,y) location inside the region.
Real _attribute
Attribute of the region Default value for attribute is zero.
Real _max_area
Maximum area that is allowed for all triangles in this region Default negative maximum area means tha...
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real