2#include <wmtk/utils/PartitionMesh.h>
3#include <wmtk/utils/VectorUtils.h>
4#include <wmtk/AttributeCollection.hpp>
7#include <wmtk/utils/DisableWarnings.hpp>
8#include <igl/write_triangle_mesh.h>
9#include <tbb/concurrent_priority_queue.h>
10#include <tbb/concurrent_vector.h>
11#include <tbb/enumerable_thread_specific.h>
12#include <tbb/parallel_for.h>
13#include <fastenvelope/FastEnvelope.h>
14#include <wmtk/utils/EnableWarnings.hpp>
18#include <Eigen/Geometry>
24#include <wmtk/envelope/Envelope.hpp>
26namespace wmtk::components::shortest_edge_collapse {
31 size_t partition_id = 0;
39 bool m_has_envelope =
false;
44 std::vector<Eigen::Vector3d> _m_vertex_positions,
46 bool use_exact_envelope =
true);
48 void freeze_boundary();
52 const std::vector<std::array<size_t, 3>>& tris,
53 const std::vector<size_t>& frozen_verts = {},
58 void partition_mesh();
60 size_t get_partition_id(
const Tuple& loc)
const
62 return vertex_attrs[loc.vid(*
this)].partition_id;
65 void write_vtu(
const std::string& path);
70 bool collapse_shortest(
int target_vertex_count);
71 bool write_triangle_mesh(std::string path);
72 bool invariants(
const std::vector<Tuple>& new_tris)
override;
80 tbb::enumerable_thread_specific<PositionInfoCache> position_cache;
82 std::vector<TriMesh::Tuple> new_edges_after(
const std::vector<TriMesh::Tuple>& t)
const;
Definition Envelope.hpp:51
Definition ShortestEdgeCollapse.h:36
bool invariants(const std::vector< Tuple > &new_tris) override
User specified invariants that can't be violated.
Definition ShortestEdgeCollapse.cpp:73
bool collapse_edge_before(const Tuple &t) override
User specified preparations and desideratas for an edge collapse including the link check as collapse...
Definition ShortestEdgeCollapse.cpp:138
bool collapse_edge_after(const Tuple &t) override
User specified modifications and desideratas after an edge collapse.
Definition ShortestEdgeCollapse.cpp:149
Definition AttributeCollection.hpp:37
Definition ShortestEdgeCollapse.h:76
Definition ShortestEdgeCollapse.h:29