libMesh
|
Another concrete instantiation of the hole, this one should be sufficiently general for most non-polygonal purposes. More...
#include <mesh_triangle_holes.h>
Public Member Functions | |
ArbitraryHole (const Point ¢er, std::vector< Point > points) | |
The fastest constructor requires a point which lies in the interior of the hole and a reference to a vector of Points defining the hole. More... | |
ArbitraryHole (const Point ¢er, std::vector< Point > points, std::vector< unsigned int > segment_indices) | |
ArbitraryHole (std::vector< Point > points) | |
If we don't know a center a priori then we can calculate one. More... | |
ArbitraryHole (const Hole &orig) | |
We can also construct an ArbitraryHole which just copies a hole of any other type. More... | |
ArbitraryHole (const ArbitraryHole &orig)=default | |
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 std::vector< unsigned int > | segment_indices () const override |
Starting indices of points for a hole with multiple disconnected boundaries. More... | |
const std::vector< Point > & | get_points () const |
void | set_points (std::vector< Point > points) |
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 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 |
arbitrary (x,y) location inside the hole More... | |
std::vector< Point > | _points |
Reference to the vector of points which makes up the hole. More... | |
std::vector< unsigned int > | _segment_indices |
Another concrete instantiation of the hole, this one should be sufficiently general for most non-polygonal purposes.
The user supplies, at the time of construction, a reference to a vector of Points which defines the hole (in order of connectivity) and an arbitrary Point which lies inside the hole.
Definition at line 264 of file mesh_triangle_holes.h.
libMesh::TriangulatorInterface::ArbitraryHole::ArbitraryHole | ( | const Point & | center, |
std::vector< Point > | points | ||
) |
The fastest constructor requires a point which lies in the interior of the hole and a reference to a vector of Points defining the hole.
Definition at line 383 of file mesh_triangle_holes.C.
References _points, and _segment_indices.
libMesh::TriangulatorInterface::ArbitraryHole::ArbitraryHole | ( | const Point & | center, |
std::vector< Point > | points, | ||
std::vector< unsigned int > | segment_indices | ||
) |
Definition at line 393 of file mesh_triangle_holes.C.
libMesh::TriangulatorInterface::ArbitraryHole::ArbitraryHole | ( | std::vector< Point > | points | ) |
If we don't know a center a priori then we can calculate one.
Definition at line 402 of file mesh_triangle_holes.C.
References _center, _points, _segment_indices, and libMesh::TriangulatorInterface::Hole::calculate_inside_point().
libMesh::TriangulatorInterface::ArbitraryHole::ArbitraryHole | ( | const Hole & | orig | ) |
We can also construct an ArbitraryHole which just copies a hole of any other type.
Definition at line 411 of file mesh_triangle_holes.C.
References _points, libMesh::make_range(), libMesh::TriangulatorInterface::Hole::n_points(), and libMesh::TriangulatorInterface::Hole::point().
|
default |
|
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 ArbitraryHole(), and 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.
|
inline |
Definition at line 300 of file mesh_triangle_holes.h.
References _points.
Referenced by libMesh::Poly2TriTriangulator::insert_refinement_points().
|
overridevirtual |
Return an (arbitrary) point which lies inside the hole.
Implements libMesh::TriangulatorInterface::Hole.
Definition at line 434 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 421 of file mesh_triangle_holes.C.
|
overridevirtual |
Return the nth point defining the hole.
Implements libMesh::TriangulatorInterface::Hole.
Definition at line 427 of file mesh_triangle_holes.C.
|
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().
|
overridevirtual |
Starting indices of points for a hole with multiple disconnected boundaries.
Reimplemented from libMesh::TriangulatorInterface::Hole.
Definition at line 440 of file mesh_triangle_holes.C.
|
inline |
Definition at line 305 of file mesh_triangle_holes.h.
References _center, _points, and libMesh::TriangulatorInterface::Hole::calculate_inside_point().
Referenced by libMesh::Poly2TriTriangulator::insert_refinement_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 |
arbitrary (x,y) location inside the hole
Definition at line 315 of file mesh_triangle_holes.h.
Referenced by ArbitraryHole(), and set_points().
|
private |
Reference to the vector of points which makes up the hole.
Definition at line 321 of file mesh_triangle_holes.h.
Referenced by ArbitraryHole(), get_points(), and set_points().
|
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().
|
private |
Definition at line 323 of file mesh_triangle_holes.h.
Referenced by ArbitraryHole().