19 auto invariants = std::make_shared<invariants::InvariantCollection>(m);
27 const std::vector<std::shared_ptr<const operations::BaseCollapseNewAttributeStrategy>>&
31 std::integral_constant<int64_t, 1>{},
38 auto cache = visitor.take_cache();
41 auto update_attributes = [&](
auto&& m) {
42 using T = std::remove_reference_t<decltype(m)>;
43 if constexpr (!std::is_const_v<T>) {
44 for (
const auto& collapse_ptr : new_attr_strategies) {
45 if (&m == &collapse_ptr->mesh()) {
46 collapse_ptr->update(m, cache, tuples);
59 const std::vector<std::shared_ptr<const operations::BaseCollapseNewAttributeStrategy>>&
69 return std::vector<simplex::Simplex>{1};
73 for (
const auto& c : candidates) {
74 if (return_data.has_variant(mesh, nsimplex)) {
76 [&mesh](
const auto& rt) -> std::vector<simplex::Simplex> {
79 return_data.get_variant(mesh, nsimplex));
83 assert(return_data.has_variant(mesh, nsimplex));
void run_on_nodes(NodeFunctor &&node_functor)
void execute_from_root(Mesh &mesh, const simplex::NavigatableSimplex &simplex)
static Simplex vertex(const Mesh &m, const Tuple &t)
OperationInOutData extract_operation_in_out(const CollapseReturnData &return_data)
MultiMeshVisitor(NodeFunctor &&) -> MultiMeshVisitor< NodeFunctor >
std::shared_ptr< invariants::InvariantCollection > multimesh_edge_collapse_invariants(const Mesh &m)
wmtk::multimesh::operations::CollapseReturnData CollapseReturnData
std::vector< simplex::Simplex > multi_mesh_edge_collapse_with_modified_simplices(Mesh &mesh, const simplex::Simplex &simplex, const std::vector< std::shared_ptr< const operations::BaseCollapseNewAttributeStrategy >> &new_attr_strategies)
CollapseReturnData multi_mesh_edge_collapse(Mesh &mesh, const simplex::NavigatableSimplex &t, const std::vector< std::shared_ptr< const operations::BaseCollapseNewAttributeStrategy >> &new_attr_strategies)
void top_dimension_cofaces(const Simplex &simplex, SimplexCollection &simplex_collection, const bool sort_and_clean)
Get all top dimension cofaces of the given simplex.