libMesh
|
A concrete instantiation of the Hole class that describes polygonal (triangular, square, pentagonal, ...) holes. More...
#include <mesh_triangle_holes.h>
Public Member Functions | |
PolygonHole (const Point ¢er, Real radius, unsigned int n_points) | |
Constructor specifying the center, radius, and number of points which comprise the hole. More... | |
virtual unsigned int | n_points () const override |
The number of geometric points which define the hole. More... | |
virtual Point | point (const unsigned int n) const override |
Return the nth point defining the hole. More... | |
virtual Point | inside () const override |
Return an (arbitrary) point which lies inside the hole. More... | |
virtual unsigned int | n_midpoints () const |
The number of geometric midpoints along each of the sides defining the hole. More... | |
virtual Point | midpoint (const unsigned int, const unsigned int) const |
Return the midpoint m along the side n defining the hole. More... | |
bool | contains (Point p) const |
Return true iff p lies inside the hole. More... | |
Real | area () const |
Return the area of the hole. More... | |
RealGradient | areavec () const |
Return a vector with right-hand-rule orientation and length of twice area() squared. More... | |
virtual std::vector< unsigned int > | segment_indices () const |
Starting indices of points for a hole with multiple disconnected boundaries. More... | |
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 interior. More... | |
virtual bool | refine_boundary_allowed () const |
Get whether or not the triangulation is allowed to refine the mesh boundary when refining the interior. More... | |
Protected Member Functions | |
std::vector< Real > | find_ray_intersections (Point ray_start, Point ray_target) const |
Helper function for contains(), also useful for MeshedHole::inside() More... | |
Point | calculate_inside_point () const |
Calculate an inside point based on our boundary. More... | |
Protected Attributes | |
bool | _refine_bdy_allowed = true |
Whether to allow boundary refinement. More... | |
Private Attributes | |
Point | _center |
(x,y) location of the center of the hole More... | |
Real | _radius |
circular hole radius More... | |
unsigned int | _n_points |
number of points used to describe the hole. More... | |
A concrete instantiation of the Hole class that describes polygonal (triangular, square, pentagonal, ...) holes.
Definition at line 171 of file mesh_triangle_holes.h.
libMesh::TriangulatorInterface::PolygonHole::PolygonHole | ( | const Point & | center, |
Real | radius, | ||
unsigned int | n_points | ||
) |
Constructor specifying the center, radius, and number of points which comprise the hole.
The points will all lie on a circle of radius r.
Definition at line 323 of file mesh_triangle_holes.C.
|
inherited |
Return the area of the hole.
This method currently does not take any higher-order hole geometry into account, but treats the hole as a polygon.
Definition at line 184 of file mesh_triangle_holes.C.
References libMesh::TriangulatorInterface::Hole::areavec(), and libMesh::TypeVector< T >::norm().
Referenced by libMesh::TriangulatorInterface::MeshedHole::MeshedHole(), and MeshTriangulationTest::testTriangleHoleArea().
|
inherited |
Return a vector with right-hand-rule orientation and length of twice area() squared.
This is useful for determining orientation of non-planar or non-counter-clockwise holes.
This method currently does not take any higher-order hole geometry into account, but treats the hole as a polygon.
Definition at line 190 of file mesh_triangle_holes.C.
References libMesh::TypeVector< T >::cross().
Referenced by libMesh::TriangulatorInterface::Hole::area().
|
protectedinherited |
Calculate an inside point based on our boundary.
Definition at line 248 of file mesh_triangle_holes.C.
References libMesh::make_range(), and libMesh::Real.
Referenced by libMesh::TriangulatorInterface::ArbitraryHole::ArbitraryHole(), and libMesh::TriangulatorInterface::ArbitraryHole::set_points().
|
inherited |
Return true iff p
lies inside the hole.
This method currently does not take any higher-order hole geometry into account, but treats the hole as a polygon.
Definition at line 305 of file mesh_triangle_holes.C.
Referenced by libMesh::TriangulatorInterface::verify_holes().
|
protectedinherited |
Helper function for contains(), also useful for MeshedHole::inside()
Definition at line 224 of file mesh_triangle_holes.C.
References libMesh::make_range(), and libMesh::Real.
|
overridevirtual |
Return an (arbitrary) point which lies inside the hole.
Implements libMesh::TriangulatorInterface::Hole.
Definition at line 349 of file mesh_triangle_holes.C.
|
inlinevirtualinherited |
Return the midpoint m
along the side n
defining the hole.
Reimplemented in libMesh::TriangulatorInterface::MeshedHole.
Definition at line 80 of file mesh_triangle_holes.h.
|
inlinevirtualinherited |
The number of geometric midpoints along each of the sides defining the hole.
Reimplemented in libMesh::TriangulatorInterface::MeshedHole.
Definition at line 70 of file mesh_triangle_holes.h.
|
overridevirtual |
The number of geometric points which define the hole.
Implements libMesh::TriangulatorInterface::Hole.
Definition at line 332 of file mesh_triangle_holes.C.
|
overridevirtual |
Return the nth point defining the hole.
Implements libMesh::TriangulatorInterface::Hole.
Definition at line 338 of file mesh_triangle_holes.C.
References libMesh::pi, and libMesh::Real.
|
inlinevirtualinherited |
Get whether or not the triangulation is allowed to refine the mesh boundary when refining the interior.
True by default.
Definition at line 140 of file mesh_triangle_holes.h.
References libMesh::TriangulatorInterface::Hole::_refine_bdy_allowed.
Referenced by libMesh::Poly2TriTriangulator::is_refine_boundary_allowed(), and MeshTriangulationTest::testPoly2TriHolesInteriorRefinedBase().
|
inlinevirtualinherited |
Starting indices of points for a hole with multiple disconnected boundaries.
Reimplemented in libMesh::TriangulatorInterface::ArbitraryHole.
Definition at line 118 of file mesh_triangle_holes.h.
References libMesh::TriangulatorInterface::Hole::n_points().
|
inlinevirtualinherited |
Set whether or not a triangulator is allowed to refine the hole boundary when refining the mesh interior.
This is true by default, but may be set to false to make the hole boundary more predictable (and so easier to stitch to other meshes) later.
Definition at line 133 of file mesh_triangle_holes.h.
References libMesh::TriangulatorInterface::Hole::_refine_bdy_allowed.
Referenced by MeshTriangulationTest::testPoly2TriHolesInteriorRefinedBase().
|
private |
(x,y) location of the center of the hole
Definition at line 191 of file mesh_triangle_holes.h.
|
private |
number of points used to describe the hole.
The actual points can be generated knowing the center and radius. For example, n_points=3 would generate a triangular hole.
Definition at line 203 of file mesh_triangle_holes.h.
|
private |
circular hole radius
Definition at line 196 of file mesh_triangle_holes.h.
|
protectedinherited |
Whether to allow boundary refinement.
True by default; specified here so we can use the default constructor.
Definition at line 160 of file mesh_triangle_holes.h.
Referenced by libMesh::TriangulatorInterface::Hole::refine_boundary_allowed(), and libMesh::TriangulatorInterface::Hole::set_refine_boundary_allowed().