Demo: a thin designed layer¶
The block of the hex page Keeping a thin layer (a designed 0.02-thick first layer under a perturbed interior,
boundary frozen), smoothed three ways: the native optimizer, TMOP with target="ideal", and TMOP with
target="input" and the layer named designed. The stage and its knobs: TMOP via the MFEM backend.
Key points¶
The cube-seeking methods thicken the designed layer: the native optimizer by +137 % on average (up to 271 %), TMOP
target="ideal"by +174 % (up to 291 %).target="input"keeps the layer and repairs the interior: the first layer changes by -2.3 % on average (at most 4.7 %), and the minimum scaled Jacobian rises from 0.21 to 0.96, against 0.76 for the native optimizer and 0.71 forideal.Here
designedis not what holds the layer: the layer is already box-shaped, sotarget="input"alone asks for the same thing (withoutdesignedthe result differs by at most 1e-16).designedmatters when the bulk target would reshape the layer: withtarget="ideal"it holds the layer at -13.8 % instead of +174 %.
The numbers¶
Check a layer by its thickness: the scaled Jacobian reads 1 for a box-shaped hex of any aspect ratio.
variant |
first layer, mean change (%) |
max abs. change (%) |
inverted |
min SJ |
mean SJ |
time (s) |
|---|---|---|---|---|---|---|
input |
— |
— |
0 |
0.2129 |
0.7560 |
— |
native optimizer |
+137.4 |
271.1 |
0 |
0.7591 |
0.9004 |
0.57 |
TMOP ideal |
+173.6 |
291.4 |
0 |
0.7129 |
0.8841 |
0.41 |
TMOP input + designed |
-2.3 |
4.7 |
0 |
0.9597 |
0.9904 |
0.65 |
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 PYTHONPATH=. python examples/smoother/mfem/01_thin_layer.py (needs pip install nekmeshpy[smooth]); it prints
these numbers.