19 bool all_configured =
true;
21 if (strat->invalid_state()) {
22 all_configured =
false;
23 wmtk::logger().warn(
"Attribute new {} was not configured", strat->name());
26 return all_configured;
32 auto collect_attrs = [&](
auto&&
mesh) {
34 if constexpr (!std::is_const_v<std::remove_reference_t<decltype(
mesh)>>) {
37 [&](
auto&& tah) noexcept {
38 using HandleType =
typename std::decay_t<decltype(tah)>;
39 if constexpr (attribute::MeshAttributeHandle::template handle_type_is_basic<
41 using T =
typename HandleType::Type;
70 std::shared_ptr<const operations::BaseSplitNewAttributeStrategy>
74 if (s->matches_attribute(attribute))
return s;
77 throw std::runtime_error(
"unable to find attribute");
87 const std::shared_ptr<const operations::BaseSplitNewAttributeStrategy>& other)
96 throw std::runtime_error(
"unable to find attribute");
105 [&](
auto&& val) noexcept ->
void {
106 using HandleType =
typename std::decay_t<decltype(val)>;
107 if constexpr (attribute::MeshAttributeHandle::template handle_type_is_basic<
109 using T =
typename HandleType::Type;
112 std::shared_ptr<OpType> tmp = std::make_shared<OpType>(attribute);
113 tmp->set_strategy(spine);
114 tmp->set_rib_strategy(rib);
132 std::pair<Tuple, Tuple> ret;
148 default: assert(
false);
std::vector< attribute::MeshAttributeHandle::HandleVariant > custom_attributes() const
Tuple switch_tuples(const Tuple &tuple, const ContainerType &op_sequence) const
PrimitiveType top_simplex_type() const
void execute_from_root(Mesh &mesh)
std::vector< simplex::Simplex > unmodified_primitives(const simplex::Simplex &simplex) const override
Returns all simplices that will be potentially affected by the operation.
std::vector< std::shared_ptr< const operations::BaseSplitNewAttributeStrategy > > m_new_attr_strategies
bool attribute_new_all_configured() const
void clear_attribute_new_strategies()
void set_new_attribute_strategy(const attribute::MeshAttributeHandle &attribute, const std::shared_ptr< const operations::BaseSplitNewAttributeStrategy > &other)
static std::pair< Tuple, Tuple > new_spine_edges(const Mesh &mesh, const Tuple &new_vertex)
std::vector< simplex::Simplex > execute(const simplex::Simplex &simplex) override
std::shared_ptr< const operations::BaseSplitNewAttributeStrategy > get_new_attribute_strategy(const attribute::MeshAttributeHandle &attribute) const
const Mesh & mesh() const
constexpr wmtk::PrimitiveType PT
constexpr wmtk::PrimitiveType PF
std::vector< simplex::Simplex > multi_mesh_edge_split_with_modified_simplices(Mesh &mesh, const simplex::Simplex &simplex, const std::vector< std::shared_ptr< const operations::BaseSplitNewAttributeStrategy >> &new_attr_strategies)
spdlog::logger & logger()
Retrieves the current logger.
constexpr PrimitiveType PE