Wildmeshing Toolkit
TetMeshOperationExecutor.hpp
Go to the documentation of this file.
1 #pragma once
3 #include <wmtk/utils/Logger.hpp>
4 #include "TetMesh.hpp"
5 #include "Tuple.hpp"
6 namespace wmtk {
8 {
9 public:
10  TetMeshOperationExecutor(TetMesh& m, const Tuple& operating_tuple);
11  void delete_simplices();
12  void update_cell_hash();
13 
14  std::array<attribute::Accessor<char>, 4> flag_accessors;
22 
23 
30  static const std::array<std::vector<int64_t>, 4> get_split_simplices_to_delete(
31  const Tuple& tuple,
32  const TetMesh& m);
33 
48  static const std::array<std::vector<int64_t>, 4> get_collapse_simplices_to_delete(
49  const Tuple& tuple,
50  const TetMesh& m);
51 
53  const int64_t ear_tid,
54  const int64_t new_tid,
55  const int64_t old_tid,
56  const int64_t common_fid);
57 
58 
59  /*
60 
61  */
83  void split_edge();
84 
103  void collapse_edge();
104 
105  std::vector<int64_t> request_simplex_indices(const PrimitiveType type, int64_t count);
106 
107 
109 
110 private:
111  // IncidentTetData get_incident_tet_data(Tuple t);
112 
113 
114 public:
126  // TODO: change to i and i+1 mod size convention
127  std::tuple<std::vector<Tuple>, std::vector<Tuple>> get_incident_tets_and_faces(Tuple t);
128 };
129 } // namespace wmtk
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.
std::vector< int64_t > request_simplex_indices(const PrimitiveType type, int64_t count)
attribute::Accessor< int64_t, TetMesh > & tt_accessor
attribute::Accessor< int64_t, TetMesh > & et_accessor
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
attribute::Accessor< int64_t, TetMesh > & ft_accessor
attribute::Accessor< int64_t, TetMesh > & te_accessor
attribute::Accessor< int64_t, TetMesh > & tf_accessor
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
void update_ear_connectivity(const int64_t ear_tid, const int64_t new_tid, const int64_t old_tid, const int64_t common_fid)
attribute::Accessor< int64_t, TetMesh > & vt_accessor
std::array< attribute::Accessor< char >, 4 > flag_accessors
TetMeshOperationExecutor(TetMesh &m, const Tuple &operating_tuple)
attribute::Accessor< int64_t, TetMesh > & tv_accessor
A CachingAccessor that uses tuples for accessing attributes instead of indices.
Definition: Accessor.hpp:25
Definition: Accessor.hpp:6