|
|
| ImageSimulationMesh (Parameters &_m_params, double envelope_eps, int _num_threads=0) |
| |
|
void | create_mesh_attributes (const std::vector< VertexAttributes > &_vertex_attribute, const std::vector< TetAttributes > &_tet_attribute) |
| |
|
void | compute_vertex_partition () |
| |
|
void | compute_vertex_partition_morton () |
| |
|
size_t | get_partition_id (const Tuple &loc) const |
| |
|
void | init_envelope (const MatrixXd &V, const MatrixXi &F, const bool use_exact) |
| |
|
CellTag | string_set_to_cell_tag (const std::set< std::string > &str_set) |
| |
|
void | set_length_regions (const nlohmann::json &length_region_json) |
| |
|
double | get_length2 (const Tuple &l) const |
| |
|
void | write_msh (std::string file, const bool write_envelope=true) |
| |
|
void | output_faces (std::string file, std::function< bool(const FaceAttributes &)> cond) |
| |
|
void | split_all_edges () |
| |
| bool | split_edge_before (const Tuple &t) override |
| | User specified preparations and desideratas for an edge split before changing the connectivity.
|
| |
| bool | split_edge_after (const Tuple &loc) override |
| | This function computes the attributes for the added simplices. User specified modifications and desideratas for after an edge split.
|
| |
|
void | smooth_all_vertices (const size_t n_iters) |
| |
| bool | smooth_before (const Tuple &t) override |
| | User specified preparations and desideratas for smoothing a vertex.
|
| |
| bool | smooth_after (const Tuple &t) override |
| | User specified modifications and desideratas for after smoothing a vertex.
|
| |
|
void | collapse_all_edges (bool is_limit_length=true) |
| |
| bool | collapse_edge_before (const Tuple &t) override |
| | User specified preparations and desideratas for an edge collapse before changing the connectivity.
|
| |
| bool | collapse_edge_after (const Tuple &t) override |
| | User specified modifications and desideratas for after an edge collapse.
|
| |
|
void | simplify () |
| |
|
size_t | swap_all_edges_44 () |
| |
| bool | swap_edge_44_before (const Tuple &t) override |
| | User specified preparations and desideratas for an 4-4 edge swap before changing the connectivity.
|
| |
| double | swap_edge_44_energy (const std::vector< std::array< size_t, 4 > > &tets, const int op_case) override |
| | User specified energy to decide which of the 4 possible orientations should be chosen.
|
| |
| bool | swap_edge_44_after (const Tuple &t) override |
| | User specified modifications and desideratas for after a 4-4 edge swap.
|
| |
|
size_t | swap_all_edges_56 () |
| |
| bool | swap_edge_56_before (const Tuple &t) override |
| | User specified preparations and desideratas for a 5-6 edge swap before changing the connectivity.
|
| |
| double | swap_edge_56_energy (const std::vector< std::array< size_t, 4 > > &tets, const int op_case) override |
| | User specified energy to decide which of the 5 possible orientations should be chosen.
|
| |
| bool | swap_edge_56_after (const Tuple &t) override |
| | User specified modifications and desideratas for after a 5-6 edge swap.
|
| |
|
size_t | swap_all_edges_32 () |
| |
| bool | swap_edge_before (const Tuple &t) override |
| | User specified preparations and desideratas for an 3-2 edge swap before changing the conenctivity.
|
| |
| bool | swap_edge_after (const Tuple &t) override |
| | User specified modifications and desideratas for after a 3-2 edge swap.
|
| |
|
size_t | swap_all_faces () |
| |
| bool | swap_face_before (const Tuple &t) override |
| | User specified preparations and desideratas for an 2-3 face swap befroe changing the geometry.
|
| |
| bool | swap_face_after (const Tuple &t) override |
| | User specified modifications and desideratas for after a 2-3 face swap.
|
| |
|
size_t | swap_all_edges_all () |
| |
|
bool | is_inverted_f (const Tuple &loc) const |
| | Inversion check using only floating point numbers.
|
| |
|
bool | is_inverted (const std::array< size_t, 4 > &vs) const |
| |
|
bool | is_inverted (const Tuple &loc) const |
| |
|
double | get_quality (const std::array< size_t, 4 > &vs) const |
| |
|
double | get_quality (const Tuple &loc) const |
| |
|
std::vector< std::array< double, 12 > > | get_amips_assembles (const Tuple &t) const |
| |
|
std::shared_ptr< polysolve::nonlinear::Problem > | get_amips_energy (const Tuple &t) const |
| |
|
std::shared_ptr< polysolve::nonlinear::Problem > | get_envelope_energy (const Tuple &t) const |
| |
| bool | round (const Tuple &loc) |
| | Round a vertex position to floating point.
|
| |
|
bool | all_rounded () const |
| | Check if all vertices of the mesh are rounded.
|
| |
|
bool | is_edge_on_surface (const Tuple &loc) |
| |
|
bool | is_edge_on_bbox (const Tuple &loc) |
| |
| void | mesh_improvement (int max_its=80) |
| |
|
std::tuple< double, double > | local_operations (const std::array< int, 4 > &ops, bool collapse_limit_length=true) |
| |
|
std::tuple< double, double > | get_max_avg_energy () |
| |
|
bool | check_attributes () |
| |
|
std::vector< std::array< size_t, 3 > > | get_faces_by_condition (std::function< bool(const FaceAttributes &)> cond) const |
| |
| bool | invariants (const std::vector< Tuple > &t) override |
| |
| void | init_from_image (const MatrixXr &V, const MatrixXi &T, const MatrixSi &T_tags, const std::vector< std::string > &tag_names) |
| | Init from meshes image.
|
| |
|
void | init_from_image (const MatrixXd &V, const MatrixXi &T, const MatrixSi &T_tags, const std::vector< std::string > &tag_names) |
| |
|
void | init_surfaces_and_boundaries () |
| |
|
std::vector< std::array< size_t, 3 > > | triangulate_polygon_face (std::vector< Vector3r > points) |
| |
| bool | adjust_sizing_field_serial (double max_energy) |
| |
| void | find_order_2_edges () |
| | Find open boundary edges of the embedded surface and initialize a BVH for the open boundary.
|
| |
| bool | is_order_2_edge (const Tuple &e) const |
| | Checks if an edge COULD be an open boundary edge.
|
| |
|
bool | is_order_2_edge (const std::array< size_t, 2 > &e) const |
| |
|
void | write_vtu (const std::string &path) |
| |
|
void | write_surface (const std::string &path) const |
| |
| bool | vertex_is_on_surface (const size_t vid) const override |
| | Is a vertex part of the substructure.
|
| |
| bool | face_is_on_surface (const size_t fid) const override |
| | Is a face part of the substructure.
|
| |
| size_t | get_order_of_vertex (const size_t vid) const override |
| | Get the order of a vertex.
|
| |
|
void | init_vertex_order () |
| | Compute the vertex order for every vertex.
|
| |
|
double | tet_volume (const size_t tid) const |
| |
|
std::vector< ConnectedComponent > | compute_connected_components (const CellTag &tag_in) const |
| | Find all connected components that contain the tag_in tags.
|
| |
| std::vector< ConnectedComponent > | find_holes (const std::vector< CellTag > &tag_in) const |
| | Find all regions that do not contain the tags from tag_in.
|
| |
| void | compute_tag_boundary (const CellTag &tag, MatrixXd &V, MatrixXi &F) const |
| | Compute the boundary of a tag.
|
| |
| void | keep_largest_connected_component (const std::vector< CellTag > &lcc_tags, const size_t n_lcc=1) |
| | Keep only the largest connected component for each of the distinct tag_0 values, and engulf all other components.
|
| |
|
void | fill_holes_topo (const std::vector< CellTag > &fill_holes_tags, double threshold=std::numeric_limits< double >::infinity()) |
| |
|
void | seal_connected_components (const std::vector< CellTag > &tag_sets, const std::vector< ConnectedComponent > &components) |
| |
|
void | tight_seal_topo (const std::vector< std::vector< CellTag > > &tight_seal_tag_sets, double threshold=std::numeric_limits< double >::infinity()) |
| |
|
void | resolve_intersections (const std::vector< CellTag > &intersecting_tags) |
| |
|
void | replace_tags (const std::vector< CellTag > &tags_in, const std::vector< CellTag > &tags_out) |
| |
| void | tag_priority (const std::vector< int64_t > &tags) |
| | Gives tags priority over others.
|
| |
| 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
|
| |
| 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 |
| |
|
simplex::Edge | simplex_from_edge (const Tuple &t) 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
|
| |
| simplex::SimplexCollection | get_surface_faces_for_vertex (const size_t vid) const |
| | Get all faces on the surface that are incident to vid.
|
| |
| simplex::SimplexCollection | get_surface_faces_for_edge (const std::array< size_t, 2 > &vids) const |
| | Get all faces on the surface that are incident to the edge.
|
| |
| size_t | get_num_surface_faces_for_edge (const std::array< size_t, 2 > &vids) const |
| | Get the number of surface faces incident to the edge.
|
| |
| size_t | compute_vertex_order (const size_t vid) const |
| | Compute the vertex order for a single vertex.
|
| |
| size_t | get_order_of_edge (const std::array< size_t, 2 > &vids) const |
| | Compute the order of an edge.
|
| |
| bool | substructure_link_condition (const Tuple &e_tuple) const |
| | Link condition that also considers substructures.
|
| |