Mesh study
The rows of the fixed table are described on the Benchmarks page, with the rule for comparing methods (LUSolver, backend :compiled; "–" marks what a row does not have). The SVG figures are written to the results folder by each script; the ones shown here are copies in docs/src/assets/benchmarks.
The MBB beam of the compliance benchmarks (rmin = 0.06) on 120 × 40, 240 × 80 and 480 × 160, and the cantilever (0, 2) × (0, 1) clamped on x = 0 with a unit traction (0, −1) on x = 2, |y − ½| ≤ 0.1 (plane stress, ν = 0.3, volume fraction 0.5, rmin = 0.048) on 100 × 50, 200 × 100 and 400 × 200, and the heat conduction problem H0 of the heat benchmarks (rmin = 0.04, kmin = 1e-3, volume fraction 0.4) on 100 × 100, 200 × 200 and 400 × 400, with density SiMPL (P0) and the reaction–diffusion level set; τ = 2e-4 (κ = τ|D|: 6e-4 on the MBB, 4e-4 on the cantilever, 2e-4 on the heat problem), Emin = 1e-3, loads and volume the same on every mesh (on 50 × 50 density SiMPL ends the heat problem stalled, so its coarsest mesh is 100 × 100). Every design is read as 0/1 keeping the volume, prolonged exactly to h/4 and evaluated there (mesh_comparison); the short table gives also J_bin on its own mesh, which mixes the change of the design with the discretisation error of the state (they go in opposite directions: on its own mesh the h/2 designs looked within 0.2–0.6 % of h/4). Rule (between h/2 and h/4): J_bin on h/4 within 1 %, the same number of holes of at least π(rmin/2)², iterations within ± 25 %; the run on h/4 is the reference. validation/mesh_study.jl.
| problem | method | mesh | J | J_bin (own mesh) | J_bin on h/4 | vs h/4 (on h/4) | cells changing phase on h/4 | perimeter | holes | V_bin (½) | iterations |
|---|---|---|---|---|---|---|---|---|---|---|---|
| MBB | density SiMPL, P0 | 120 × 40 | 185.607 | 167.586 | 171.021 | +2.99 % | 5.09 % | 13.08 | 3 | 0.5054 | 37 |
| MBB | density SiMPL, P0 | 240 × 80 | 185.212 | 166.186 | 167.398 | +0.81 % | 1.88 % | 14.74 | 4 | 0.5044 | 43 |
| MBB | density SiMPL, P0 | 480 × 160 | 185.444 | 166.054 | 166.054 | +0.00 % | 0.00 % | 15.06 | 5 | 0.5041 | 47 |
| MBB | reaction–diffusion level set, Ersatz() | 120 × 40 | 161.394 | 166.523 | 172.373 | +6.53 % | 16.03 % | 15.48 | 5 | 0.4975 | 74 |
| MBB | reaction–diffusion level set, Ersatz() | 240 × 80 | 160.35 | 162.42 | 164.202 | +1.48 % | 5.76 % | 17.68 | 7 | 0.5008 | 67 |
| MBB | reaction–diffusion level set, Ersatz() | 480 × 160 | 160.934 | 161.804 | 161.804 | +0.00 % | 0.00 % | 17.71 | 7 | 0.4995 | 69 |
| cantilever 2×1 | density SiMPL, P0 | 100 × 50 | 2.70416 | 2.44319 | 2.48486 | +3.05 % | 2.83 % | 10.52 | 3 | 0.5032 | 34 |
| cantilever 2×1 | density SiMPL, P0 | 200 × 100 | 2.68632 | 2.4207 | 2.43393 | +0.94 % | 0.92 % | 10.56 | 3 | 0.5018 | 33 |
| cantilever 2×1 | density SiMPL, P0 | 400 × 200 | 2.68144 | 2.41126 | 2.41126 | +0.00 % | 0.00 % | 10.56 | 3 | 0.5018 | 34 |
| cantilever 2×1 | reaction–diffusion level set, Ersatz() | 100 × 50 | 2.38004 | 2.43482 | 2.49869 | +4.31 % | 6.17 % | 12.8 | 6 | 0.4988 | 68 |
| cantilever 2×1 | reaction–diffusion level set, Ersatz() | 200 × 100 | 2.38044 | 2.40529 | 2.42601 | +1.27 % | 2.37 % | 12.98 | 6 | 0.4990 | 64 |
| cantilever 2×1 | reaction–diffusion level set, Ersatz() | 400 × 200 | 2.38388 | 2.39548 | 2.39548 | +0.00 % | 0.00 % | 12.76 | 6 | 0.5000 | 57 |
| heat H0 | density SiMPL, P0 | 100 × 100 | 0.126796 | 0.114227 | 0.114806 | +0.98 % | 0.84 % | 4.4 | 0 | 0.4004 | 26 |
| heat H0 | density SiMPL, P0 | 200 × 200 | 0.126588 | 0.113886 | 0.114088 | +0.35 % | 0.42 % | 4.42 | 0 | 0.4004 | 26 |
| heat H0 | density SiMPL, P0 | 400 × 400 | 0.126551 | 0.113694 | 0.113694 | +0.00 % | 0.00 % | 4.415 | 0 | 0.4004 | 27 |
| heat H0 | reaction–diffusion level set, Ersatz() | 100 × 100 | 0.113232 | 0.114149 | 0.114738 | +1.16 % | 0.95 % | 4.78 | 0 | 0.3996 | 55 |
| heat H0 | reaction–diffusion level set, Ersatz() | 200 × 200 | 0.113244 | 0.113652 | 0.11386 | +0.38 % | 0.44 % | 4.79 | 0 | 0.3998 | 57 |
| heat H0 | reaction–diffusion level set, Ersatz() | 400 × 400 | 0.113217 | 0.113427 | 0.113427 | +0.00 % | 0.00 % | 4.79 | 0 | 0.4000 | 59 |
- MBB, density SiMPL, P0: h/2 against h/4 on h/4: J_bin +0.81 % (≤ 1 %: yes), holes 4 / 5 (same: no), iterations 43 / 47, -8.5 % (± 25 %: yes), 1.88 % cells change: rule not met (as documented)
- MBB, reaction–diffusion level set, Ersatz(): h/2 against h/4 on h/4: J_bin +1.48 % (≤ 1 %: no), holes 7 / 7 (same: yes), iterations 67 / 69, -2.9 % (± 25 %: yes), 5.76 % cells change: rule not met (as documented)
- cantilever 2×1, density SiMPL, P0: h/2 against h/4 on h/4: J_bin +0.94 % (≤ 1 %: yes), holes 3 / 3 (same: yes), iterations 33 / 34, -2.9 % (± 25 %: yes), 0.92 % cells change: rule met (as documented)
- cantilever 2×1, reaction–diffusion level set, Ersatz(): h/2 against h/4 on h/4: J_bin +1.27 % (≤ 1 %: no), holes 6 / 6 (same: yes), iterations 64 / 57, +12.3 % (± 25 %: yes), 2.37 % cells change: rule not met (as documented)
- heat H0, density SiMPL, P0: h/2 against h/4 on h/4: J_bin +0.35 % (≤ 1 %: yes), holes 0 / 0 (same: yes), iterations 26 / 27, -3.7 % (± 25 %: yes), 0.42 % cells change: rule met (as documented)
- heat H0, reaction–diffusion level set, Ersatz(): h/2 against h/4 on h/4: J_bin +0.38 % (≤ 1 %: yes), holes 0 / 0 (same: yes), iterations 57 / 59, -3.4 % (± 25 %: yes), 0.44 % cells change: rule met (as documented)
On the common mesh h/4 the rule is met by density SiMPL on the cantilever only (J_bin +0.94 %, the same 3 holes, 0.9 % of the cells change). On the MBB beam density SiMPL meets the 1 % (+0.81 %) but not the holes: a small hole under the load is below π(rmin/2)² on h/2 and above it on h/4 (4 against 5). The reaction–diffusion level set does not meet the 1 %: +1.48 % on the MBB beam and +1.27 % on the cantilever, with 5.8 % and 2.4 % of the cells changing phase between h/2 and h/4: with a fixed τ its members keep moving under refinement (on h, +6.5 % and +4.3 %). These outcomes are results of the study, recorded in the script, which fails only if one of them changes. The heat problem H0 is the first of the bank where both methods meet the rule: J_bin +0.35 % (density SiMPL) and +0.38 % (the level set) between h/2 and h/4, 0.4 % of the cells changing phase, no holes on any mesh: one concentrated heat input and two thick arms, no member that the mesh keeps refining. Evaluated on their own meshes, as in the first version of this study, the same designs looked within 0.2–0.6 % of h/4: the discretisation error of the state, of the opposite sign, hid most of the difference.
The outcome of the level set against the 1 % depends on the family of meshes: nested families give +1.2–1.5 % between h/2 and h/4 (+1.48 % here, +1.23 % on the Delaunay triangles of Gmsh refined uniformly of the unstructured meshes), meshes of Gmsh generated anew at each size +0.90 % (a probe made when designing the unstructured example, 2026-11-29, Apple M5 Max, 4 threads, Julia 1.13): the 1 % lies within the spread between meshes.
The fixed report table (J_bin on the own mesh; vs ref against the design on h/4 on its mesh):
Apple M5 Max, 4 threads, Julia 1.13.0 · commit 3b98442 · 2026-11-30 17:17.
| case | variant | J | J_bin | ref | vs ref | V | V_bin | grey | perimeter | holes | iterations | solves state/adjoint/filter/step | time (s) | time ÷ state solves (s) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MBB 120×40 | density SiMPL, P0 | 185.607 | 167.586 | 166.054 | +0.92 % (J_bin) | 0.5000 | 0.5000 | 0.206 | 13.08 | 3 | 37 (converged, objective_range) | 42/0/79/0 | 1.1 | 0.0255 |
| MBB 240×80 | density SiMPL, P0 | 185.212 | 166.186 | 166.054 | +0.08 % (J_bin) | 0.5000 | 0.5000 | 0.207 | 14.74 | 4 | 43 (converged, objective_range) | 48/0/91/0 | 4.4 | 0.0927 |
| MBB 480×160 | density SiMPL, P0 (h/4: reference) | 185.444 | 166.054 | 166.054 | +0.00 % (J_bin) | 0.5000 | 0.5000 | 0.206 | 15.06 | 5 | 47 (converged, objective_range) | 57/0/104/0 | 21.6 | 0.378 |
| MBB 120×40 | reaction–diffusion level set, Ersatz() | 161.394 | 166.523 | 161.804 | +2.92 % (J_bin) | 0.5000 | 0.5000 | 0.070 | 15.48 | 5 | 74 (converged, all) | 75/0/0/74 | 2.2 | 0.0295 |
| MBB 240×80 | reaction–diffusion level set, Ersatz() | 160.35 | 162.42 | 161.804 | +0.38 % (J_bin) | 0.5000 | 0.5000 | 0.040 | 17.68 | 7 | 67 (converged, all) | 68/0/0/67 | 7.4 | 0.108 |
| MBB 480×160 | reaction–diffusion level set, Ersatz() (h/4: reference) | 160.934 | 161.804 | 161.804 | +0.00 % (J_bin) | 0.5000 | 0.5000 | 0.020 | 17.71 | 7 | 69 (converged, all) | 70/0/0/69 | 30.8 | 0.441 |
| cantilever 2×1 100×50 | density SiMPL, P0 | 2.70416 | 2.44319 | 2.41126 | +1.32 % (J_bin) | 0.5000 | 0.5000 | 0.185 | 10.52 | 3 | 34 (converged, objective_range) | 37/0/71/0 | 1.0 | 0.0267 |
| cantilever 2×1 200×100 | density SiMPL, P0 | 2.68632 | 2.4207 | 2.41126 | +0.39 % (J_bin) | 0.5000 | 0.5000 | 0.173 | 10.56 | 3 | 33 (converged, objective_range) | 36/0/69/0 | 3.2 | 0.0896 |
| cantilever 2×1 400×200 | density SiMPL, P0 (h/4: reference) | 2.68144 | 2.41126 | 2.41126 | +0.00 % (J_bin) | 0.5000 | 0.5000 | 0.170 | 10.56 | 3 | 34 (converged, objective_range) | 37/0/71/0 | 14.4 | 0.389 |
| cantilever 2×1 100×50 | reaction–diffusion level set, Ersatz() | 2.38004 | 2.43482 | 2.39548 | +1.64 % (J_bin) | 0.5000 | 0.5000 | 0.067 | 12.8 | 6 | 68 (converged, all) | 69/0/0/68 | 2.0 | 0.029 |
| cantilever 2×1 200×100 | reaction–diffusion level set, Ersatz() | 2.38044 | 2.40529 | 2.39548 | +0.41 % (J_bin) | 0.4999 | 0.5000 | 0.033 | 12.98 | 6 | 64 (converged, all) | 65/0/0/64 | 7.2 | 0.111 |
| cantilever 2×1 400×200 | reaction–diffusion level set, Ersatz() (h/4: reference) | 2.38388 | 2.39548 | 2.39548 | +0.00 % (J_bin) | 0.4999 | 0.5000 | 0.016 | 12.76 | 6 | 57 (converged, all) | 58/0/0/57 | 27.0 | 0.465 |
| heat H0 100×100 | density SiMPL, P0 | 0.126796 | 0.114227 | 0.113694 | +0.47 % (J_bin) | 0.4000 | 0.4000 | 0.127 | 4.4 | 0 | 26 (converged, objective_range) | 30/0/56/0 | 0.7 | 0.024 |
| heat H0 200×200 | density SiMPL, P0 | 0.126588 | 0.113886 | 0.113694 | +0.17 % (J_bin) | 0.4000 | 0.4000 | 0.124 | 4.42 | 0 | 26 (converged, objective_range) | 28/0/54/0 | 2.4 | 0.0843 |
| heat H0 400×400 | density SiMPL, P0 (h/4: reference) | 0.126551 | 0.113694 | 0.113694 | +0.00 % (J_bin) | 0.4000 | 0.4000 | 0.122 | 4.415 | 0 | 27 (converged, objective_range) | 28/0/55/0 | 8.3 | 0.296 |
| heat H0 100×100 | reaction–diffusion level set, Ersatz() | 0.113232 | 0.114149 | 0.113427 | +0.64 % (J_bin) | 0.4000 | 0.4000 | 0.026 | 4.78 | 0 | 55 (converged, all) | 56/0/0/55 | 1.3 | 0.0234 |
| heat H0 200×200 | reaction–diffusion level set, Ersatz() | 0.113244 | 0.113652 | 0.113427 | +0.20 % (J_bin) | 0.3999 | 0.4000 | 0.013 | 4.79 | 0 | 57 (converged, all) | 58/0/0/57 | 5.5 | 0.0947 |
| heat H0 400×400 | reaction–diffusion level set, Ersatz() (h/4: reference) | 0.113217 | 0.113427 | 0.113427 | +0.00 % (J_bin) | 0.4000 | 0.4000 | 0.006 | 4.79 | 0 | 59 (converged, all) | 60/0/0/59 | 21.9 | 0.365 |