Wildmeshing Toolkit
|
#include <TetMeshOperationExecutor.hpp>
Public Member Functions | |
TetMeshOperationExecutor (TetMesh &m, const Tuple &operating_tuple) | |
void | delete_simplices () |
void | update_cell_hash () |
void | update_ear_connectivity (const int64_t ear_tid, const int64_t new_tid, const int64_t old_tid, const int64_t common_fid) |
void | split_edge () |
split edge v1-v2 | |
void | collapse_edge () |
split edge v1-v2 | |
std::vector< int64_t > | request_simplex_indices (const PrimitiveType type, int64_t count) |
std::tuple< std::vector< Tuple >, std::vector< Tuple > > | get_incident_tets_and_faces (Tuple t) |
Get the incident tets and faces for an edge tuple. | |
![]() | |
EdgeOperationData ()=default | |
EdgeOperationData (EdgeOperationData &&)=default | |
EdgeOperationData & | operator= (EdgeOperationData &&)=default |
const std::array< int64_t, 2 > & | incident_vids () const |
int64_t | operating_edge_id () const |
std::vector< std::array< Tuple, 2 > > | ear_edges (const TetMesh &m) const |
std::vector< std::array< Tuple, 2 > > | ear_faces (const TetMesh &m) const |
std::array< Tuple, 2 > | input_endpoints (const TetMesh &m) const |
std::vector< Tuple > | collapse_merged_ear_edges (const TetMesh &m) const |
std::vector< Tuple > | collapse_merged_ear_faces (const TetMesh &m) const |
std::vector< Tuple > | split_new_rib_edges (const TetMesh &) const |
std::vector< Tuple > | split_new_rib_faces (const TetMesh &) const |
std::vector< Tuple > | input_tets (const TetMesh &) const |
std::vector< Tuple > | input_faces (const TetMesh &) const |
std::array< Tuple, 2 > | split_output_edges (const TetMesh &) const |
std::vector< std::array< Tuple, 2 > > | split_output_faces (const TetMesh &) const |
std::vector< std::array< Tuple, 2 > > | split_output_tets (const TetMesh &) const |
std::vector< IncidentTetData > | incident_tet_datas () const |
std::vector< IncidentFaceData > | incident_face_datas () const |
std::vector< simplex::Simplex > | new_vertices (const Mesh &) const |
std::array< int64_t, 2 > | new_spine_eids () const |
![]() | |
EdgeOperationData () | |
~EdgeOperationData () | |
EdgeOperationData (EdgeOperationData &&) | |
EdgeOperationData & | operator= (EdgeOperationData &&) |
void | set_split () |
void | set_collapse () |
const internal::SplitAlternateFacetData & | const_split_facet_data () const |
Returns facet data held if the edge operation was a split - throws if data does not exist. | |
const internal::CollapseAlternateFacetData & | const_collapse_facet_data () const |
Returns facet data held if the edge operation was a collapse- throws if data does not exist. | |
Static Public Member Functions | |
static const std::array< std::vector< int64_t >, 4 > | get_split_simplices_to_delete (const Tuple &tuple, const TetMesh &m) |
gather all simplices that are deleted in a split | |
static const std::array< std::vector< int64_t >, 4 > | get_collapse_simplices_to_delete (const Tuple &tuple, const TetMesh &m) |
gather all simplices that are deleted in a collapse | |
Additional Inherited Members | |
![]() | |
internal::SplitAlternateFacetData & | split_facet_data () |
Returns facet data held if the edge operation was a split - throws if data does not exist. | |
internal::CollapseAlternateFacetData & | collapse_facet_data () |
Returns facet data held if the edge operation was a collapse- throws if data does not exist. | |
![]() | |
static Tuple | tuple_from_id (const Mesh &m, const PrimitiveType type, const int64_t gid) |
static simplex::Simplex | simplex_from_id (const Mesh &m, const PrimitiveType type, const int64_t gid) |
static std::vector< int64_t > | request_simplex_indices (Mesh &mesh, const PrimitiveType type, int64_t count) |
![]() | |
std::array< int64_t, 2 > | m_spine_vids |
int64_t | m_operating_edge_id |
int64_t | m_operating_face_id |
int64_t | m_operating_tet_id |
int64_t | m_split_new_vid = -1 |
std::array< int64_t, 2 > | m_split_new_spine_eids |
std::vector< IncidentTetData > | m_incident_tet_datas |
std::vector< IncidentFaceData > | m_incident_face_datas |
Definition at line 7 of file TetMeshOperationExecutor.hpp.
wmtk::TetMesh::TetMeshOperationExecutor::TetMeshOperationExecutor | ( | TetMesh & | m, |
const Tuple & | operating_tuple | ||
) |
Definition at line 94 of file TetMeshOperationExecutor.cpp.
References wmtk::Edge, wmtk::Mesh::get_flag_accessor(), wmtk::Tetrahedron, wmtk::Triangle, and wmtk::Vertex.
void wmtk::TetMesh::TetMeshOperationExecutor::collapse_edge | ( | ) |
split edge v1-v2
// 5 --------- 4 ---------- 6 \ \ / \\ / \ \/ \ \ / \ / \\ \ / \ / \ \\ 3 1 --------- 2/ tuple edge 1-2
input: tuple(v1, v1-v2, v1-v2-v4, v1-v2-v4-v3)
If tet 2-3-4-6 exists, return Tuple(v2, v2-v4, v2-v4-v3 v2-v4-v3-v6), otherwise return Tuple(v2, v2-v4, v2-v4-v3, v2-v4-v3-v5). Must exist a valid return (check by link condition user level? should return a invalid tuple if no ears?).
Definition at line 773 of file TetMeshOperationExecutor.cpp.
References wmtk::simplex::IdSimplexCollection::add(), wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e01, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e02, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e03, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e12, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e13, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e23, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::ears, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::local_operating_tuple, wmtk::simplex::IdSimplexCollection::reserve(), wmtk::Tetrahedron, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::tid, wmtk::simplex::top_dimension_cofaces_iterable(), wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::v0, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::v1, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::v2, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::v3, and wmtk::simplex::Simplex::vertex().
Referenced by wmtk::operations::utils::MultiMeshEdgeCollapseFunctor::operator()().
void wmtk::TetMesh::TetMeshOperationExecutor::delete_simplices | ( | ) |
Definition at line 184 of file TetMeshOperationExecutor.cpp.
References flag_accessors, and wmtk::operations::tet_mesh::EdgeOperationData::simplex_ids_to_delete.
|
static |
gather all simplices that are deleted in a collapse
For interior case: The deleted simplices are the one ring tets of the edge AND the one ring faces of the edge AND the edges and faces where one of the endpoint is the tuple vertex and are contained in the deleted faces and the tuple vertex. This is the intersection of the open star of the tuple vertex and the close star of the edge.
For boundary case: Same as above.
Definition at line 210 of file TetMeshOperationExecutor.cpp.
References wmtk::get_primitive_type_id(), wmtk::simplex::half_closed_star_iterable(), and wmtk::TetMesh::id().
std::tuple< std::vector< Tuple >, std::vector< Tuple > > wmtk::TetMesh::TetMeshOperationExecutor::get_incident_tets_and_faces | ( | Tuple | t | ) |
Get the incident tets and faces for an edge tuple.
edge | tuple t (should be m_operating tuple in the operation class) |
Definition at line 21 of file TetMeshOperationExecutor.cpp.
References wmtk::TetMesh::id_tet(), wmtk::TetMesh::is_boundary_face(), m_mesh, wmtk::TetMesh::switch_face(), and wmtk::TetMesh::switch_tetrahedron().
|
static |
gather all simplices that are deleted in a split
The deleted simplices are the one ring tets AND the one ring faces of the edge AND the edge itself. That is, the open star of the edge.
Definition at line 196 of file TetMeshOperationExecutor.cpp.
References wmtk::simplex::Simplex::edge(), wmtk::get_primitive_type_id(), wmtk::TetMesh::id(), and wmtk::simplex::open_star().
std::vector< int64_t > wmtk::TetMesh::TetMeshOperationExecutor::request_simplex_indices | ( | const PrimitiveType | type, |
int64_t | count | ||
) |
Definition at line 1081 of file TetMeshOperationExecutor.cpp.
void wmtk::TetMesh::TetMeshOperationExecutor::split_edge | ( | ) |
split edge v1-v2
v4 /\\ ear1 /| \ \ ear2 / | \ \ / | \ \ / | \ \ / | \ \ / | \ _\ v3 /______|_______\_ -
v1 v_new v2
input: tuple(v1, v1-v2, v1-v2-v4, v1-v2-v4-v3) (vertex, edge, face, tet)
This function will return the tuple that has: the same vertex as the input, a new edge along the input edge, a new face on the input face, and a new tet with is half of the input tet. In the illustration it will return Tuple(v_new, v_new-v2, v_new-v2-v4, v_new-v2-v4-v3)
Definition at line 242 of file TetMeshOperationExecutor.cpp.
References wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e01, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e02, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e03, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e12, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e13, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::e23, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::ears, wmtk::Edge, wmtk::simplex::Simplex::edge(), wmtk::operations::tet_mesh::EdgeOperationData::FaceSplitData::eid_rib, wmtk::operations::tet_mesh::EdgeOperationData::FaceSplitData::eid_spine_new, wmtk::operations::tet_mesh::EdgeOperationData::FaceSplitData::eid_spine_old, wmtk::simplex::Simplex::face(), wmtk::operations::tet_mesh::EdgeOperationData::FaceSplitData::fid_new, wmtk::operations::tet_mesh::EdgeOperationData::FaceSplitData::fid_old, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::incident_face_data_idx, wmtk::operations::tet_mesh::EdgeOperationData::FaceSplitData::local_operating_tuple, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::local_operating_tuple, wmtk::logger(), wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::new_face_data, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::new_face_id, wmtk::Mesh::request_simplex_indices(), wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::rib_f, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::split_t, wmtk::Tetrahedron, wmtk::simplex::Simplex::tetrahedron(), wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::tid, wmtk::Triangle, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::v0, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::v1, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::v2, wmtk::operations::tet_mesh::EdgeOperationData::IncidentTetData::v3, wmtk::Vertex, and wmtk::simplex::Simplex::vertex().
Referenced by wmtk::operations::utils::MultiMeshEdgeSplitFunctor::operator()().
void wmtk::TetMesh::TetMeshOperationExecutor::update_cell_hash | ( | ) |
Definition at line 193 of file TetMeshOperationExecutor.cpp.
void wmtk::TetMesh::TetMeshOperationExecutor::update_ear_connectivity | ( | const int64_t | ear_tid, |
const int64_t | new_tid, | ||
const int64_t | old_tid, | ||
const int64_t | common_fid | ||
) |
Definition at line 221 of file TetMeshOperationExecutor.cpp.
attribute::Accessor<int64_t,TetMesh>& wmtk::TetMesh::TetMeshOperationExecutor::et_accessor |
Definition at line 20 of file TetMeshOperationExecutor.hpp.
std::array<attribute::FlagAccessor<TetMesh>, 4> wmtk::TetMesh::TetMeshOperationExecutor::flag_accessors |
Definition at line 14 of file TetMeshOperationExecutor.hpp.
Referenced by delete_simplices().
attribute::Accessor<int64_t,TetMesh>& wmtk::TetMesh::TetMeshOperationExecutor::ft_accessor |
Definition at line 21 of file TetMeshOperationExecutor.hpp.
TetMesh& wmtk::TetMesh::TetMeshOperationExecutor::m_mesh |
Definition at line 108 of file TetMeshOperationExecutor.hpp.
Referenced by get_incident_tets_and_faces().
attribute::Accessor<int64_t,TetMesh>& wmtk::TetMesh::TetMeshOperationExecutor::te_accessor |
Definition at line 17 of file TetMeshOperationExecutor.hpp.
attribute::Accessor<int64_t,TetMesh>& wmtk::TetMesh::TetMeshOperationExecutor::tf_accessor |
Definition at line 16 of file TetMeshOperationExecutor.hpp.
attribute::Accessor<int64_t,TetMesh>& wmtk::TetMesh::TetMeshOperationExecutor::tt_accessor |
Definition at line 15 of file TetMeshOperationExecutor.hpp.
attribute::Accessor<int64_t,TetMesh>& wmtk::TetMesh::TetMeshOperationExecutor::tv_accessor |
Definition at line 18 of file TetMeshOperationExecutor.hpp.
attribute::Accessor<int64_t,TetMesh>& wmtk::TetMesh::TetMeshOperationExecutor::vt_accessor |
Definition at line 19 of file TetMeshOperationExecutor.hpp.