Wildmeshing Toolkit
Loading...
Searching...
No Matches
TetOptimizerMesh.h
1#pragma once
2
3#include <wmtk/OptimizerParameters.h>
4#include <wmtk/RationalPositions.h>
5#include <wmtk/SurfaceTagAttributes.h>
6#include <wmtk/TetMesh.h>
7#include <wmtk/Types.hpp>
8#include <wmtk/envelope/Envelope.hpp>
9#include <wmtk/optimization/SmoothVertex.hpp>
10#include <wmtk/optimization/solver.hpp>
11#include <wmtk/simplex/Simplex.hpp>
12#include <wmtk/threading/enumerable_thread_specific.hpp>
13#include <wmtk/utils/SurfaceTopology.hpp>
14
15#include <igl/Timer.h>
16
17#include <atomic>
18#include <cmath>
19#include <functional>
20#include <map>
21#include <memory>
22#include <set>
23#include <vector>
24
25namespace wmtk {
26
45{
46public:
48 {
49 Vector3r m_pos; // exact position in rational
50 Vector3d m_posf; // position as double
56 bool m_is_rounded = false;
57
58 bool m_is_on_surface = false;
66 size_t m_order = 0;
67 std::vector<int> on_bbox_faces;
68
69 double m_sizing_scalar = 1;
70
72 size_t partition_id = 0;
73
75 VertexAttributes(const Vector3r& p);
76 };
77
79
81 using FaceAttCol = AttributeCollection<FaceAttributes>;
82
83 VertAttCol m_vertex_attribute;
84 FaceAttCol m_face_attribute;
85
93
108
117 static constexpr double MAX_ENERGY = 1e50;
118
122
124 std::shared_ptr<SampleEnvelope> m_envelope;
125
128 double m_s_amips = 1.;
129 double m_s_envelope = -1.;
130
131 double time_env = 0.0;
132 igl::Timer isout_timer;
133
137
140
144
148 std::set<simplex::Edge> m_force_split_edges;
151
152 bool is_force_split_edge(const size_t v1, const size_t v2) const
153 {
154 return m_force_split_edges.find(simplex::Edge(v1, v2)) != m_force_split_edges.end();
155 }
156
158 std::unique_ptr<std::atomic<int>[]> m_high_valence_claim;
159 size_t m_high_valence_claim_size = 0;
160 std::atomic<size_t> m_high_valence_rejects = 0;
161
162 explicit TetOptimizerMesh(OptimizerParameters& params, std::shared_ptr<SampleEnvelope> env)
163 : m_params(params)
164 , m_envelope(std::move(env))
165 {
166 m_vertex_attr_group.add(&m_vertex_attribute);
167 p_vertex_attrs = &m_vertex_attr_group;
168 m_face_attr_group.add(&m_face_attribute);
169 p_face_attrs = &m_face_attr_group;
170 }
171 ~TetOptimizerMesh() override = default;
172
181 virtual double cell_quality(const size_t tid) const = 0;
182 virtual void set_cell_quality(const size_t tid, const double q) = 0;
183
200 virtual double quality_rel(const size_t tid) const
201 {
202 return std::cbrt(cell_quality(tid)) / m_params.stop_energy;
203 }
204
205 // TODO This should not be here but inside wmtk
206 void compute_vertex_partition();
207 void compute_vertex_partition_morton();
208
209 size_t get_partition_id(const Tuple& loc) const
210 {
211 return m_vertex_attribute[loc.vid(*this)].partition_id;
212 }
213
214 double get_length2(const Tuple& l) const;
215
216 bool is_inverted(const std::array<size_t, 4>& vs) const;
217 bool is_inverted(const Tuple& loc) const;
219 bool is_inverted_f(const Tuple& loc) const;
220
221 double get_quality(const std::array<size_t, 4>& vs) const;
222 double get_quality(const Tuple& loc) const;
223 std::tuple<double, double> get_max_avg_energy();
224
232 virtual void update_attributes() {}
233
236 int m_debug_print_counter = 0;
237 void mesh_improvement(int max_its = 80);
238 std::tuple<double, double> local_operations(
239 const std::array<int, 4>& ops,
240 bool collapse_limit_length = true);
241
246 bool round(const Tuple& v);
247
248protected:
249 // RationalPositions supplies round_all_vertices() and round_and_check_all_rounded() on
250 // top of these three.
251 std::vector<size_t> all_vertex_ids() const override;
252 bool vertex_is_rounded(const size_t vid) const override
253 {
254 return m_vertex_attribute.at(vid).m_is_rounded;
255 }
256 // Equivalent to round() on the tuple get_vertices() would have yielded: round() reads only
257 // the vid and the one-ring, and the one-ring query is answered from
258 // m_vertex_connectivity[vid] regardless of which cell the tuple names.
259 bool round_vertex(const size_t vid) override { return round(tuple_from_vertex(vid)); }
260
261public:
262 bool is_edge_on_surface(const Tuple& loc);
263 bool is_edge_on_bbox(const Tuple& loc);
275 virtual bool is_open_boundary_edge(const Tuple& e) { return false; }
282 int edge_incident_surface_face_count(const Tuple& e);
283
297 virtual std::shared_ptr<SampleEnvelope> surface_envelope_for_face(
298 const std::array<size_t, 3>& vids) const
299 {
300 return m_envelope;
301 }
302
305 bool surface_triangle_is_outside(const size_t a, const size_t b, const size_t c) const
306 {
307 const std::shared_ptr<SampleEnvelope> env = surface_envelope_for_face({{a, b, c}});
308 if (!env) return false;
309 const auto& VA = m_vertex_attribute;
310 return env->is_outside({{VA[a].m_posf, VA[b].m_posf, VA[c].m_posf}});
311 }
312
313 bool vertex_is_on_surface(const size_t vid) const override;
314 bool face_is_on_surface(const size_t fid) const override;
315 size_t get_order_of_vertex(const size_t vid) const override;
316
317 std::vector<std::array<size_t, 3>> get_faces_by_condition(
318 std::function<bool(const FaceAttributes&)> cond) const;
319
320 void output_faces(std::string file, std::function<bool(const FaceAttributes&)> cond);
321
323 void gradation_smooth_sizing(double grade, const std::vector<size_t>& seeds);
324
334 {
335 const double e = m_params.skip_good_regions_margin * m_params.stop_energy;
336 return e * e * e;
337 }
338
341 virtual std::vector<size_t> active_vertices() const;
342
343 // TetWild's split engine. SimWild inherits it and customizes only application data,
344 // annotation-only placement, and order-2 metadata through the hooks below.
345 void split_all_edges();
346 bool split_edge_before(const Tuple& t) override;
347 bool split_edge_after(const Tuple& loc) override;
348
349 // TetWild's collapse engine. SimWild customizes only application policy/metadata.
350 void collapse_all_edges(bool is_limit_length = true);
351 bool collapse_edge_before(const Tuple& t) override;
352 bool collapse_edge_after(const Tuple& t) override;
353
363 size_t coarsen_mesh();
364
372 bool coarsen_collapse_edge(const Tuple& e, std::vector<Tuple>& new_tets);
373
376 {
377 size_t accepted = 0;
378 size_t cells_before = 0;
379 size_t cells_after = 0;
380 double max_energy_before = 0.;
381 double max_energy_after = 0.;
382 };
383 CoarsenStats m_coarsen_stats;
384
385 // TetWild's complete swap engine. SimWild inherits these operations and customizes only
386 // the tag bookkeeping through the hooks below.
387 size_t swap_all_edges_32();
388 bool swap_edge_before(const Tuple& t) override;
389 bool swap_edge_after(const Tuple& t) override;
390
391 size_t swap_all_edges_44();
392 bool swap_edge_44_before(const Tuple& t) override;
393 bool swap_edge_44_accept_case(const std::array<size_t, 2>& new_edge) override;
394 bool swap_edge_44_after(const Tuple& t) override;
395
396 size_t swap_all_edges_56();
397 bool swap_edge_56_before(const Tuple& t) override;
398 bool swap_edge_56_accept_case(const std::array<size_t, 3>& new_face) override;
399 bool swap_edge_56_after(const Tuple& t) override;
400
401 size_t swap_all_faces();
402 bool swap_face_before(const Tuple& t) override;
403 bool swap_face_after(const Tuple& t) override;
404 size_t swap_all_edges_all();
405
406 bool prepare_surface_flip(const Tuple& t, const std::vector<size_t>& incident_tets);
407
409 SurfaceTopoSignature surface_topology_signature() const
410 {
411 return wmtk::utils::surface_topology_signature(*this, [this](size_t fid) {
412 return m_face_attribute[fid].m_is_surface_fs;
413 });
414 }
415 void warn_if_surface_topology_changed(const SurfaceTopoSignature& before, const char* where)
416 const
417 {
418 wmtk::utils::warn_if_surface_topology_changed(before, surface_topology_signature(), where);
419 }
420
421 // Operation diagnostics shared by TetWild and SimWild.
422 std::atomic<int> cnt_swap = 0;
423 std::atomic<int> cnt_surface_swap = 0;
424 std::atomic<int> cnt_surface_swap_32 = 0, cnt_surface_swap_44 = 0, cnt_surface_swap_56 = 0;
425
426 double swap_edge_44_energy(const std::vector<std::array<size_t, 4>>& tets, const int op_case)
427 override;
428 double swap_edge_56_energy(const std::vector<std::array<size_t, 4>>& tets, const int op_case)
429 override;
430
437 virtual std::shared_ptr<SampleEnvelope> smoothing_containment_envelope(const size_t vid) const;
438 virtual std::shared_ptr<SampleEnvelope> smoothing_energy_envelope(const size_t vid) const = 0;
439
453 virtual std::shared_ptr<polysolve::nonlinear::Problem> smoothing_extra_energy(
454 const size_t /*vid*/) const
455 {
456 return nullptr;
457 }
458
459 bool smooth_before(const Tuple& t) override;
460 bool smooth_after(const Tuple& t) override;
461 void smooth_all_vertices(const size_t n_iters = 1);
462
463 bool invariants(const std::vector<Tuple>& t) override;
464
465protected:
468 virtual std::tuple<double, double> optimization_quality_stats();
469 virtual double optimization_stop_metric() const { return m_params.stop_energy; }
470 virtual size_t refine_sizing_around_worst(double max_metric) = 0;
471
494 virtual bool optimization_bare_coarsen_passes() const { return true; }
495 virtual void write_optimization_debug_output(const std::string& path) = 0;
496 virtual void optimization_sanity_checks_extra() {}
497
502 uint32_t m_op_epoch = 0;
503 virtual bool optimization_stop_at_float() const { return false; }
504
519 virtual bool optimization_stalled(double prev, double cur)
520 {
521 return (prev - cur) <= m_params.stuck_refine_stall_eps * (cur - optimization_stop_metric());
522 }
523
526 virtual bool collapse_before_vertex(size_t, size_t, double) { return true; }
527 virtual bool collapse_quality_allowed(size_t v1, double quality, double ring_max) const
528 {
529 return !m_vertex_attribute.at(v1).m_is_rounded || quality <= ring_max;
530 }
531 virtual bool collapse_is_order_2_edge(const std::array<size_t, 2>&) { return false; }
532 virtual bool
533 collapse_after_connectivity(size_t, size_t, const std::vector<std::array<size_t, 2>>&)
534 {
535 return true;
536 }
537 virtual void collapse_after_vertex(size_t, size_t) {}
538
540 virtual bool split_before_cells(const Tuple&, const std::vector<Tuple>&) { return true; }
542 virtual bool split_after_cells(size_t, size_t, size_t, const std::vector<Tuple>&)
543 {
544 return true;
545 }
548 virtual bool split_adjust_position(size_t, const std::vector<Tuple>&) { return true; }
550 virtual void split_after_vertex(size_t, bool) {}
551
552 virtual bool allow_surface_swap() const = 0;
553 virtual bool check_surface_topology() const = 0;
554
556 virtual bool swap_before_interior(const std::vector<size_t>&) { return true; }
557 virtual bool swap_before_surface(const std::vector<size_t>&, size_t, size_t, size_t, size_t)
558 {
559 return true;
560 }
562 virtual bool swap_after_cells(const std::vector<size_t>&, bool) { return true; }
563
565 {
566 double max_energy;
567 std::map<std::array<size_t, 3>, FaceAttributes> changed_faces;
568
569 bool is_surface_flip = false;
570 size_t sf_a = 0, sf_b = 0, sf_c = 0, sf_d = 0;
571 FaceAttributes sf_face_attr;
572 };
574
576 {
577 size_t v1_id = 0;
578 size_t v2_id = 0;
579 bool is_edge_on_surface = false;
580 bool is_edge_open_boundary = false;
581 size_t edge_order = 0;
582 std::vector<std::pair<FaceAttributes, std::array<size_t, 3>>> changed_faces;
583 };
585
587 {
588 size_t v1_id = 0;
589 size_t v2_id = 0;
590 double max_energy = 0.;
591 double edge_length = 0.;
592 std::vector<std::pair<FaceAttributes, std::array<size_t, 3>>> changed_faces;
593 std::vector<std::array<size_t, 3>> surface_faces;
594 std::vector<std::array<size_t, 2>> boundary_edges;
595 std::vector<size_t> changed_tids;
596 std::vector<double> changed_energies;
600 };
602
604 bool m_coarsen_mode = false;
605
606private:
616 {
617 std::vector<size_t> ring; // vertices to re-smooth, BFS order
618 std::vector<size_t> frontier;
619 std::vector<size_t> next;
620 std::vector<size_t> one_ring;
621 std::vector<uint32_t> stamp;
622 uint32_t epoch = 0;
623 VertexAttributes saved_vertex;
624 std::vector<std::pair<size_t, double>> saved_qualities;
625 };
627
629 const std::vector<size_t>&
630 collect_vertex_ball(const size_t* seeds, size_t n_seeds, int n, CoarsenScratch& scr) const;
631
634 double region_max_quality_rel(const std::vector<size_t>& vids) const;
635
637 bool smooth_vertex_reversible(size_t vid, CoarsenScratch& scr);
638
645 bool is_limit_length,
646 int lock_ring,
647 size_t max_passes = 0,
648 bool exact_ball_lock = false);
649};
650
651} // namespace wmtk
Several attribute collections for the same simplex type, behind one container.
Definition AttributeCollection.hpp:132
The rounded/exact bookkeeping shared by every mesh that keeps both coordinates.
Definition RationalPositions.h:21
Whether a codimension-1 simplex is tracked surface, and which bbox side it lies on.
Definition SurfaceTagAttributes.h:15
a Tuple refers to a global vid and a global tet id, and a local edge id and local face id
Definition TetMesh.h:50
Definition TetMesh.h:25
Tuple tuple_from_vertex(size_t vid) const
get a Tuple from global vertex index
Definition TetMesh.cpp:592
What tetwild and simwild's 3D mesh share.
Definition TetOptimizerMesh.h:45
bool m_collapse_limit_length
Definition TetOptimizerMesh.h:143
void gradation_smooth_sizing(double grade, const std::vector< size_t > &seeds)
Grade the refined sizing region into its surroundings (monotone, only lowers).
Definition TetOptimizerMesh.cpp:422
virtual std::shared_ptr< SampleEnvelope > surface_envelope_for_face(const std::array< size_t, 3 > &vids) const
Envelope the tracked-surface triangle vids must stay inside.
Definition TetOptimizerMesh.h:297
double swap_edge_44_energy(const std::vector< std::array< size_t, 4 > > &tets, const int op_case) override
User specified energy to decide which of the 4 possible orientations should be chosen.
Definition TetOptimizerMesh.cpp:296
bool swap_edge_44_before(const Tuple &t) override
User specified preparations and desideratas for an 4-4 edge swap before changing the connectivity.
Definition TetOptimizerMeshSwaps.cpp:543
size_t m_force_split_count
Force-splits taken in the current split pass. Diagnostic only.
Definition TetOptimizerMesh.h:150
AttributeContainerGroup m_vertex_attr_group
What p_vertex_attrs points at, so a derived class can register more.
Definition TetOptimizerMesh.h:92
bool vertex_is_on_surface(const size_t vid) const override
Is a vertex part of the substructure.
Definition TetOptimizerMesh.cpp:724
bool collapse_edge_after(const Tuple &t) override
User specified modifications and desideratas for after an edge collapse.
Definition TetOptimizerMeshCollapse.cpp:325
std::unique_ptr< std::atomic< int >[]> m_high_valence_claim
Per-pass claims for the shared high-valence split gate.
Definition TetOptimizerMesh.h:158
std::vector< size_t > all_vertex_ids() const override
Every live vertex, in the mesh's own iteration order.
Definition TetOptimizerMesh.cpp:411
double region_max_quality_rel(const std::vector< size_t > &vids) const
Definition TetOptimizerMeshCollapse.cpp:515
bool m_coarsen_mode
Set for the duration of coarsen_mesh(); read-only while a pass is running.
Definition TetOptimizerMesh.h:604
bool swap_face_after(const Tuple &t) override
User specified modifications and desideratas for after a 2-3 face swap.
Definition TetOptimizerMeshSwaps.cpp:442
virtual void update_attributes()
Update the attributes of the mesh after an iteration of operations.
Definition TetOptimizerMesh.h:232
bool swap_edge_44_after(const Tuple &t) override
User specified modifications and desideratas for after a 4-4 edge swap.
Definition TetOptimizerMeshSwaps.cpp:584
bool swap_edge_before(const Tuple &t) override
User specified preparations and desideratas for an 3-2 edge swap before changing the conenctivity.
Definition TetOptimizerMeshSwaps.cpp:115
bool swap_face_before(const Tuple &t) override
User specified preparations and desideratas for an 2-3 face swap befroe changing the geometry.
Definition TetOptimizerMeshSwaps.cpp:384
virtual void split_after_vertex(size_t, bool)
Application metadata not represented by the shared vertex attributes.
Definition TetOptimizerMesh.h:550
bool surface_triangle_is_outside(const size_t a, const size_t b, const size_t c) const
Definition TetOptimizerMesh.h:305
bool swap_edge_56_after(const Tuple &t) override
User specified modifications and desideratas for after a 5-6 edge swap.
Definition TetOptimizerMeshSwaps.cpp:705
virtual bool split_after_cells(size_t, size_t, size_t, const std::vector< Tuple > &)
Restore application cell data on the children made by a split.
Definition TetOptimizerMesh.h:542
virtual double cell_quality(const size_t tid) const =0
The quality of cell tid, and how to write it.
virtual std::shared_ptr< polysolve::nonlinear::Problem > smoothing_extra_energy(const size_t) const
An extra term the application adds to this vertex's smoothing objective, or null.
Definition TetOptimizerMesh.h:453
virtual bool collapse_before_vertex(size_t, size_t, double)
Definition TetOptimizerMesh.h:526
virtual std::vector< size_t > active_vertices() const
Definition TetOptimizerMesh.cpp:486
wmtk::threading::enumerable_thread_specific< std::unique_ptr< polysolve::nonlinear::Solver > > m_solver
Per-thread Newton solver for smoothing; created on first use.
Definition TetOptimizerMesh.h:136
size_t get_order_of_vertex(const size_t vid) const override
Get the order of a vertex.
Definition TetOptimizerMesh.cpp:734
double swap_edge_56_energy(const std::vector< std::array< size_t, 4 > > &tets, const int op_case) override
User specified energy to decide which of the 5 possible orientations should be chosen.
Definition TetOptimizerMesh.cpp:311
virtual bool optimization_stalled(double prev, double cur)
Whether an iteration that moved the metric from prev to cur is stalled, and the sizing refinement sho...
Definition TetOptimizerMesh.h:519
bool collapse_edge_before(const Tuple &t) override
User specified preparations and desideratas for an edge collapse before changing the connectivity.
Definition TetOptimizerMeshCollapse.cpp:97
virtual bool is_open_boundary_edge(const Tuple &e)
Whether edge e lies on the boundary of the tracked surface.
Definition TetOptimizerMesh.h:275
int m_iterations_used
Shared TetWild/SimWild outer optimization schedule.
Definition TetOptimizerMesh.h:235
bool is_inverted_f(const Tuple &loc) const
Inversion check using only the double positions.
Definition TetOptimizerMesh.cpp:498
virtual bool swap_after_cells(const std::vector< size_t > &, bool)
Propagate application data to the cells made by a successful topological swap.
Definition TetOptimizerMesh.h:562
virtual double quality_rel(const size_t tid) const
A cell's quality relative to the quality it is required to reach; <= 1 means it meets it.
Definition TetOptimizerMesh.h:200
virtual bool optimization_bare_coarsen_passes() const
Whether the loop opens with an UNLIMITED-LENGTH collapse pass.
Definition TetOptimizerMesh.h:494
AttributeContainerGroup m_face_attr_group
What p_face_attrs points at, so a derived class can register more.
Definition TetOptimizerMesh.h:107
virtual bool split_adjust_position(size_t, const std::vector< Tuple > &)
Definition TetOptimizerMesh.h:548
int edge_incident_surface_face_count(const Tuple &e)
How many of the faces incident to edge e are on the tracked surface.
Definition TetOptimizerMesh.cpp:671
bool round_vertex(const size_t vid) override
Definition TetOptimizerMesh.h:259
uint32_t m_op_epoch
Definition TetOptimizerMesh.h:502
bool swap_edge_56_before(const Tuple &t) override
User specified preparations and desideratas for a 5-6 edge swap before changing the connectivity.
Definition TetOptimizerMeshSwaps.cpp:665
static constexpr double MAX_ENERGY
The sentinel get_quality returns for an element AMIPS cannot score.
Definition TetOptimizerMesh.h:117
virtual std::shared_ptr< SampleEnvelope > smoothing_containment_envelope(const size_t vid) const
Envelope the resulting surface triangles are checked against.
Definition TetOptimizerMesh.cpp:404
bool split_edge_before(const Tuple &t) override
User specified preparations and desideratas for an edge split before changing the connectivity.
Definition TetOptimizerMeshSplit.cpp:94
bool swap_edge_after(const Tuple &t) override
User specified modifications and desideratas for after a 3-2 edge swap.
Definition TetOptimizerMeshSwaps.cpp:289
std::set< simplex::Edge > m_force_split_edges
Definition TetOptimizerMesh.h:148
bool smooth_before(const Tuple &t) override
User specified preparations and desideratas for smoothing a vertex.
Definition TetOptimizerMesh.cpp:326
optimization::SmoothRejectCounters m_smooth_rejects
Why smoothing attempts were refused, reported once per pass.
Definition TetOptimizerMesh.h:139
size_t collapse_all_edges_impl(bool is_limit_length, int lock_ring, size_t max_passes=0, bool exact_ball_lock=false)
Definition TetOptimizerMeshCollapse.cpp:24
size_t coarsen_mesh()
Coarsen the mesh without letting the max energy rise.
Definition TetOptimizerMeshCollapse.cpp:567
bool round(const Tuple &v)
Round a vertex position to floating point, if that inverts no incident tet.
Definition TetOptimizerMesh.cpp:566
bool smooth_vertex_reversible(size_t vid, CoarsenScratch &scr)
One smoothing attempt on vid, restoring everything it wrote if it is rejected.
Definition TetOptimizerMeshCollapse.cpp:526
virtual std::tuple< double, double > optimization_quality_stats()
Definition TetOptimizerMesh.cpp:28
bool coarsen_collapse_edge(const Tuple &e, std::vector< Tuple > &new_tets)
One collapse under the coarsening rules, outside a coarsening pass.
Definition TetOptimizerMeshCollapse.cpp:555
double m_s_amips
Definition TetOptimizerMesh.h:128
double active_quality_threshold() const
Cell-quality threshold above which a tet is "active" (worth operating on) for the skip-good-regions f...
Definition TetOptimizerMesh.h:333
virtual bool split_before_cells(const Tuple &, const std::vector< Tuple > &)
Cache application cell data before a split. TetWild needs none; SimWild caches tags.
Definition TetOptimizerMesh.h:540
const std::vector< size_t > & collect_vertex_ball(const size_t *seeds, size_t n_seeds, int n, CoarsenScratch &scr) const
Vertices within n edges of seeds, in BFS order. Uses coarsen_scratch.
Definition TetOptimizerMeshCollapse.cpp:454
virtual bool swap_before_interior(const std::vector< size_t > &)
Application data attached to the old cells. TetWild has none; SimWild caches tags.
Definition TetOptimizerMesh.h:556
OptimizerParameters & m_params
Definition TetOptimizerMesh.h:121
bool swap_edge_56_accept_case(const std::array< size_t, 3 > &new_face) override
Filter which of the 5-6 orientations may be chosen.
Definition TetOptimizerMeshSwaps.cpp:270
std::shared_ptr< SampleEnvelope > m_envelope
Surface envelope: what a surface vertex is pulled toward and checked against.
Definition TetOptimizerMesh.h:124
bool split_edge_after(const Tuple &loc) override
This function computes the attributes for the added simplices. User specified modifications and desid...
Definition TetOptimizerMeshSplit.cpp:182
bool vertex_is_rounded(const size_t vid) const override
Whether this vertex's double position is currently trusted.
Definition TetOptimizerMesh.h:252
bool face_is_on_surface(const size_t fid) const override
Is a face part of the substructure.
Definition TetOptimizerMesh.cpp:729
bool swap_edge_44_accept_case(const std::array< size_t, 2 > &new_edge) override
Filter which of the 4-4 orientations may be chosen.
Definition TetOptimizerMeshSwaps.cpp:261
bool smooth_after(const Tuple &t) override
User specified modifications and desideratas for after smoothing a vertex.
Definition TetOptimizerMesh.cpp:340
Definition Simplex.hpp:46
Definition enumerable_thread_specific.hpp:26
Definition AttributeCollection.hpp:36
The parameters tetwild, triwild and simwild all share.
Definition OptimizerParameters.h:29
Per-thread buffers for the coarsening composite, so it allocates nothing.
Definition TetOptimizerMesh.h:616
What coarsen_mesh() achieved, for the run report. Zeroed when the pass is off.
Definition TetOptimizerMesh.h:376
Definition TetOptimizerMesh.h:587
double region_max_rel_before
Definition TetOptimizerMesh.h:599
Definition TetOptimizerMesh.h:576
Definition TetOptimizerMesh.h:565
Definition TetOptimizerMesh.h:48
size_t partition_id
Required for multi-threading.
Definition TetOptimizerMesh.h:72
size_t m_order
Definition TetOptimizerMesh.h:66
bool m_is_rounded
Definition TetOptimizerMesh.h:56
Why a smoothing attempt was refused, counted per pass.
Definition SmoothVertex.hpp:31
A topological fingerprint of a tracked surface inside a tet mesh.
Definition SurfaceTopology.hpp:23