Untangling

A block with a few inverted hexes, repaired by the optimizer’s delta continuation, the untangle_schedule preset.

input 12 Laplace 0 optimize δ=0 12 untangle preset 0 suggested 0
Inverted hexes (fewer is better)

Key points

  • The exact metric cannot untangle: optimize(delta=0) has a wall at zero Jacobian and leaves all 12 hexes inverted.

  • untangle_schedule is a preset of optimize, not a separate untangler: 5 optimize stages with delta shrinking from 1 to 0.01; it clears all 12 inverted hexes (minimum scaled Jacobian 0.98).

  • On this input Laplace clears them too (minimum 0.85, 0.02 s): a few displaced vertices in an otherwise clean block are what element averaging repairs best.

  • suggest_schedule adds the preset by itself when the input has inverted hexes: 27 stages, minimum scaled Jacobian 0.98.

The numbers

method

stages

inverted

min SJ

mean SJ

time (s)

input

—

12

-0.9649

0.8681

—

Laplace

1

0

0.8497

0.9845

0.02

optimize δ=0

1

12

-0.6455

0.8290

1.45

untangle preset

5

0

0.9802

0.9893

0.49

suggested

27

0

0.9802

0.9893

0.90

Bold: the best value in each column among the results (highest scaled Jacobian; lowest count, objective, time, change or distance); the input row is for reference.

Times: a laptop, running serial.

Run python examples/smoother/hex/05_untangle.py to reproduce; it prints these numbers.