Wildmeshing Toolkit
wmtk::TriMesh::TriMeshOperationExecutor Class Reference

#include <TriMeshOperationExecutor.hpp>

Inheritance diagram for wmtk::TriMesh::TriMeshOperationExecutor:
[legend]
Collaboration diagram for wmtk::TriMesh::TriMeshOperationExecutor:
[legend]

Public Member Functions

 TriMeshOperationExecutor (TriMesh &m, const Tuple &operating_tuple)
 
void delete_simplices ()
 
Tuple next_edge (const Tuple &tuple) const
 jump to the next edge More...
 
Tuple prev_edge (const Tuple &tuple) const
 jump to the previous edge More...
 
void update_ids_in_ear (const EarData &ear, const int64_t new_fid, const int64_t old_fid)
 handling the topology glueing of ear to non-ear face, transfering data from ear-oldface to ear-newface More...
 
void connect_ears ()
 
void split_edge_precompute ()
 
void collapse_edge_precompute ()
 
void split_edge ()
 
void collapse_edge ()
 
void replace_incident_face (IncidentFaceData &face_data)
 
void create_spine_simplices ()
 
void fill_split_facet_data ()
 
void connect_faces_across_spine ()
 
std::vector< int64_t > request_simplex_indices (const PrimitiveType type, int64_t count)
 
IncidentFaceData get_incident_face_data (Tuple t)
 
- Public Member Functions inherited from wmtk::operations::tri_mesh::EdgeOperationData
 EdgeOperationData ()=default
 
 EdgeOperationData (EdgeOperationData &&)=default
 
EdgeOperationDataoperator= (EdgeOperationData &&)=default
 
const std::vector< IncidentFaceData > & incident_face_datas () const
 
const std::array< int64_t, 2 > & incident_vids () const
 
int64_t operating_edge_id () const
 
std::vector< std::array< Tuple, 2 > > ear_edges (const TriMesh &m) const
 
std::array< Tuple, 2 > input_endpoints (const TriMesh &m) const
 
std::vector< Tuplecollapse_merged_ear_edges (const TriMesh &m) const
 
std::vector< Tuplesplit_new_rib_edges (const TriMesh &) const
 
std::vector< Tupleinput_faces (const TriMesh &) const
 
std::array< Tuple, 2 > split_output_edges (const TriMesh &) const
 
std::vector< std::array< Tuple, 2 > > split_output_faces (const TriMesh &) const
 
std::vector< simplex::Simplexnew_vertices (const Mesh &) const
 
- Public Member Functions inherited from wmtk::operations::EdgeOperationData
 EdgeOperationData ()
 
 ~EdgeOperationData ()
 
 EdgeOperationData (EdgeOperationData &&)
 
EdgeOperationDataoperator= (EdgeOperationData &&)
 
void set_split ()
 
void set_collapse ()
 
const internal::SplitAlternateFacetDataconst_split_facet_data () const
 Returns facet data held if the edge operation was a split - throws if data does not exist. More...
 
const internal::CollapseAlternateFacetDataconst_collapse_facet_data () const
 Returns facet data held if the edge operation was a collapse- throws if data does not exist. More...
 

Static Public Member Functions

static const std::array< std::vector< int64_t >, 3 > get_split_simplices_to_delete (const Tuple &tuple, const TriMesh &m)
 gather all simplices that are deleted in a split More...
 
static const std::array< std::vector< int64_t >, 3 > get_collapse_simplices_to_delete (const Tuple &tuple, const TriMesh &m)
 gather all simplices that are deleted in a collapse More...
 

Public Attributes

std::array< attribute::Accessor< char >, 3 > flag_accessors
 
attribute::Accessor< int64_t, TriMesh > & ff_accessor
 
attribute::Accessor< int64_t, TriMesh > & fe_accessor
 
attribute::Accessor< int64_t, TriMesh > & fv_accessor
 
attribute::Accessor< int64_t, TriMesh > & vf_accessor
 
attribute::Accessor< int64_t, TriMesh > & ef_accessor
 
TriMeshm_mesh
 
- Public Attributes inherited from wmtk::operations::tri_mesh::EdgeOperationData
std::array< std::vector< int64_t >, 3 > simplex_ids_to_delete
 
std::vector< int64_t > cell_ids_to_update_hash
 
int64_t spine_eid = -1
 
int64_t m_operating_edge_id = -1
 
std::vector< IncidentFaceDatam_incident_face_datas
 
std::array< int64_t, 2 > split_spine_eids = std::array<int64_t, 2>{{-1, -1}}
 
int64_t split_new_vid = -1
 
std::array< int64_t, 2 > m_free_split_v
 
std::array< int64_t, 2 > m_free_split_e
 
bool is_collapse = false
 
- Public Attributes inherited from wmtk::operations::EdgeOperationData
Tuple m_operating_tuple
 
Tuple m_output_tuple
 
std::array< int64_t, 2 > m_spine_vids
 
std::vector< std::vector< Tuple > > split_boundary_complex
 
std::vector< std::vector< std::tuple< int64_t, std::vector< Tuple > > > > global_ids_to_potential_tuples
 
std::vector< std::vector< int64_t > > global_ids_to_update
 
std::variant< std::unique_ptr< internal::SplitAlternateFacetData >, std::unique_ptr< internal::CollapseAlternateFacetData > > m_op_data
 

Additional Inherited Members

- Protected Member Functions inherited from wmtk::operations::EdgeOperationData
internal::SplitAlternateFacetDatasplit_facet_data ()
 Returns facet data held if the edge operation was a split - throws if data does not exist. More...
 
internal::CollapseAlternateFacetDatacollapse_facet_data ()
 Returns facet data held if the edge operation was a collapse- throws if data does not exist. More...
 
- Static Protected Member Functions inherited from wmtk::operations::EdgeOperationData
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)
 

Detailed Description

Definition at line 9 of file TriMeshOperationExecutor.hpp.

Constructor & Destructor Documentation

◆ TriMeshOperationExecutor()

wmtk::TriMesh::TriMeshOperationExecutor::TriMeshOperationExecutor ( TriMesh m,
const Tuple operating_tuple 
)

Definition at line 103 of file TriMeshOperationExecutor.cpp.

References wmtk::Edge, wmtk::Mesh::get_flag_accessor(), wmtk::Triangle, and wmtk::Vertex.

Here is the call graph for this function:

Member Function Documentation

◆ collapse_edge()

void wmtk::TriMesh::TriMeshOperationExecutor::collapse_edge ( )

Definition at line 690 of file TriMeshOperationExecutor.cpp.

References wmtk::utils::DynamicArray< T, ArraySize >::emplace_back(), wmtk::simplex::top_dimension_cofaces_iterable(), wmtk::Triangle, and wmtk::Vertex.

Referenced by wmtk::operations::utils::MultiMeshEdgeCollapseFunctor::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ collapse_edge_precompute()

void wmtk::TriMesh::TriMeshOperationExecutor::collapse_edge_precompute ( )

◆ connect_ears()

void wmtk::TriMesh::TriMeshOperationExecutor::connect_ears ( )

◆ connect_faces_across_spine()

void wmtk::TriMesh::TriMeshOperationExecutor::connect_faces_across_spine ( )

Definition at line 277 of file TriMeshOperationExecutor.cpp.

References wmtk::Triangle.

◆ create_spine_simplices()

void wmtk::TriMesh::TriMeshOperationExecutor::create_spine_simplices ( )

Definition at line 593 of file TriMeshOperationExecutor.cpp.

References wmtk::Edge, wmtk::logger(), wmtk::Mesh::request_simplex_indices(), and wmtk::Vertex.

Here is the call graph for this function:

◆ delete_simplices()

void wmtk::TriMesh::TriMeshOperationExecutor::delete_simplices ( )

Definition at line 123 of file TriMeshOperationExecutor.cpp.

References wmtk::logger().

Here is the call graph for this function:

◆ fill_split_facet_data()

void wmtk::TriMesh::TriMeshOperationExecutor::fill_split_facet_data ( )

Definition at line 531 of file TriMeshOperationExecutor.cpp.

References wmtk::Mesh::request_simplex_indices(), and wmtk::Triangle.

Here is the call graph for this function:

◆ get_collapse_simplices_to_delete()

const std::array< std::vector< int64_t >, 3 > wmtk::TriMesh::TriMeshOperationExecutor::get_collapse_simplices_to_delete ( const Tuple tuple,
const TriMesh m 
)
static

gather all simplices that are deleted in a collapse

The deleted simplices are the intersection of the open star of the vertex and the closed star of the edge. This comes down to one vertex, three edges, and two faces if the edge is on the interior. On the boundary it is one vertex, two edges, and one face.

Definition at line 153 of file TriMeshOperationExecutor.cpp.

References wmtk::simplex::SimplexCollection::add(), wmtk::Edge, wmtk::simplex::faces(), wmtk::get_primitive_type_id(), wmtk::TriMesh::id(), wmtk::Mesh::is_free(), wmtk::TriMesh::switch_edge(), wmtk::simplex::top_dimension_cofaces_iterable(), wmtk::Triangle, and wmtk::Vertex.

Here is the call graph for this function:

◆ get_incident_face_data()

◆ get_split_simplices_to_delete()

const std::array< std::vector< int64_t >, 3 > wmtk::TriMesh::TriMeshOperationExecutor::get_split_simplices_to_delete ( const Tuple tuple,
const TriMesh m 
)
static

gather all simplices that are deleted in a split

The deleted simplices are exactly the open star of the edge

Definition at line 139 of file TriMeshOperationExecutor.cpp.

References wmtk::simplex::Simplex::edge(), wmtk::get_primitive_type_id(), wmtk::TriMesh::id(), and wmtk::simplex::open_star().

Here is the call graph for this function:

◆ next_edge()

Tuple wmtk::TriMesh::TriMeshOperationExecutor::next_edge ( const Tuple tuple) const

jump to the next edge

Definition at line 35 of file TriMeshOperationExecutor.cpp.

References m_mesh, wmtk::PE, wmtk::PV, and wmtk::MeshCRTP< Derived >::switch_tuples().

Here is the call graph for this function:

◆ prev_edge()

Tuple wmtk::TriMesh::TriMeshOperationExecutor::prev_edge ( const Tuple tuple) const

jump to the previous edge

Definition at line 39 of file TriMeshOperationExecutor.cpp.

References wmtk::PE, and wmtk::PV.

◆ replace_incident_face()

void wmtk::TriMesh::TriMeshOperationExecutor::replace_incident_face ( IncidentFaceData face_data)
Parameters
new_fids_topthe two new fids on the top sides of AB generated by split_edge(AB)
new_fids_bottomthe two new fids on the bottom sides of AB generated by split_edge(AB)

Definition at line 314 of file TriMeshOperationExecutor.cpp.

References wmtk::operations::tri_mesh::EdgeOperationData::IncidentFaceData::ears, wmtk::Edge, wmtk::operations::tri_mesh::EdgeOperationData::IncidentFaceData::fid, wmtk::logger(), wmtk::operations::tri_mesh::EdgeOperationData::IncidentFaceData::new_edge_id, wmtk::operations::tri_mesh::EdgeOperationData::IncidentFaceData::opposite_vid, wmtk::Mesh::request_simplex_indices(), and wmtk::operations::tri_mesh::EdgeOperationData::IncidentFaceData::split_f.

Here is the call graph for this function:

◆ request_simplex_indices()

std::vector< int64_t > wmtk::TriMesh::TriMeshOperationExecutor::request_simplex_indices ( const PrimitiveType  type,
int64_t  count 
)

Definition at line 762 of file TriMeshOperationExecutor.cpp.

◆ split_edge()

void wmtk::TriMesh::TriMeshOperationExecutor::split_edge ( )

Definition at line 550 of file TriMeshOperationExecutor.cpp.

Referenced by wmtk::operations::utils::MultiMeshEdgeSplitFunctor::operator()().

Here is the caller graph for this function:

◆ split_edge_precompute()

void wmtk::TriMesh::TriMeshOperationExecutor::split_edge_precompute ( )

◆ update_ids_in_ear()

void wmtk::TriMesh::TriMeshOperationExecutor::update_ids_in_ear ( const EarData ear,
const int64_t  new_fid,
const int64_t  old_fid 
)

handling the topology glueing of ear to non-ear face, transfering data from ear-oldface to ear-newface

Parameters
ear_fidthe ear that will be glued
new_face_fid
old_fidthe data where the data is transfered from
eidthe edge between two glued faces

Definition at line 199 of file TriMeshOperationExecutor.cpp.

References wmtk::operations::tri_mesh::EdgeOperationData::EarData::eid, and wmtk::operations::tri_mesh::EdgeOperationData::EarData::fid.

Member Data Documentation

◆ ef_accessor

attribute::Accessor<int64_t, TriMesh>& wmtk::TriMesh::TriMeshOperationExecutor::ef_accessor

Definition at line 20 of file TriMeshOperationExecutor.hpp.

◆ fe_accessor

attribute::Accessor<int64_t, TriMesh>& wmtk::TriMesh::TriMeshOperationExecutor::fe_accessor

Definition at line 17 of file TriMeshOperationExecutor.hpp.

◆ ff_accessor

attribute::Accessor<int64_t, TriMesh>& wmtk::TriMesh::TriMeshOperationExecutor::ff_accessor

Definition at line 16 of file TriMeshOperationExecutor.hpp.

◆ flag_accessors

std::array<attribute::Accessor<char>, 3> wmtk::TriMesh::TriMeshOperationExecutor::flag_accessors

Definition at line 15 of file TriMeshOperationExecutor.hpp.

◆ fv_accessor

attribute::Accessor<int64_t, TriMesh>& wmtk::TriMesh::TriMeshOperationExecutor::fv_accessor

Definition at line 18 of file TriMeshOperationExecutor.hpp.

◆ m_mesh

TriMesh& wmtk::TriMesh::TriMeshOperationExecutor::m_mesh

Definition at line 76 of file TriMeshOperationExecutor.hpp.

Referenced by next_edge().

◆ vf_accessor

attribute::Accessor<int64_t, TriMesh>& wmtk::TriMesh::TriMeshOperationExecutor::vf_accessor

Definition at line 19 of file TriMeshOperationExecutor.hpp.


The documentation for this class was generated from the following files: