|
Wildmeshing Toolkit
|
Classes | |
| class | SmartTuple |
| class | TetrahedronConnectivity |
| class | Tuple |
| a Tuple refers to a global vid and a global tet id, and a local edge id and local face id More... | |
| class | VertexConnectivity |
| class | VertexMutex |
Public Types | |
| template<typename T > | |
| using | vector = tbb::concurrent_vector< T > |
Public Member Functions | |
| size_t | vert_capacity () const |
| get the current largest global vid | |
| size_t | tet_capacity () const |
| get the current largest global tid | |
| size_t | vertex_size () const |
| get the number of unremoved verticies | |
| size_t | tet_size () const |
| get the number of unremoved tets | |
| void | init (size_t n_vertices, const std::vector< std::array< size_t, 4 > > &tets) |
| void | init_with_isolated_vertices (size_t n_vertices, const std::vector< std::array< size_t, 4 > > &tets) |
| void | init (const MatrixXi &T) |
| Generate the connectivity of the mesh from an IGL-style T matrix. | |
| bool | split_edge (const Tuple &t, std::vector< Tuple > &new_tets) |
| virtual bool | collapse_edge (const Tuple &t, std::vector< Tuple > &new_tets) |
| bool | link_condition (const Tuple &t) |
| bool | collapse_edge_conn (const Tuple &loc0, std::vector< Tuple > &new_edges, size_t &v1_id, Tuple &new_loc, std::map< size_t, wmtk::TetMesh::VertexConnectivity > &rollback_vert_conn, std::vector< size_t > &n1_t_ids_copy, std::vector< size_t > &new_tet_id, std::vector< TetrahedronConnectivity > &old_tets) |
| bool | collapse_edge_check_topology (const std::vector< size_t > &new_tet_id) |
| Check topology after collapse connectivity change. This is a sanity check and should not be necessary. | |
| void | collapse_edge_rollback (size_t &v1_id, std::map< size_t, wmtk::TetMesh::VertexConnectivity > &rollback_vert_conn, std::vector< size_t > &n1_t_ids, std::vector< size_t > &new_tet_id, std::vector< TetrahedronConnectivity > &old_tets) |
| bool | swap_edge_56 (const Tuple &t, std::vector< Tuple > &new_tets) |
| bool | swap_edge_44 (const Tuple &t, std::vector< Tuple > &new_tets) |
| bool | swap_edge (const Tuple &t, std::vector< Tuple > &new_tets) |
| 3-2 edge swap | |
| bool | swap_face (const Tuple &t, std::vector< Tuple > &new_tets) |
| 2-3 face swap | |
| bool | smooth_vertex (const Tuple &t) |
| bool | split_tet (const Tuple &t, std::vector< Tuple > &new_tets) |
| Split a tet in 4 tets. | |
| bool | split_face (const Tuple &t, std::vector< Tuple > &new_tets) |
| Split a face in 3 faces. | |
| void | triangle_insertion (const std::vector< Tuple > &intersected_tets, const std::vector< Tuple > &intersected_edges, std::vector< size_t > &new_edge_vids, std::vector< size_t > &new_center_vids, std::vector< std::array< size_t, 4 > > ¢er_split_tets) |
| Insert a triangle into a tetmesh, with known intersection information. | |
| bool | insert_point (const Tuple &t, std::vector< Tuple > &new_tets) |
| Insert a point into a tetmesh inside a tet. In general position, this split a tet into 4. In face position, split two tets. In edge position, In point position, do nothing. | |
| virtual bool | insert_point_before (const Tuple &t) |
| virtual bool | insert_point_after (std::vector< Tuple > &new_tets) |
| void | consolidate_mesh () |
| cleans up the deleted vertices or tetrahedra, fixes the corresponding indices, and reset the version number. WARNING: it invalidates all tuples! | |
| std::vector< Tuple > | get_edges () const |
| std::vector< Tuple > | get_faces () const |
| std::vector< Tuple > | get_vertices () const |
| std::vector< Tuple > | get_tets () const |
| virtual void | for_each_face (const std::function< void(const TetMesh::Tuple &)> &) |
| looping through all the unique edges and perform the given function | |
| virtual bool | invariants (const std::vector< Tuple > &) |
| Tuple | tuple_from_edge (size_t tid, int local_eid) const |
| get a Tuple from global tetra index and local edge index (from 0-5). | |
| Tuple | tuple_from_edge (const std::array< size_t, 2 > &vids) const |
| get a Tuple from global vids of the 2 end of an edge | |
| Tuple | tuple_from_face (size_t tid, int local_fid) const |
| get a Tuple from global tetra index and local face index (from 0-3). | |
| std::tuple< Tuple, size_t > | tuple_from_face (const std::array< size_t, 3 > &vids) const |
| get a Tuple and the global face index from global vertex index of the face. | |
| std::tuple< Tuple, size_t > | tuple_from_face (const simplex::Face &f) const |
| Tuple | tuple_from_vertex (size_t vid) const |
| get a Tuple from global vertex index | |
| Tuple | tuple_from_tet (size_t tid) const |
| get a Tuple from global tetra index | |
| Tuple | tuple_from_vids (size_t vid0, size_t vid1, size_t vid2, size_t vid3) const |
| Get a Tuple from global vertex IDs. | |
| simplex::Tet | simplex_from_tet (const Tuple &t) const |
| simplex::Tet | simplex_from_tet (const size_t tid) const |
| Tuple | switch_vertex (const Tuple &t) const |
| wrapper function from Tuple::switch_vertex | |
| Tuple | switch_edge (const Tuple &t) const |
| wrapper function from Tuple::switch_edge | |
| Tuple | switch_face (const Tuple &t) const |
| wrapper function from Tuple::switch_face | |
| std::optional< Tuple > | switch_tetrahedron (const Tuple &t) const |
| wrapper function from Tuple::switch_tetrahedron | |
| std::vector< Tuple > | get_one_ring_tets_for_vertex (const Tuple &t) const |
| Get the one ring tets for a vertex. | |
| std::vector< size_t > | get_one_ring_tids_for_vertex (const Tuple &t) const |
| Get the one ring tids for vertex. | |
| std::vector< size_t > | get_one_ring_tids_for_vertex (const size_t vid) const |
| std::vector< Tuple > | get_one_ring_vertices_for_vertex (const Tuple &t) const |
| Get the one ring vertices for a vertex. | |
| std::vector< size_t > | get_one_ring_vids_for_vertex (size_t vid, std::vector< size_t > &cache) |
| Get the one ring vids for vertex. | |
| std::vector< size_t > | get_one_ring_vids_for_vertex (size_t vid) const |
| Get the one ring vids for vertex. | |
| std::vector< size_t > | get_one_ring_vids_for_vertex_adj (size_t vid) const |
| Duplicate of the function TetMesh::get_one_ring_vids_for_vertex. | |
| std::vector< size_t > | get_one_ring_vids_for_vertex_adj (size_t vid, std::vector< size_t > &cache) |
| Duplicate of the function TetMesh::get_one_ring_vids_for_vertex. | |
| std::vector< Tuple > | get_incident_tets_for_edge (const Tuple &t) const |
| Get the incident tets for edge. | |
| std::vector< Tuple > | get_incident_tets_for_edge (const size_t vid0, const size_t vid1) const |
| std::vector< size_t > | get_incident_tids_for_edge (const Tuple &t) const |
| std::vector< size_t > | get_incident_tids_for_edge (const size_t vid0, const size_t vid1) const |
| std::vector< Tuple > | get_one_ring_tets_for_edge (const Tuple &t) const |
| Get the one ring tets for edge. | |
| std::vector< std::array< size_t, 3 > > | vertex_adjacent_boundary_faces (const Tuple &t) const |
| std::array< Tuple, 4 > | oriented_tet_vertices (const Tuple &t) const |
| std::array< size_t, 4 > | oriented_tet_vids (const Tuple &t) const |
| std::array< size_t, 4 > | oriented_tet_vids (const size_t tid) const |
| std::array< Tuple, 3 > | get_face_vertices (const Tuple &t) const |
| Get the 3 vertices of a face represented by Tuple. | |
| std::array< size_t, 3 > | get_face_vids (const Tuple &t) const |
| std::array< Tuple, 6 > | tet_edges (const Tuple &t) const |
| get the 6 edges of a tet represented by Tuples | |
| void | check_tuple_validity (const Tuple &t) const |
| bool | check_mesh_connectivity_validity () const |
| checks the validity of the connectivity of the mesh. Including the validity of each Tuple | |
| void | remove_tets_by_ids (const std::vector< size_t > &tids) |
| remove the tetrahedrons in the mesh that have given tet ids | |
| void | start_protect_attributes () |
| void | release_protect_attributes () |
| void | rollback_protected_attributes () |
| int | release_vertex_mutex_in_stack () |
| bool | try_set_vertex_mutex_two_ring (const Tuple &v, int threadid) |
| try lock the two-ring neighboring traingles' incident vertices | |
| bool | try_set_vertex_mutex_two_ring_vid (const Tuple &v, int threadid) |
| try lock the two-ring neighboring traingles' incident vertices using vids | |
| bool | try_set_vertex_mutex_two_ring_vid (size_t v, int threadid) |
| a duplicate of ConcurrentTetMesh::try_set_vertex_mutex_two_ring_vid that gets vids using the vid of the input Tuple | |
| bool | try_set_edge_mutex_two_ring (const Tuple &e, int threadid=0) |
| try lock the two-ring neighboring triangles' incident vertices for the two ends of an edge | |
| bool | try_set_face_mutex_two_ring (const Tuple &f, int threadid=0) |
| try lock the two-ring neighboring triangles' incident vertices for the 3 vertices of a face | |
| bool | try_set_face_mutex_two_ring (const Tuple &v1, const Tuple &v2, const Tuple &v3, int threadid=0) |
| locking the two-ring neighboring triangles' incident vertices given the 3 vertex Tuples of the face | |
| bool | try_set_face_mutex_two_ring (size_t v1, size_t v2, size_t v3, int threadid=0) |
| a duplicate of ConcurrentTetMesh::try_set_face_mutex_two_ring usign the vids of the 3 vertices of a face | |
| bool | try_set_vertex_mutex_one_ring (const Tuple &v, int threadid=0) |
| try lock the one-ring neighboring traingles' incident vertices | |
| void | for_each_edge (const std::function< void(const TetMesh::Tuple &)> &) |
| perform the given function for each edge | |
| void | for_each_vertex (const std::function< void(const TetMesh::Tuple &)> &) |
| perform the given function for each vertex | |
| void | for_each_tetra (const std::function< void(const TetMesh::Tuple &)> &) |
| perform the given function for each tet | |
Public Attributes | |
| AbstractAttributeContainer * | p_vertex_attrs = nullptr |
| AbstractAttributeContainer * | p_edge_attrs = nullptr |
| AbstractAttributeContainer * | p_face_attrs = nullptr |
| AbstractAttributeContainer * | p_tet_attrs = nullptr |
| bool | m_collapse_check_link_condition = true |
| bool | m_collapse_check_topology = false |
| bool | m_collapse_check_manifold = true |
| tbb::enumerable_thread_specific< std::vector< size_t > > | mutex_release_stack |
| tbb::enumerable_thread_specific< std::vector< size_t > > | get_one_ring_cache |
| int | NUM_THREADS = 0 |
Protected Member Functions | |
| virtual bool | triangle_insertion_before (const std::vector< Tuple > &faces) |
| virtual bool | triangle_insertion_after (const std::vector< std::vector< Tuple > > &) |
| virtual bool | split_edge_before (const Tuple &t) |
| User specified preparations and desideratas for an edge split before changing the connectivity. | |
| virtual bool | split_edge_after (const Tuple &t) |
| This function computes the attributes for the added simplices. User specified modifications and desideratas for after an edge split. | |
| virtual bool | collapse_edge_before (const Tuple &t) |
| User specified preparations and desideratas for an edge collapse before changing the connectivity. | |
| virtual bool | collapse_edge_after (const Tuple &t) |
| User specified modifications and desideratas for after an edge collapse. | |
| virtual bool | swap_edge_44_before (const Tuple &t) |
| User specified preparations and desideratas for an 4-4 edge swap before changing the connectivity. | |
| virtual double | swap_edge_44_energy (const std::vector< std::array< size_t, 4 > > &tets, const int op_case) |
| User specified energy to decide which of the 4 possible orientations should be chosen. | |
| virtual bool | swap_edge_44_after (const Tuple &t) |
| User specified modifications and desideratas for after a 4-4 edge swap. | |
| virtual bool | swap_edge_56_before (const Tuple &t) |
| User specified preparations and desideratas for a 5-6 edge swap before changing the connectivity. | |
| virtual double | swap_edge_56_energy (const std::vector< std::array< size_t, 4 > > &tets, const int op_case) |
| User specified energy to decide which of the 5 possible orientations should be chosen. | |
| virtual bool | swap_edge_56_after (const Tuple &t) |
| User specified modifications and desideratas for after a 5-6 edge swap. | |
| virtual bool | swap_edge_before (const Tuple &t) |
| User specified preparations and desideratas for an 3-2 edge swap before changing the conenctivity. | |
| virtual bool | swap_edge_after (const Tuple &t) |
| User specified modifications and desideratas for after a 3-2 edge swap. | |
| virtual bool | swap_face_before (const Tuple &t) |
| User specified preparations and desideratas for an 2-3 face swap befroe changing the geometry. | |
| virtual bool | swap_face_after (const Tuple &t) |
| User specified modifications and desideratas for after a 2-3 face swap. | |
| virtual bool | smooth_before (const Tuple &t) |
| User specified preparations and desideratas for smoothing a vertex. | |
| virtual bool | smooth_after (const Tuple &t) |
| User specified modifications and desideratas for after smoothing a vertex. | |
| virtual bool | split_face_before (const Tuple &t) |
| User specified preparations and desideratas for a face split before changing the connectivity. | |
| virtual bool | split_face_after (const Tuple &t) |
| Compute the attributes for the added simplices. | |
| virtual bool | split_tet_before (const Tuple &t) |
| User specified preparations and desideratas for a tet split before changing the connectivity. | |
| virtual bool | split_tet_after (const Tuple &t) |
| Compute the attributes for the added simplices. | |
| void | resize_vertex_mutex (size_t v) |
Private Member Functions | |
| int | get_next_empty_slot_t () |
| int | get_next_empty_slot_v () |
| void | subdivide_tets (const std::vector< size_t > t_ids, const std::vector< bool > &mark_surface, const std::map< std::array< size_t, 2 >, size_t > &map_edge2vid, std::map< std::array< size_t, 3 >, std::vector< std::array< size_t, 5 > > > &new_face_vids, const std::vector< size_t > &new_vids, std::vector< size_t > &new_tids, std::vector< size_t > &new_center_vids, std::vector< std::array< size_t, 4 > > ¢er_split_tets) |
| void | subdivide_a_tet (size_t t_id, const std::array< int, 6 > &new_v_ids, bool mark_surface, std::map< std::array< size_t, 3 >, std::vector< std::array< size_t, 5 > > > &new_face_vids, std::vector< size_t > &new_tids, std::vector< size_t > &new_center_vids, std::vector< std::array< size_t, 4 > > ¢er_split_tets) |
| std::map< size_t, VertexConnectivity > | operation_update_connectivity_impl (std::vector< size_t > &affected_tid, const std::vector< std::array< size_t, 4 > > &new_tet_conn) |
| void | operation_failure_rollback_imp (std::map< size_t, VertexConnectivity > &rollback_vert_conn, const std::vector< size_t > &affected, const std::vector< size_t > &new_tet_id, const std::vector< TetrahedronConnectivity > &old_tets) |
| std::map< size_t, VertexConnectivity > | operation_update_connectivity_impl (const std::vector< size_t > &remove_id, const std::vector< std::array< size_t, 4 > > &new_tet_conn, std::vector< size_t > &allocate_id) |
| bool | try_set_vertex_mutex (const Tuple &v, int threadid) |
| bool | try_set_vertex_mutex (size_t vid, int threadid) |
| void | unlock_vertex_mutex (const Tuple &v) |
| void | unlock_vertex_mutex (size_t vid) |
Static Private Member Functions | |
| static std::vector< TetrahedronConnectivity > | record_old_tet_connectivity (const TetMesh::vector< TetrahedronConnectivity > &conn, const std::vector< size_t > &tets) |
Private Attributes | |
| vector< VertexConnectivity > | m_vertex_connectivity |
| vector< TetrahedronConnectivity > | m_tet_connectivity |
| std::atomic_long | current_vert_size |
| std::atomic_long | current_tet_size |
| tbb::spin_mutex | vertex_connectivity_lock |
| tbb::spin_mutex | tet_connectivity_lock |
| bool | vertex_connectivity_synchronizing_flag = false |
| bool | tet_connectivity_synchronizing_flag = false |
| int | MAX_THREADS = 128 |
| int | m_t_empty_slot = 0 |
| int | m_v_empty_slot = 0 |
| tbb::concurrent_vector< VertexMutex > | m_vertex_mutex |
Static Private Attributes | |
| static constexpr std::array< std::array< int, 2 >, 6 > | m_local_edges |
| local edges within a tet | |
| static constexpr std::array< int, 4 > | m_map_vertex2edge = {{0, 0, 1, 3}} |
| static constexpr std::array< int, 4 > | m_map_vertex2oppo_face = {{3, 1, 2, 0}} |
| static constexpr std::array< int, 6 > | m_map_edge2face = {{0, 0, 0, 1, 2, 1}} |
| static constexpr std::array< std::array< int, 3 >, 4 > | m_local_faces |
| static constexpr std::array< std::array< int, 3 >, 4 > | m_local_edges_in_a_face |
| bool wmtk::TetMesh::check_mesh_connectivity_validity | ( | ) | const |
checks the validity of the connectivity of the mesh. Including the validity of each Tuple
|
inline |
wrapper function for Tuple::check_validity
Collapse an edge
| t | Input Tuple for the edge to collapse. | |
| [out] | new_tets | a vector of Tuples for all the newly introduced tetra. |
|
inlineprotectedvirtual |
User specified modifications and desideratas for after an edge collapse.
| t | edge Tuple that's collapsed |
Reimplemented in app::interior_tet_opt::InteriorTetOpt.
|
inlineprotectedvirtual |
User specified preparations and desideratas for an edge collapse before changing the connectivity.
| t | edge Tuple to be collapsed |
Reimplemented in app::interior_tet_opt::InteriorTetOpt.
| bool wmtk::TetMesh::collapse_edge_check_topology | ( | const std::vector< size_t > & | new_tet_id | ) |
Check topology after collapse connectivity change. This is a sanity check and should not be necessary.
| new_tet_id | new tet ids added to v2 |
| bool wmtk::TetMesh::collapse_edge_conn | ( | const Tuple & | loc0, |
| std::vector< Tuple > & | new_edges, | ||
| size_t & | v1_id, | ||
| Tuple & | new_loc, | ||
| std::map< size_t, wmtk::TetMesh::VertexConnectivity > & | rollback_vert_conn, | ||
| std::vector< size_t > & | n1_t_ids_copy, | ||
| std::vector< size_t > & | new_tet_id, | ||
| std::vector< TetrahedronConnectivity > & | old_tets | ||
| ) |
Collapse edge connectivity change part. Constains a link condition check and the connecticity update
| loc0 | Input Tuple for the edge to collapse | |
| [out] | new_tets | a vector of Tuples for all the newly introduced tetra. |
| [out] | v1_id | vertex id of the input tuple |
| [out] | new_loc | result vertex tuple |
| [out] | rollback_vert_conn | vertex connectivity got changed and will be involed in rollback |
| [out] | n1_t_ids_copy | origninal (before collape) one ring tet ids connected to the input vertex |
| [out] | new_tet_id | new tet ids added to v2 |
| [out] | old_tets | tets tv connectivities in n1_t_ids_copy |
backup of everything
| void wmtk::TetMesh::collapse_edge_rollback | ( | size_t & | v1_id, |
| std::map< size_t, wmtk::TetMesh::VertexConnectivity > & | rollback_vert_conn, | ||
| std::vector< size_t > & | n1_t_ids, | ||
| std::vector< size_t > & | new_tet_id, | ||
| std::vector< TetrahedronConnectivity > & | old_tets | ||
| ) |
rollback function for collapse edges
| [out] | v1_id | vertex id of the input tuple |
| [out] | rollback_vert_conn | vertex connectivity got changed and will be involed in rollback |
| [out] | n1_t_ids | origninal (before collape) one ring tet ids connected to the input vertex |
| [out] | new_tet_id | new tet ids added to v2 |
| [out] | old_tets | tets tv connectivities in n1_t_ids |
|
virtual |
looping through all the unique edges and perform the given function
looping through all the unique faces and perform the given function
| std::vector< TetMesh::Tuple > wmtk::TetMesh::get_edges | ( | ) | const |
Get all unique undirected edges in the mesh.
| std::array< TetMesh::Tuple, 3 > wmtk::TetMesh::get_face_vertices | ( | const Tuple & | t | ) | const |
| std::vector< TetMesh::Tuple > wmtk::TetMesh::get_faces | ( | ) | const |
Get all unique faces in the mesh.
| std::vector< TetMesh::Tuple > wmtk::TetMesh::get_incident_tets_for_edge | ( | const Tuple & | t | ) | const |
Get the incident tets for edge.
| t | tuple pointing to an edge |
| std::vector< TetMesh::Tuple > wmtk::TetMesh::get_one_ring_tets_for_edge | ( | const Tuple & | t | ) | const |
Get the one ring tets for edge.
| t | tuple pointing to an edge |
| std::vector< TetMesh::Tuple > wmtk::TetMesh::get_one_ring_tets_for_vertex | ( | const Tuple & | t | ) | const |
Get the one ring tets for a vertex.
| t | tuple pointing to a vertex |
| std::vector< size_t > wmtk::TetMesh::get_one_ring_tids_for_vertex | ( | const Tuple & | t | ) | const |
Get the one ring tids for vertex.
| t | a Tuple that refers to a vertex |
| std::vector< TetMesh::Tuple > wmtk::TetMesh::get_one_ring_vertices_for_vertex | ( | const Tuple & | t | ) | const |
Get the one ring vertices for a vertex.
| t | tuple pointing to a vertex |
| std::vector< size_t > wmtk::TetMesh::get_one_ring_vids_for_vertex | ( | size_t | vid | ) | const |
Get the one ring vids for vertex.
| vid | size_t type vertex id |
| std::vector< size_t > wmtk::TetMesh::get_one_ring_vids_for_vertex | ( | size_t | vid, |
| std::vector< size_t > & | cache | ||
| ) |
Get the one ring vids for vertex.
| vid | size_t type vertex id |
| [output] | cache stores a verctor of vids with duplicate |
| std::vector< TetMesh::Tuple > wmtk::TetMesh::get_tets | ( | ) | const |
Get all unique tet in the mesh.
| std::vector< TetMesh::Tuple > wmtk::TetMesh::get_vertices | ( | ) | const |
Get all unique vertices in the mesh.
| void wmtk::TetMesh::init | ( | const MatrixXi & | T | ) |
Generate the connectivity of the mesh from an IGL-style T matrix.
| T | by 4 list of vertex indices. |
| void wmtk::TetMesh::init | ( | size_t | n_vertices, |
| const std::vector< std::array< size_t, 4 > > & | tets | ||
| ) |
Initialize TetMesh data structure
| n_vertices | number of vertices |
| tets | vector of array. Each element represents one tet, which is defined by four vertices. |
tets should not exceed n_vertices Insert a point into a tetmesh inside a tet. In general position, this split a tet into 4. In face position, split two tets. In edge position, In point position, do nothing.
| bool wmtk::TetMesh::link_condition | ( | const Tuple & | t | ) |
Compute the link of a given simplex Return a tuple of sets for 1. vertices, 2. edges, and 3. faces.
|
private |
| tet_conn | |
| vert_conn | |
| remove_id | this will be modified as new_tet_id, useful for rollback etc. |
| new_tet_conn |
| std::array< TetMesh::Tuple, 4 > wmtk::TetMesh::oriented_tet_vertices | ( | const Tuple & | t | ) | const |
Positively oriented 4 vertices (represented by Tuples) in a tetra.
| std::array< size_t, 4 > wmtk::TetMesh::oriented_tet_vids | ( | const Tuple & | t | ) | const |
Positively oriented 4 vertices ids in a tetra.
|
inline |
remove the tetrahedrons in the mesh that have given tet ids
| tids |
|
inlineprotectedvirtual |
User specified modifications and desideratas for after smoothing a vertex.
| t | Tuple refering to a vertex |
Reimplemented in harmonic_tet::HarmonicTet, and app::interior_tet_opt::InteriorTetOpt.
|
inlineprotectedvirtual |
User specified preparations and desideratas for smoothing a vertex.
Reimplemented in app::interior_tet_opt::InteriorTetOpt.
| bool wmtk::TetMesh::smooth_vertex | ( | const Tuple & | t | ) |
Smooth a vertex
| t | Input Tuple for the vertex |
Split an edge
| t | Input Tuple for the edge to split. | |
| [out] | new_tets | a vector of Tuples for all the newly introduced tetra. |
update connectivity
|
inlineprotectedvirtual |
This function computes the attributes for the added simplices. User specified modifications and desideratas for after an edge split.
| the | edge Tuple to be split |
Reimplemented in app::interior_tet_opt::InteriorTetOpt.
|
inlineprotectedvirtual |
User specified preparations and desideratas for an edge split before changing the connectivity.
| the | edge Tuple to be split |
Reimplemented in app::interior_tet_opt::InteriorTetOpt.
Split a face in 3 faces.
The TetMesh is assumed to be face manifold, i.e., a face has at most two incident tets.
| t | Input tuple for the face to split. | |
| [out] | new_t | A vector of Tuples refering to the tets incident to the new vertex. introduced |
v2 /|\ / | \ / | \ /t1 ^ t0\
/ / \ \ // t2 \ v0 --------— v1
|
inlineprotectedvirtual |
Compute the attributes for the added simplices.
User specified modifications and desideratas for after a face split
| t | The face tuple to be split. |
|
inlineprotectedvirtual |
User specified preparations and desideratas for a face split before changing the connectivity.
| t | The face tuple to be split. |
Split a tet in 4 tets.
| t | Input tuple for the tet to split. | |
| [out] | new_t | A vector of Tuples refering to the tets incident to the new vertex. introduced |
v2
/|\
/ | \
/ | \
/t1 X t0\
/ /(t3)\ \
// t2 \ v0 --------— v1
New tet vertex connectivity: t0: (X,1,2,3) <- modified old tet t1: (0,X,2,3) t2: (0,1,X,3) t3: (0,1,2,X)
|
inlineprotectedvirtual |
Compute the attributes for the added simplices.
User specified modifications and desideratas for after a tet split
| t | The tet tuple to be split. |
|
inlineprotectedvirtual |
User specified preparations and desideratas for a tet split before changing the connectivity.
| t | The tet tuple to be split. |
|
private |
track surface
|
private |
insert new vertices
record infos
insert new tets
update conn_tets
3-2 edge swap
| t | Input Tuple for the edge to swap. |
| new_tets | a vector of Tuples for all the newly introduced tetra. |
Perform 4-4 swap between 2 tets
| t | Input Tuple for the edge to swap. | |
| [out] | new_tets | a vector of Tuples for all the newly introduced tetra. |
|
inlineprotectedvirtual |
User specified modifications and desideratas for after a 4-4 edge swap.
| t | edge Tuple that's swaped |
Reimplemented in app::interior_tet_opt::InteriorTetOpt.
|
inlineprotectedvirtual |
User specified preparations and desideratas for an 4-4 edge swap before changing the connectivity.
| t | edge Tuple to be swaped |
Reimplemented in app::interior_tet_opt::InteriorTetOpt.
|
inlineprotectedvirtual |
User specified energy to decide which of the 4 possible orientations should be chosen.
Accepts the last shown orientation if not overridden.
| tets | New tets after performing a 4-4 swap. |
| op_case | The operation case, where 0 are the tets before swap. |
Perform 5-6 swap
| t | Input Tuple for the edge to swap. | |
| [out] | new_tets | a vector of Tuples for all the newly introduced tetra. |
|
inlineprotectedvirtual |
User specified modifications and desideratas for after a 5-6 edge swap.
| t | edge Tuple that's swaped |
|
inlineprotectedvirtual |
User specified preparations and desideratas for a 5-6 edge swap before changing the connectivity.
| t | edge Tuple to be swaped |
|
inlineprotectedvirtual |
User specified energy to decide which of the 5 possible orientations should be chosen.
Accepts the last shown orientation if not overridden.
| tets | New tets after performing a 5-6 swap. |
| op_case | The operation case, where 0 are the tets before swap. |
|
inlineprotectedvirtual |
User specified modifications and desideratas for after a 3-2 edge swap.
| t | edge Tuple that's swaped |
Reimplemented in harmonic_tet::HarmonicTet, and app::interior_tet_opt::InteriorTetOpt.
|
inlineprotectedvirtual |
User specified preparations and desideratas for an 3-2 edge swap before changing the conenctivity.
| t | edge Tuple to be swaped |
Reimplemented in harmonic_tet::HarmonicTet, and app::interior_tet_opt::InteriorTetOpt.
2-3 face swap
| t | Input Tuple for the edge to swap. |
| new_tets | a vector of Tuples for all the newly introduced tetra. |
|
inlineprotectedvirtual |
User specified modifications and desideratas for after a 2-3 face swap.
| t | edge Tuple that's swaped |
Reimplemented in harmonic_tet::HarmonicTet, and app::interior_tet_opt::InteriorTetOpt.
|
inlineprotectedvirtual |
User specified preparations and desideratas for an 2-3 face swap befroe changing the geometry.
| t | edge Tuple to be swaped |
Reimplemented in harmonic_tet::HarmonicTet, and app::interior_tet_opt::InteriorTetOpt.
|
inline |
get the current largest global tid
| std::array< TetMesh::Tuple, 6 > wmtk::TetMesh::tet_edges | ( | const Tuple & | t | ) | const |
get the 6 edges of a tet represented by Tuples
| t |
| void wmtk::TetMesh::triangle_insertion | ( | const std::vector< Tuple > & | intersected_tets, |
| const std::vector< Tuple > & | intersected_edges, | ||
| std::vector< size_t > & | new_edge_vids, | ||
| std::vector< size_t > & | new_center_vids, | ||
| std::vector< std::array< size_t, 4 > > & | center_split_tets | ||
| ) |
Insert a triangle into a tetmesh, with known intersection information.
| intersected_tets | the tet to split |
| intersected_edges | the edges where new points are assigned to |
| new_edge_vids | new vertices correspond to each cut-edge |
get all tets
track surface before
subdivide
track surface after
| bool wmtk::TetMesh::try_set_edge_mutex_two_ring | ( | const Tuple & | e, |
| int | threadid = 0 |
||
| ) |
try lock the two-ring neighboring triangles' incident vertices for the two ends of an edge
| e | Tuple refers to the edge |
| threadid |
| bool wmtk::TetMesh::try_set_face_mutex_two_ring | ( | const Tuple & | f, |
| int | threadid = 0 |
||
| ) |
try lock the two-ring neighboring triangles' incident vertices for the 3 vertices of a face
| f | Tuple refers to the face |
| threadid |
| bool wmtk::TetMesh::try_set_face_mutex_two_ring | ( | size_t | v1, |
| size_t | v2, | ||
| size_t | v3, | ||
| int | threadid = 0 |
||
| ) |
a duplicate of ConcurrentTetMesh::try_set_face_mutex_two_ring usign the vids of the 3 vertices of a face
| v1 | the vid of one vertex of the face |
| v2 | the vid of one vertex of the face |
| v3 | the vid of one vertex of the face |
| threadid |
| bool wmtk::TetMesh::try_set_vertex_mutex_one_ring | ( | const Tuple & | v, |
| int | threadid = 0 |
||
| ) |
try lock the one-ring neighboring traingles' incident vertices
| v | Tuple refers to the vertex |
| threadid |
| bool wmtk::TetMesh::try_set_vertex_mutex_two_ring | ( | const Tuple & | v, |
| int | threadid | ||
| ) |
try lock the two-ring neighboring traingles' incident vertices
| v | Tuple refers to the vertex |
| threadid |
| bool wmtk::TetMesh::try_set_vertex_mutex_two_ring_vid | ( | const Tuple & | v, |
| int | threadid | ||
| ) |
try lock the two-ring neighboring traingles' incident vertices using vids
| v | Tuple refers to the vertex |
| threadid |
| bool wmtk::TetMesh::try_set_vertex_mutex_two_ring_vid | ( | size_t | v, |
| int | threadid | ||
| ) |
| TetMesh::Tuple wmtk::TetMesh::tuple_from_edge | ( | const std::array< size_t, 2 > & | vids | ) | const |
get a Tuple from global vids of the 2 end of an edge
| vids | an array of the 2 vertex id of the edge |
| TetMesh::Tuple wmtk::TetMesh::tuple_from_edge | ( | size_t | tid, |
| int | local_eid | ||
| ) | const |
get a Tuple from global tetra index and local edge index (from 0-5).
| tid | Global tetra index |
| local_eid | local edge index |
| std::tuple< TetMesh::Tuple, size_t > wmtk::TetMesh::tuple_from_face | ( | const std::array< size_t, 3 > & | vids | ) | const |
get a Tuple and the global face index from global vertex index of the face.
| vids | Global vertex index of the face |
| TetMesh::Tuple wmtk::TetMesh::tuple_from_face | ( | size_t | tid, |
| int | local_fid | ||
| ) | const |
get a Tuple from global tetra index and local face index (from 0-3).
| tid | Global tetra index |
| local_fid | local face index |
| TetMesh::Tuple wmtk::TetMesh::tuple_from_tet | ( | size_t | tid | ) | const |
get a Tuple from global tetra index
| tid | Global tetra index |
| TetMesh::Tuple wmtk::TetMesh::tuple_from_vertex | ( | size_t | vid | ) | const |
get a Tuple from global vertex index
| vid | Global vertex index |
|
inline |
get the current largest global vid
| std::vector< std::array< size_t, 3 > > wmtk::TetMesh::vertex_adjacent_boundary_faces | ( | const Tuple & | t | ) | const |
| m |
|
staticconstexprprivate |
local edges within a tet
|
staticconstexprprivate |
|
staticconstexprprivate |