libMesh
|
Class MeshTetInterface
provides an abstract interface for tetrahedralization of meshes by subclasses.
More...
#include <mesh_tet_interface.h>
Public Member Functions | |
MeshTetInterface (UnstructuredMesh &mesh) | |
Constructor. More... | |
virtual | ~MeshTetInterface () |
Default destructor in base class. More... | |
Real & | desired_volume () |
Sets and/or gets the desired tetrahedron volume. More... | |
bool & | smooth_after_generating () |
Sets/gets flag which tells whether to do two steps of Laplace mesh smoothing after generating the grid. More... | |
ElemType & | elem_type () |
Sets and/or gets the desired element type. More... | |
void | attach_hole_list (std::unique_ptr< std::vector< std::unique_ptr< UnstructuredMesh >>> holes) |
Attaches a vector of Mesh pointers defining holes which will be meshed around. More... | |
virtual void | triangulate ()=0 |
This is the main public interface for this function. More... | |
Protected Member Functions | |
unsigned | check_hull_integrity () |
This function checks the integrity of the current set of elements in the Mesh to see if they comprise a hull, that is: More... | |
void | process_hull_integrity_result (unsigned result) |
This function prints an informative message and crashes based on the output of the check_hull_integrity() function. More... | |
void | delete_2D_hull_elements () |
Delete original convex hull elements from the Mesh after performing a Delaunay tetrahedralization. More... | |
Static Protected Member Functions | |
static BoundingBox | volume_to_surface_mesh (UnstructuredMesh &mesh) |
Remove volume elements from the given mesh, after converting their outer boundary faces to surface elements. More... | |
Protected Attributes | |
Real | _desired_volume |
The desired volume for the elements in the resulting mesh. More... | |
bool | _smooth_after_generating |
Flag which tells whether we should smooth the mesh after it is generated. More... | |
ElemType | _elem_type |
The exact type of tetrahedra we intend to construct. More... | |
UnstructuredMesh & | _mesh |
Local reference to the mesh we are working with. More... | |
std::unique_ptr< std::vector< std::unique_ptr< UnstructuredMesh > > > | _holes |
A pointer to a vector of meshes each defining a hole. More... | |
Class MeshTetInterface
provides an abstract interface for tetrahedralization of meshes by subclasses.
Definition at line 49 of file mesh_tet_interface.h.
|
explicit |
Constructor.
Takes a reference to the mesh.
Definition at line 114 of file mesh_tet_interface.C.
|
virtualdefault |
Default destructor in base class.
void libMesh::MeshTetInterface::attach_hole_list | ( | std::unique_ptr< std::vector< std::unique_ptr< UnstructuredMesh >>> | holes | ) |
Attaches a vector of Mesh pointers defining holes which will be meshed around.
We use unique_ptr here because we expect that we may need to modify these meshes internally.
Definition at line 125 of file mesh_tet_interface.C.
Referenced by MeshTetTest::testHole(), and MeshTetTest::testSphereShell().
|
protected |
This function checks the integrity of the current set of elements in the Mesh to see if they comprise a hull, that is:
Definition at line 338 of file mesh_tet_interface.C.
References _mesh, libMesh::MeshBase::n_elem(), libMesh::Elem::neighbor_ptr_range(), libMesh::TRI3, and libMesh::Elem::type().
Referenced by libMesh::NetGenMeshInterface::triangulate(), and libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
|
protected |
Delete original convex hull elements from the Mesh after performing a Delaunay tetrahedralization.
Definition at line 390 of file mesh_tet_interface.C.
References _mesh, libMesh::MeshBase::delete_elem(), libMesh::MeshBase::get_boundary_info(), libMesh::BoundaryInfo::regenerate_id_sets(), libMesh::TRI3, and libMesh::Elem::type().
Referenced by libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
|
inline |
Sets and/or gets the desired tetrahedron volume.
Set to zero to disable volume constraint.
Definition at line 68 of file mesh_tet_interface.h.
References _desired_volume.
Referenced by main(), and MeshTetTest::testSphereShell().
|
inline |
Sets and/or gets the desired element type.
This should be a Tet type.
Definition at line 81 of file mesh_tet_interface.h.
References _elem_type.
|
protected |
This function prints an informative message and crashes based on the output of the check_hull_integrity() function.
It is a separate function so that you can check hull integrity without crashing if you desire.
Definition at line 372 of file mesh_tet_interface.C.
References libMesh::err.
Referenced by libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole().
|
inline |
Sets/gets flag which tells whether to do two steps of Laplace mesh smoothing after generating the grid.
False by default (for compatibility with old TetGenMeshInterface behavior).
Definition at line 75 of file mesh_tet_interface.h.
References _smooth_after_generating.
|
pure virtual |
This is the main public interface for this function.
Implemented in libMesh::TetGenMeshInterface, and libMesh::NetGenMeshInterface.
Referenced by MeshTetTest::testTetInterfaceBase().
|
staticprotected |
Remove volume elements from the given mesh, after converting their outer boundary faces to surface elements.
Returns the bounding box of the mesh; this is useful for detecting misplaced holes later.
Definition at line 131 of file mesh_tet_interface.C.
References libMesh::MeshBase::add_elem(), libMesh::MeshTools::Modification::all_tri(), libMesh::Elem::build_side_ptr(), libMesh::MeshBase::delete_elem(), libMesh::Elem::dim(), libMesh::Elem::flip(), libMesh::MeshBase::get_boundary_info(), libMesh::DofObject::id(), libMesh::MeshBase::is_prepared(), libMesh::MeshBase::is_replicated(), libMesh::Elem::level(), libMesh::libmesh_assert(), libMesh::Elem::low_order_key(), libMesh::make_range(), libMesh::MeshBase::max_elem_id(), mesh, libMesh::Elem::n_sides(), libMesh::Elem::neighbor_ptr(), libMesh::Elem::node_ref_range(), libMesh::MeshBase::parallel_max_unique_id(), libMesh::MeshBase::prepare_for_use(), libMesh::Real, libMesh::remote_elem, libMesh::DofObject::set_id(), libMesh::Elem::set_interior_parent(), libMesh::Elem::set_neighbor(), libMesh::DofObject::set_unique_id(), libMesh::Elem::side_index_range(), libMesh::Elem::side_ptr(), libMesh::BoundingBox::union_with(), and libMesh::MeshTools::valid_is_prepared().
Referenced by libMesh::NetGenMeshInterface::triangulate().
|
protected |
The desired volume for the elements in the resulting mesh.
Unlimited (indicated by 0) by default
Definition at line 138 of file mesh_tet_interface.h.
Referenced by desired_volume(), libMesh::NetGenMeshInterface::triangulate(), and libMesh::TetGenMeshInterface::triangulate_pointset().
|
protected |
The exact type of tetrahedra we intend to construct.
Definition at line 149 of file mesh_tet_interface.h.
Referenced by elem_type().
|
protected |
A pointer to a vector of meshes each defining a hole.
If this is nullptr, there are no holes!
Definition at line 160 of file mesh_tet_interface.h.
Referenced by libMesh::NetGenMeshInterface::triangulate().
|
protected |
Local reference to the mesh we are working with.
Definition at line 154 of file mesh_tet_interface.h.
Referenced by libMesh::TetGenMeshInterface::assign_nodes_to_elem(), check_hull_integrity(), delete_2D_hull_elements(), libMesh::TetGenMeshInterface::fill_pointlist(), libMesh::TetGenMeshInterface::pointset_convexhull(), libMesh::NetGenMeshInterface::triangulate(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and libMesh::TetGenMeshInterface::triangulate_pointset().
|
protected |
Flag which tells whether we should smooth the mesh after it is generated.
False by default.
Definition at line 144 of file mesh_tet_interface.h.
Referenced by libMesh::TetGenMeshInterface::pointset_convexhull(), smooth_after_generating(), libMesh::TetGenMeshInterface::triangulate_conformingDelaunayMesh_carvehole(), and libMesh::TetGenMeshInterface::triangulate_pointset().