libMesh
|
A C++ interface between LibMesh and the poly2tri library, with custom code for Steiner point insertion. More...
#include <poly2tri_triangulator.h>
Public Types | |
enum | TriangulationType { GENERATE_CONVEX_HULL = 0, PSLG = 1, INVALID_TRIANGULATION_TYPE } |
The TriangulationType is used with the general triangulate function defined below. More... | |
Public Member Functions | |
Poly2TriTriangulator (UnstructuredMesh &mesh, dof_id_type n_boundary_nodes=DofObject::invalid_id) | |
The constructor. More... | |
virtual | ~Poly2TriTriangulator () |
Empty destructor. More... | |
virtual void | triangulate () override |
Internally, this calls the poly2tri triangulation code in a loop, inserting our owner Steiner points as necessary to promote mesh quality. More... | |
virtual void | set_desired_area_function (FunctionBase< Real > *desired) override |
Set a function giving desired triangle area as a function of position. More... | |
virtual FunctionBase< Real > * | get_desired_area_function () override |
Get the function giving desired triangle area as a function of position, or nullptr if no such function has been set. More... | |
virtual void | set_refine_boundary_allowed (bool refine_bdy_allowed) override |
Set whether or not the triangulation is allowed to refine the mesh boundary when refining the interior. More... | |
virtual bool | refine_boundary_allowed () const override |
Get whether or not the triangulation is allowed to refine the mesh boundary when refining the interior. More... | |
ElemType & | elem_type () |
Sets and/or gets the desired element type. More... | |
Real & | desired_area () |
Sets and/or gets the desired triangle area. More... | |
Real & | minimum_angle () |
Sets and/or gets the minimum desired angle. More... | |
TriangulationType & | triangulation_type () |
Sets and/or gets the desired triangulation type. More... | |
bool & | insert_extra_points () |
Sets and/or gets the flag for inserting add'l points. More... | |
void | set_interpolate_boundary_points (int n_points) |
Complicated setter, for compatibility with insert_extra_points() More... | |
int | get_interpolate_boundary_points () const |
Complicated getter, for compatibility with insert_extra_points() More... | |
bool & | smooth_after_generating () |
Sets/gets flag which tells whether to do two steps of Laplace mesh smoothing after generating the grid. More... | |
bool & | quiet () |
Whether not to silence internal messages to stdout. More... | |
void | attach_hole_list (const std::vector< Hole *> *holes) |
Attaches a vector of Hole* pointers which will be meshed around. More... | |
void | set_verify_hole_boundaries (bool v) |
Verifying that hole boundaries don't cross the outer boundary or each other is something like O(N_bdys^2*N_points_per_bdy^2), so we only do it if requested. More... | |
bool | get_verify_hole_boundaries () const |
void | attach_boundary_marker (const std::vector< int > *markers) |
Attaches boundary markers. More... | |
void | attach_region_list (const std::vector< Region *> *regions) |
Attaches regions for using attribute to set subdomain IDs and better controlling the triangle sizes within the regions. More... | |
void | set_auto_area_function (const Parallel::Communicator &comm, const unsigned int num_nearest_pts, const unsigned int power, const Real background_value, const Real background_eff_dist) |
Generate an auto area function based on spacing of boundary points. More... | |
bool | has_auto_area_function () |
Whether or not an auto area function has been set. More... | |
FunctionBase< Real > * | get_auto_area_function () |
Get the auto area function. More... | |
void | calculate_auto_desired_area_samples (std::vector< Point > &function_points, std::vector< Real > &function_sizes, const Real &area_factor=1.5) |
The external boundary and all hole boundaries are collected. More... | |
void | set_outer_boundary_ids (std::set< std::size_t > bdy_ids) |
A set of ids to allow on the outer boundary loop: interpreted as boundary ids of 2D elements and/or subdomain ids of 1D edges. More... | |
const std::set< std::size_t > & | get_outer_boundary_ids () const |
Public Attributes | |
std::vector< std::pair< unsigned int, unsigned int > > | segments |
When constructing a PSLG, if the node numbers do not define the desired boundary segments implicitly through the ordering of the points, you can use the segments vector to specify the segments explicitly, Ex: unit square numbered counter-clockwise starting from origin segments[0] = (0,1) segments[1] = (1,2) segments[2] = (2,3) segments[3] = (3,0) (For the above case you could actually use the implicit ordering!) More... | |
std::vector< Point > | segment_midpoints |
When constructing a second-order triangulation from a second-order boundary, we may do the triangulation using first-order elements, in which case we need to save midpoint location data in order to reconstruct curvature along boundaries. More... | |
Protected Member Functions | |
bool | is_refine_boundary_allowed (const BoundaryInfo &boundary_info, const Elem &elem, unsigned int side) |
Is refining this element's boundary side allowed? More... | |
void | triangulate_current_points () |
Triangulate the current mesh and hole points. More... | |
bool | insert_refinement_points () |
Add Steiner points as new mesh nodes, as necessary to refine an existing trangulation. More... | |
bool | should_refine_elem (Elem &elem) |
Returns true if the given element ought to be refined according to current criteria. More... | |
void | elems_to_segments () |
Helper function to create PSLG segments from our other boundary-defining options (1D mesh edges, 2D mesh boundary sides), if no segments already exist. More... | |
void | nodes_to_segments (dof_id_type max_node_id) |
Helper function to create PSLG segments from our node ordering, up to the maximum node id, if no segments already exist. More... | |
void | insert_any_extra_boundary_points () |
Helper function to add extra points (midpoints of initial segments) to a PSLG triangulation. More... | |
void | increase_triangle_order () |
Helper function to upconvert Tri3 to any higher order triangle type if requested via _elem_type . More... | |
void | verify_holes (const Hole &outer_bdy) |
Helper function to check holes for intersections if requested. More... | |
unsigned int | total_hole_points () |
Helper function to count points in and verify holes. More... | |
Protected Attributes | |
UnstructuredMesh & | _mesh |
Reference to the mesh which is to be created by triangle. More... | |
const std::vector< Hole * > * | _holes |
A pointer to a vector of Hole*s. More... | |
const std::vector< int > * | _markers |
Boundary markers. More... | |
const std::vector< Region * > * | _regions |
A pointer to a vector of Regions*s. More... | |
std::set< std::size_t > | _bdy_ids |
A set of ids to allow on the outer boundary loop. More... | |
ElemType | _elem_type |
The type of elements to generate. More... | |
Real | _desired_area |
The desired area for the elements in the resulting mesh. More... | |
Real | _minimum_angle |
Minimum angle in triangles. More... | |
TriangulationType | _triangulation_type |
The type of triangulation to perform: choices are: convex hull PSLG. More... | |
bool | _insert_extra_points |
Flag which tells whether or not to insert additional nodes before triangulation. More... | |
int | _interpolate_boundary_points |
Flag which tells how many additional nodes should be inserted between each pair of original mesh points. More... | |
bool | _smooth_after_generating |
Flag which tells whether we should smooth the mesh after it is generated. More... | |
bool | _quiet |
Flag which tells if we want to suppress stdout outputs. More... | |
bool | _verify_hole_boundaries |
Flag which tells if we want to check hole geometry. More... | |
std::unique_ptr< AutoAreaFunction > | _auto_area_function |
The auto area function based on the spacing of boundary points. More... | |
Private Attributes | |
std::map< const Hole *, std::unique_ptr< ArbitraryHole > > | replaced_holes |
We might have to replace the user-provided holes with refined versions. More... | |
dof_id_type | _n_boundary_nodes |
Keep track of how many mesh nodes are boundary nodes. More... | |
std::unique_ptr< FunctionBase< Real > > | _desired_area_func |
Location-dependent area requirements. More... | |
bool | _refine_bdy_allowed |
Whether to allow boundary refinement. More... | |
A C++ interface between LibMesh and the poly2tri library, with custom code for Steiner point insertion.
Definition at line 46 of file poly2tri_triangulator.h.
|
inherited |
The TriangulationType is used with the general triangulate function defined below.
Definition at line 111 of file triangulator_interface.h.
|
explicit |
The constructor.
A reference to the mesh containing the points which are to be triangulated must be provided. The first n_boundary_nodes
are expected to form a closed loop around the mesh domain; any subsequent nodes are expected to be interior nodes or in the middle of (internal hole or external) boundary segments.
If n_boundary_nodes
is not supplied or is invalid_id
then all mesh points are expected to be boundary polyline points.
Definition at line 354 of file poly2tri_triangulator.C.
|
virtualdefault |
Empty destructor.
Defaulted in the .C so we can forward declare unique_ptr contents.
|
inlineinherited |
Attaches boundary markers.
If segments is set, the number of markers must be equal to the size of segments, otherwise, it is equal to the number of points.
Definition at line 294 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_markers.
|
inlineinherited |
Attaches a vector of Hole* pointers which will be meshed around.
Definition at line 255 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_holes.
Referenced by libMesh::MeshTools::Generation::build_delaunay_square(), MeshTriangulationTest::testPoly2TriHolesInterpRefined(), MeshTriangulationTest::testPoly2TriRefinementBase(), MeshTriangulationTest::testTriangulatorHoles(), MeshTriangulationTest::testTriangulatorMeshedHoles(), MeshTriangulationTest::testTriangulatorRoundHole(), and triangulate_domain().
|
inlineinherited |
Attaches regions for using attribute to set subdomain IDs and better controlling the triangle sizes within the regions.
Definition at line 300 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_regions.
|
inherited |
The external boundary and all hole boundaries are collected.
The centroid of each EDGE element is used as the point position and the desired area is calculated as the area of the equilateral triangle with the edge length as the length of the EDGE element times an area_factor (default is 1.5).
Definition at line 500 of file triangulator_interface.C.
References libMesh::TriangulatorInterface::_bdy_ids, libMesh::TriangulatorInterface::_holes, libMesh::TriangulatorInterface::_mesh, and libMesh::Real.
Referenced by libMesh::TriangulatorInterface::get_auto_area_function().
|
inlineinherited |
Sets and/or gets the desired triangle area.
Set to zero to disable area constraint.
If a desired_area_function
is set, then desired_area()
should be used to set a minimum desired area; this will reduce "false negatives" by suggesting how finely to sample desired_area_function
inside large triangles, where ideally the desired_area_function
will be satisfied in the triangle interior and not just at the triangle vertices.
Definition at line 177 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_desired_area.
Referenced by libMesh::MeshTools::Generation::build_delaunay_square(), MeshTriangulationTest::commonSettings(), insert_refinement_points(), main(), should_refine_elem(), MeshTriangulationTest::testPoly2TriRefinementBase(), MeshTriangulationTest::testTriangulatorInterp(), and triangulate_domain().
|
inlineinherited |
Sets and/or gets the desired element type.
Definition at line 164 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_elem_type.
Referenced by libMesh::MeshTools::Generation::build_delaunay_square(), and MeshTriangulationTest::testTriangulatorRoundHole().
|
protectedinherited |
Helper function to create PSLG segments from our other boundary-defining options (1D mesh edges, 2D mesh boundary sides), if no segments already exist.
Definition at line 149 of file triangulator_interface.C.
References libMesh::TriangulatorInterface::_bdy_ids, libMesh::TriangulatorInterface::_holes, libMesh::TriangulatorInterface::_mesh, libMesh::TriangulatorInterface::_verify_hole_boundaries, libMesh::MeshBase::clear_elems(), libMesh::MeshBase::delete_node(), libMesh::make_range(), libMesh::MeshBase::n_elem(), libMesh::MeshBase::node_ptr(), libMesh::TriangulatorInterface::segment_midpoints, libMesh::TriangulatorInterface::segments, and libMesh::TriangulatorInterface::verify_holes().
Referenced by libMesh::TriangleInterface::triangulate(), and triangulate().
|
inherited |
Get the auto area function.
Definition at line 487 of file triangulator_interface.C.
References libMesh::TriangulatorInterface::_auto_area_function, and libMesh::TriangulatorInterface::calculate_auto_desired_area_samples().
Referenced by should_refine_elem().
|
overridevirtual |
Get the function giving desired triangle area as a function of position, or nullptr
if no such function has been set.
Reimplemented from libMesh::TriangulatorInterface.
Definition at line 456 of file poly2tri_triangulator.C.
References _desired_area_func.
Referenced by insert_refinement_points(), and should_refine_elem().
|
inherited |
Complicated getter, for compatibility with insert_extra_points()
Definition at line 137 of file triangulator_interface.C.
References libMesh::TriangulatorInterface::_insert_extra_points, and libMesh::TriangulatorInterface::_interpolate_boundary_points.
Referenced by libMesh::TriangulatorInterface::insert_any_extra_boundary_points().
|
inlineinherited |
Definition at line 352 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_bdy_ids.
|
inlineinherited |
Definition at line 264 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_verify_hole_boundaries.
|
inlineinherited |
Whether or not an auto area function has been set.
Definition at line 329 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_auto_area_function.
Referenced by insert_refinement_points(), and should_refine_elem().
|
protectedinherited |
Helper function to upconvert Tri3 to any higher order triangle type if requested via _elem_type
.
Should be called at the end of triangulate()
Definition at line 332 of file triangulator_interface.C.
References libMesh::TriangulatorInterface::_elem_type, libMesh::TriangulatorInterface::_holes, libMesh::TriangulatorInterface::_mesh, libMesh::MeshBase::all_complete_order(), libMesh::MeshBase::all_second_order(), libMesh::FIRST, libMesh::libmesh_assert(), libMesh::make_range(), libMesh::MeshBase::point(), libMesh::TriangulatorInterface::segment_midpoints, libMesh::TriangulatorInterface::segments, libMesh::TRI3, libMesh::TRI6, and libMesh::TRI7.
Referenced by libMesh::TriangleInterface::triangulate(), and triangulate().
|
protectedinherited |
Helper function to add extra points (midpoints of initial segments) to a PSLG triangulation.
Definition at line 278 of file triangulator_interface.C.
References libMesh::TriangulatorInterface::_mesh, libMesh::TriangulatorInterface::_triangulation_type, libMesh::MeshBase::add_point(), libMesh::TriangulatorInterface::get_interpolate_boundary_points(), libMesh::DofObject::id(), libMesh::libmesh_assert(), libMesh::make_range(), libMesh::MeshBase::max_node_id(), libMesh::MeshBase::node_ptr(), libMesh::TriangulatorInterface::PSLG, and libMesh::TriangulatorInterface::segments.
Referenced by libMesh::TriangleInterface::triangulate(), and triangulate().
|
inlineinherited |
Sets and/or gets the flag for inserting add'l points.
Definition at line 210 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_insert_extra_points.
|
protected |
Add Steiner points as new mesh nodes, as necessary to refine an existing trangulation.
Returns true iff new points were added.
Definition at line 782 of file poly2tri_triangulator.C.
References libMesh::TriangulatorInterface::_holes, libMesh::TriangulatorInterface::_mesh, _n_boundary_nodes, libMesh::MeshBase::add_elem(), libMesh::MeshBase::add_point(), libMesh::BoundaryInfo::add_side(), libMesh::BoundaryInfo::boundary_ids(), libMesh::Elem::build_with_id(), libMesh::MeshBase::delete_elem(), libMesh::TriangulatorInterface::desired_area(), libMesh::UnstructuredMesh::find_neighbors(), libMesh::MeshBase::get_boundary_info(), get_desired_area_function(), libMesh::TriangulatorInterface::ArbitraryHole::get_points(), libMesh::TriangulatorInterface::has_auto_area_function(), libMesh::DofObject::id(), libMesh::DofObject::invalid_id, libMesh::BoundaryInfo::invalid_id, libMesh::invalid_uint, is_refine_boundary_allowed(), libMesh::Elem::level(), libMesh::libmesh_assert(), libMesh::libmesh_ignore(), libMesh::libmesh_merge_move(), libMesh::make_range(), libMesh::MeshBase::max_elem_id(), libMesh::MeshBase::max_node_id(), mesh, libMesh::TriangulatorInterface::minimum_angle(), libMesh::Elem::neighbor_ptr(), libMesh::MeshBase::node_ptr(), libMesh::Elem::quasicircumcenter(), libMesh::Real, libMesh::BoundaryInfo::remove(), replaced_holes, libMesh::TriangulatorInterface::segments, libMesh::Elem::set_neighbor(), libMesh::TriangulatorInterface::ArbitraryHole::set_points(), should_refine_elem(), libMesh::TOLERANCE, libMesh::TRI3, libMesh::Elem::type(), libMesh::DofObject::valid_id(), libMesh::Elem::vertex_average(), and libMesh::Elem::which_neighbor_am_i().
Referenced by triangulate().
|
protected |
Is refining this element's boundary side allowed?
Definition at line 463 of file poly2tri_triangulator.C.
References libMesh::BoundaryInfo::boundary_ids(), libMesh::libmesh_assert(), libMesh::Elem::neighbor_ptr(), and libMesh::TriangulatorInterface::Hole::refine_boundary_allowed().
Referenced by insert_refinement_points().
|
inlineinherited |
Sets and/or gets the minimum desired angle.
Set to zero to disable angle constraint.
Definition at line 200 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_minimum_angle.
Referenced by MeshTriangulationTest::commonSettings(), insert_refinement_points(), and main().
|
protectedinherited |
Helper function to create PSLG segments from our node ordering, up to the maximum node id, if no segments already exist.
Definition at line 239 of file triangulator_interface.C.
References libMesh::TriangulatorInterface::_holes, libMesh::TriangulatorInterface::_mesh, libMesh::TriangulatorInterface::_triangulation_type, libMesh::TriangulatorInterface::_verify_hole_boundaries, libMesh::DofObject::id(), libMesh::MeshBase::point(), libMesh::TriangulatorInterface::PSLG, libMesh::TriangulatorInterface::segments, and libMesh::TriangulatorInterface::verify_holes().
Referenced by libMesh::TriangleInterface::triangulate(), and triangulate().
|
inlineinherited |
Whether not to silence internal messages to stdout.
Definition at line 249 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_quiet.
|
inlineoverridevirtual |
Get whether or not the triangulation is allowed to refine the mesh boundary when refining the interior.
True by default.
Reimplemented from libMesh::TriangulatorInterface.
Definition at line 104 of file poly2tri_triangulator.h.
References _refine_bdy_allowed.
|
inherited |
Generate an auto area function based on spacing of boundary points.
The external boundary as well as the hole boundaries are taken into consideration to generate the auto area function based on inverse distance interpolation. For each EDGE element on these boundaries, its centroid (midpoint) is used as the point position and the desired area is calculated as 1.5 times of the area of the equilateral triangle with the edge length as the length of the EDGE element. For a given position, the inverse distance interpolation only considers a number of nearest points (set by num_nearest_pts) to calculate the desired area. The weight of the value at each point is calculated as 1/distance^power.
In addition to these conventional inverse distance interpolation features, a concept of "background value" and "background effective distance" is introduced. The background value belongs to a virtual point located at a constant distance (background effective distance) from the given position. The weight of the value at this virtual point is calculated as 1/background_effective_distance^power. Effectively, the background value is the value when the given position is far away from the boundary points.
Definition at line 478 of file triangulator_interface.C.
References libMesh::TriangulatorInterface::_auto_area_function.
|
overridevirtual |
Set a function giving desired triangle area as a function of position.
Set this to nullptr to disable position-dependent area constraint (falling back on desired_area()).
Reimplemented from libMesh::TriangulatorInterface.
Definition at line 447 of file poly2tri_triangulator.C.
References libMesh::FunctionBase< Output >::clone().
Referenced by MeshTriangulationTest::testPoly2TriRefinementBase().
|
inherited |
Complicated setter, for compatibility with insert_extra_points()
Definition at line 123 of file triangulator_interface.C.
References libMesh::TriangulatorInterface::_insert_extra_points, libMesh::TriangulatorInterface::_interpolate_boundary_points, and libMesh::libmesh_assert().
Referenced by MeshTriangulationTest::testTriangulatorInterp().
|
inlineinherited |
A set of ids to allow on the outer boundary loop: interpreted as boundary ids of 2D elements and/or subdomain ids of 1D edges.
If this is empty, then the outer boundary may be constructed from boundary edges of any id!
Definition at line 351 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_bdy_ids.
Referenced by MeshTriangulationTest::testHalfDomain().
|
inlineoverridevirtual |
Set whether or not the triangulation is allowed to refine the mesh boundary when refining the interior.
This is true by default, but may be set to false to make the mesh boundary more predictable (and so easier to stitch to other meshes) later.
Reimplemented from libMesh::TriangulatorInterface.
Definition at line 97 of file poly2tri_triangulator.h.
References _refine_bdy_allowed.
Referenced by MeshTriangulationTest::testPoly2TriHolesInterpRefined().
|
inlineinherited |
Verifying that hole boundaries don't cross the outer boundary or each other is something like O(N_bdys^2*N_points_per_bdy^2), so we only do it if requested.
Definition at line 262 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_verify_hole_boundaries.
Referenced by MeshTriangulationTest::commonSettings().
|
protected |
Returns true if the given element ought to be refined according to current criteria.
Definition at line 1478 of file poly2tri_triangulator.C.
References libMesh::TriangulatorInterface::desired_area(), libMesh::TriangulatorInterface::get_auto_area_function(), get_desired_area_function(), libMesh::TriangulatorInterface::has_auto_area_function(), libMesh::libmesh_assert(), libMesh::make_range(), libMesh::Elem::n_vertices(), libMesh::Elem::point(), libMesh::Real, and libMesh::Elem::volume().
Referenced by insert_refinement_points().
|
inlineinherited |
Sets/gets flag which tells whether to do two steps of Laplace mesh smoothing after generating the grid.
Definition at line 244 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_smooth_after_generating.
Referenced by MeshTriangulationTest::commonSettings(), and triangulate_domain().
|
protectedinherited |
Helper function to count points in and verify holes.
Definition at line 454 of file triangulator_interface.C.
References libMesh::TriangulatorInterface::_holes.
Referenced by libMesh::TriangleInterface::triangulate().
|
overridevirtual |
Internally, this calls the poly2tri triangulation code in a loop, inserting our owner Steiner points as necessary to promote mesh quality.
Implements libMesh::TriangulatorInterface.
Definition at line 367 of file poly2tri_triangulator.C.
References libMesh::TriangulatorInterface::_elem_type, libMesh::TriangulatorInterface::_markers, libMesh::TriangulatorInterface::_mesh, _n_boundary_nodes, libMesh::TriangulatorInterface::_regions, libMesh::TriangulatorInterface::_smooth_after_generating, libMesh::TriangulatorInterface::_triangulation_type, libMesh::ParallelObject::comm(), libMesh::TriangulatorInterface::elems_to_segments(), libMesh::TriangulatorInterface::increase_triangle_order(), libMesh::TriangulatorInterface::insert_any_extra_boundary_points(), insert_refinement_points(), libMesh::TriangulatorInterface::nodes_to_segments(), libMesh::MeshBase::prepare_for_use(), libMesh::TriangulatorInterface::PSLG, libMesh::MeshBase::set_mesh_dimension(), libMesh::LaplaceMeshSmoother::smooth(), libMesh::TRI3, libMesh::TRI6, libMesh::TRI7, and triangulate_current_points().
Referenced by main(), and MeshTriangulationTest::testPoly2TriRefinementBase().
|
protected |
Triangulate the current mesh and hole points.
Definition at line 490 of file poly2tri_triangulator.C.
References libMesh::TriangulatorInterface::_holes, libMesh::TriangulatorInterface::_mesh, _n_boundary_nodes, libMesh::MeshBase::add_elem(), libMesh::MeshBase::add_point(), libMesh::BoundaryInfo::add_side(), libMesh::Elem::build_with_id(), libMesh::BoundaryInfo::clear(), libMesh::MeshBase::clear_elems(), distance(), libMesh::MeshBase::get_boundary_info(), libMesh::DofObject::id(), libMesh::DofObject::invalid_id, libMesh::Elem::is_flipped(), libMesh::libmesh_assert(), libMesh::make_range(), libMesh::MeshBase::max_node_id(), libMesh::MeshBase::n_nodes(), libMesh::TriangulatorInterface::Hole::n_points(), libMesh::TriangulatorInterface::Hole::point(), libMesh::MeshBase::query_node_ptr(), replaced_holes, libMesh::TriangulatorInterface::segments, libMesh::Elem::set_node(), and libMesh::TRI3.
Referenced by triangulate().
|
inlineinherited |
Sets and/or gets the desired triangulation type.
Definition at line 205 of file triangulator_interface.h.
References libMesh::TriangulatorInterface::_triangulation_type.
Referenced by libMesh::MeshTools::Generation::build_delaunay_square(), MeshTriangulationTest::commonSettings(), main(), and triangulate_domain().
|
protectedinherited |
Helper function to check holes for intersections if requested.
Definition at line 429 of file triangulator_interface.C.
References libMesh::TriangulatorInterface::_holes, libMesh::TriangulatorInterface::Hole::contains(), and libMesh::make_range().
Referenced by libMesh::TriangulatorInterface::elems_to_segments(), and libMesh::TriangulatorInterface::nodes_to_segments().
|
protectedinherited |
The auto area function based on the spacing of boundary points.
Definition at line 476 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::get_auto_area_function(), libMesh::TriangulatorInterface::has_auto_area_function(), and libMesh::TriangulatorInterface::set_auto_area_function().
|
protectedinherited |
A set of ids to allow on the outer boundary loop.
Definition at line 416 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::calculate_auto_desired_area_samples(), libMesh::TriangulatorInterface::elems_to_segments(), libMesh::TriangulatorInterface::get_outer_boundary_ids(), and libMesh::TriangulatorInterface::set_outer_boundary_ids().
|
protectedinherited |
The desired area for the elements in the resulting mesh.
Definition at line 427 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::desired_area(), and libMesh::TriangleInterface::triangulate().
|
private |
Location-dependent area requirements.
Definition at line 149 of file poly2tri_triangulator.h.
Referenced by get_desired_area_function().
|
protectedinherited |
The type of elements to generate.
(Defaults to TRI3).
Definition at line 422 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::elem_type(), libMesh::TriangulatorInterface::increase_triangle_order(), libMesh::TriangleInterface::triangulate(), and triangulate().
|
protectedinherited |
A pointer to a vector of Hole*s.
If this is nullptr, there are no holes!
Definition at line 400 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::attach_hole_list(), libMesh::TriangulatorInterface::calculate_auto_desired_area_samples(), libMesh::TriangulatorInterface::elems_to_segments(), libMesh::TriangulatorInterface::increase_triangle_order(), insert_refinement_points(), libMesh::TriangulatorInterface::nodes_to_segments(), libMesh::TriangulatorInterface::total_hole_points(), libMesh::TriangleInterface::triangulate(), triangulate_current_points(), and libMesh::TriangulatorInterface::verify_holes().
|
protectedinherited |
Flag which tells whether or not to insert additional nodes before triangulation.
This can sometimes be used to "de-regularize" the resulting triangulation.
This flag is supported for backwards compatibility; setting _interpolate_boundary_points = 1 is equivalent.
Definition at line 449 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::get_interpolate_boundary_points(), libMesh::TriangulatorInterface::insert_extra_points(), and libMesh::TriangulatorInterface::set_interpolate_boundary_points().
|
protectedinherited |
Flag which tells how many additional nodes should be inserted between each pair of original mesh points.
Definition at line 455 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::get_interpolate_boundary_points(), and libMesh::TriangulatorInterface::set_interpolate_boundary_points().
|
protectedinherited |
Boundary markers.
Definition at line 405 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::attach_boundary_marker(), libMesh::TriangleInterface::triangulate(), and triangulate().
|
protectedinherited |
Reference to the mesh which is to be created by triangle.
Definition at line 394 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::calculate_auto_desired_area_samples(), libMesh::TriangulatorInterface::elems_to_segments(), libMesh::TriangulatorInterface::increase_triangle_order(), libMesh::TriangulatorInterface::insert_any_extra_boundary_points(), insert_refinement_points(), libMesh::TriangulatorInterface::nodes_to_segments(), libMesh::TriangleInterface::triangulate(), triangulate(), and triangulate_current_points().
|
protectedinherited |
Minimum angle in triangles.
Definition at line 432 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::minimum_angle(), and libMesh::TriangleInterface::triangulate().
|
private |
Keep track of how many mesh nodes are boundary nodes.
Definition at line 144 of file poly2tri_triangulator.h.
Referenced by insert_refinement_points(), triangulate(), and triangulate_current_points().
|
protectedinherited |
Flag which tells if we want to suppress stdout outputs.
Definition at line 466 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::quiet(), and libMesh::TriangleInterface::triangulate().
|
private |
Whether to allow boundary refinement.
Definition at line 154 of file poly2tri_triangulator.h.
Referenced by refine_boundary_allowed(), and set_refine_boundary_allowed().
|
protectedinherited |
A pointer to a vector of Regions*s.
If this is nullptr, there are no regions!
Definition at line 411 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::attach_region_list(), libMesh::TriangleInterface::triangulate(), and triangulate().
|
protectedinherited |
Flag which tells whether we should smooth the mesh after it is generated.
True by default.
Definition at line 461 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::smooth_after_generating(), libMesh::TriangleInterface::triangulate(), and triangulate().
|
protectedinherited |
The type of triangulation to perform: choices are: convex hull PSLG.
Definition at line 439 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::insert_any_extra_boundary_points(), libMesh::TriangulatorInterface::nodes_to_segments(), libMesh::TriangleInterface::triangulate(), triangulate(), and libMesh::TriangulatorInterface::triangulation_type().
|
protectedinherited |
Flag which tells if we want to check hole geometry.
Definition at line 471 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::elems_to_segments(), libMesh::TriangulatorInterface::get_verify_hole_boundaries(), libMesh::TriangulatorInterface::nodes_to_segments(), and libMesh::TriangulatorInterface::set_verify_hole_boundaries().
|
private |
We might have to replace the user-provided holes with refined versions.
Definition at line 139 of file poly2tri_triangulator.h.
Referenced by insert_refinement_points(), and triangulate_current_points().
|
inherited |
When constructing a second-order triangulation from a second-order boundary, we may do the triangulation using first-order elements, in which case we need to save midpoint location data in order to reconstruct curvature along boundaries.
Definition at line 287 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::elems_to_segments(), and libMesh::TriangulatorInterface::increase_triangle_order().
|
inherited |
When constructing a PSLG, if the node numbers do not define the desired boundary segments implicitly through the ordering of the points, you can use the segments vector to specify the segments explicitly, Ex: unit square numbered counter-clockwise starting from origin segments[0] = (0,1) segments[1] = (1,2) segments[2] = (2,3) segments[3] = (3,0) (For the above case you could actually use the implicit ordering!)
Definition at line 279 of file triangulator_interface.h.
Referenced by libMesh::TriangulatorInterface::elems_to_segments(), libMesh::TriangulatorInterface::increase_triangle_order(), libMesh::TriangulatorInterface::insert_any_extra_boundary_points(), insert_refinement_points(), libMesh::TriangulatorInterface::nodes_to_segments(), MeshTriangulationTest::testTriangulatorSegments(), libMesh::TriangleInterface::triangulate(), and triangulate_current_points().