libMesh
|
A way to translate and/or rotate an existing hole; perhaps to tile it in many places or to put it at an angle that the underlying hole doesn't support. More...
#include <mesh_triangle_holes.h>
Public Member Functions | |
AffineHole (const Hole &underlying, Real angle, const Point &shift) | |
Constructor specifying the underlying hole, and the rotation angle (in radians, done first) and translation (done second) with which to transform it. 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 Member Functions | |
Point | transform (const Point &p) const |
Rotate-and-shift equations. More... | |
Private Attributes | |
const Hole & | _underlying |
Hole to transform. More... | |
Real | _angle |
Angle to rotate (counter-clockwise) by. More... | |
Point | _shift |
(x,y) location to shift (0,0) to More... | |
A way to translate and/or rotate an existing hole; perhaps to tile it in many places or to put it at an angle that the underlying hole doesn't support.
Definition at line 213 of file mesh_triangle_holes.h.
|
inline |
Constructor specifying the underlying hole, and the rotation angle (in radians, done first) and translation (done second) with which to transform it.
Definition at line 221 of file mesh_triangle_holes.h.
|
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 365 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.
|
inlineoverridevirtual |
The number of geometric points which define the hole.
Implements libMesh::TriangulatorInterface::Hole.
Definition at line 224 of file mesh_triangle_holes.h.
References _underlying, and libMesh::TriangulatorInterface::Hole::n_points().
|
overridevirtual |
Return the nth point defining the hole.
Implements libMesh::TriangulatorInterface::Hole.
Definition at line 359 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().
|
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().
Rotate-and-shift equations.
Definition at line 371 of file mesh_triangle_holes.C.
References libMesh::Real.
|
private |
Angle to rotate (counter-clockwise) by.
Definition at line 245 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().
|
private |
(x,y) location to shift (0,0) to
Definition at line 250 of file mesh_triangle_holes.h.
|
private |