Wildmeshing Toolkit
EdgeMeshOperationExecutor.hpp
Go to the documentation of this file.
1 #pragma once
3 #include <wmtk/utils/Logger.hpp>
4 #include "EdgeMesh.hpp"
5 #include "Tuple.hpp"
6 namespace wmtk {
8 {
9 public:
10  EdgeMeshOperationExecutor(EdgeMesh& m, const Tuple& operating_tuple);
11  void delete_simplices();
12  void update_cell_hash();
13 
14  std::array<attribute::Accessor<char>, 2> flag_accessors;
18 
26  static const std::array<std::vector<int64_t>, 2> get_split_simplices_to_delete(
27  const Tuple& tuple,
28  const EdgeMesh& m);
29 
37  static const std::array<std::vector<int64_t>, 2> get_collapse_simplices_to_delete(
38  const Tuple& tuple,
39  const EdgeMesh& m);
40 
41  const std::array<int64_t, 2>& incident_vids() const { return m_spine_vids; }
42 
43  int64_t operating_edge_id() const { return m_operating_edge_id; }
44 
45  void split_edge();
46  void collapse_edge();
49 
50  std::vector<int64_t> request_simplex_indices(const PrimitiveType type, int64_t count);
51 
53 
54 
55 private:
56  void update_hash_in_map(EdgeMesh& child_mesh);
57 };
58 } // namespace wmtk
EdgeMeshOperationExecutor(EdgeMesh &m, const Tuple &operating_tuple)
attribute::Accessor< int64_t, EdgeMesh > ee_accessor
std::vector< int64_t > request_simplex_indices(const PrimitiveType type, int64_t count)
const std::array< int64_t, 2 > & incident_vids() const
static const std::array< std::vector< int64_t >, 2 > get_split_simplices_to_delete(const Tuple &tuple, const EdgeMesh &m)
gather all simplices that are deleted in a split
std::array< attribute::Accessor< char >, 2 > flag_accessors
attribute::Accessor< int64_t, EdgeMesh > ev_accessor
static const std::array< std::vector< int64_t >, 2 > get_collapse_simplices_to_delete(const Tuple &tuple, const EdgeMesh &m)
gather all simplices that are deleted in a collapse
attribute::Accessor< int64_t, EdgeMesh > ve_accessor
A CachingAccessor that uses tuples for accessing attributes instead of indices.
Definition: Accessor.hpp:25
Definition: Accessor.hpp:6