Wildmeshing Toolkit
EdgeSplit.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Operation.hpp"
4 
6 
7 namespace wmtk::operations {
8 class EdgeSplit : public Operation
9 {
10 public:
11  EdgeSplit(Mesh& m);
12 
13  PrimitiveType primitive_type() const override { return PrimitiveType::Edge; }
14 
15  static std::pair<Tuple, Tuple> new_spine_edges(const Mesh& mesh, const Tuple& new_vertex);
16 
17 
18  std::shared_ptr<const operations::BaseSplitNewAttributeStrategy> get_new_attribute_strategy(
19  const attribute::MeshAttributeHandle& attribute) const;
20 
22  const attribute::MeshAttributeHandle& attribute,
23  const std::shared_ptr<const operations::BaseSplitNewAttributeStrategy>& other);
24 
26  const attribute::MeshAttributeHandle& attribute,
31 
35  std::vector<simplex::Simplex> execute(const simplex::Simplex& simplex) override;
36  std::vector<simplex::Simplex> unmodified_primitives(
37  const simplex::Simplex& simplex) const override;
38 
39 
41 
42  // checks through attribute new for throws, prints to the logger if so
43  bool attribute_new_all_configured() const;
44 
45 private:
46  std::vector<std::shared_ptr<const operations::BaseSplitNewAttributeStrategy>>
48 };
49 
50 } // namespace wmtk::operations
PrimitiveType primitive_type() const override
Definition: EdgeSplit.hpp:13
std::vector< simplex::Simplex > unmodified_primitives(const simplex::Simplex &simplex) const override
Returns all simplices that will be potentially affected by the operation.
Definition: EdgeSplit.cpp:63
std::vector< std::shared_ptr< const operations::BaseSplitNewAttributeStrategy > > m_new_attr_strategies
Definition: EdgeSplit.hpp:47
bool attribute_new_all_configured() const
Definition: EdgeSplit.cpp:17
void set_new_attribute_strategy(const attribute::MeshAttributeHandle &attribute, const std::shared_ptr< const operations::BaseSplitNewAttributeStrategy > &other)
Definition: EdgeSplit.cpp:85
static std::pair< Tuple, Tuple > new_spine_edges(const Mesh &mesh, const Tuple &new_vertex)
Definition: EdgeSplit.cpp:122
std::vector< simplex::Simplex > execute(const simplex::Simplex &simplex) override
Definition: EdgeSplit.cpp:56
std::shared_ptr< const operations::BaseSplitNewAttributeStrategy > get_new_attribute_strategy(const attribute::MeshAttributeHandle &attribute) const
Definition: EdgeSplit.cpp:71
const Mesh & mesh() const
Definition: Operation.hpp:45