Profile-driven (thin-ribs: 76% of the improvement in the topological
operations, most of it in face removal walking whole edge rings to find
one neighbour; pinhole-block: 44% in the smoothing passes).
Same results, less work:
- face removal finds the sandwiched face across a ring edge through the
tetrahedron it already holds (O(1) instead of an edge ring), keeps the
candidate tetrahedra of ring edges between rounds and updates the
removed worst incrementally;
- Klincsek's table for edge removal starts at the quality to beat, so
triangles that cannot help are never evaluated;
- a change clock per vertex: a topological operation (per tetrahedron,
per edge, per face and side) or a smoothing that failed is not tried
again until a tetrahedron it reads changes (exact: the operations are
functions of that region; checked by re-running them);
- the quality of a live tetrahedron is cached per slot until one of its
vertices is touched;
- smoothing line searches stop at the first tetrahedron that does not
beat the worst, and gradients are computed only near the worst;
- the journal saves the free list's tail instead of the whole list.
For the clock to be exact, the quality is the same bits for every
listing of a tetrahedron with the same orientation (corners in a
canonical even order), and a closed edge ring starts at its smallest
vertex.
Changed results:
- smoothing uses the analytic gradient of the smallest dihedral sine
(Klingner and Shewchuk 2007 §3.1; Freitag and Ollivier-Gooch 1997)
instead of central differences (kept for flat or inverted
tetrahedra);
- the composite insertion runs its topological passes on the new
vertex's tetrahedra below the threshold, and smooths the neighbours
whose star has one, as the passes do.
Tests: analytic gradient against central differences, quality the same
for every even reordering, cached qualities equal fresh ones after
improvement, rollbacks restore every slot; the washer fingerprint moves
(the same on arm64 and x86-64).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
The improvement objective was the smallest dihedral sine, which misses
needles: every dihedral angle fine while a corner is nearly flat, so
the corpus meshes had scaled Jacobians down to 0.01-0.07. The objective
is now the smaller of the dihedral sine and the scaled Jacobian at the
worst corner (the measure analysts check, Knupp 2001), weighted so a
Jacobian of 0.3 (the skill's limit) counts as a 30 degree dihedral
angle (the schedule's target): the Jacobian decides only near that
limit. The existing edge removal, multi-face removal, smoothing and
insertion then remove the needles.
Skill tet10 min SJ: sphere-on-plate 0.092 -> 0.335, filleted-bracket
0.021 -> 0.318 (both pass, nothing marked). Default-size tet10:
thin-ribs 0.240, shallow-groove 0.321, rounded-box 0.311.
The strong-relaxation test relaxes below 0.45: nothing is left below
0.3. Literature note in docs/meshing/literature.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo