Skip to content

doc: surface numerical ranking for 3D NS optimization (#86) - #92

Merged
dionhaefner merged 3 commits into
mainfrom
doc/ns3d-optimization-ranking
Jul 9, 2026
Merged

dionhaefner merged 3 commits into
mainfrom
doc/ns3d-optimization-ranking

Conversation

@andrinr

@andrinr andrinr commented Jun 29, 2026

Copy link
Copy Markdown
Collaborator

Draft / WIP — addresses #86. The logic is verified offline, but the rendered page can only be confirmed by regenerating against mosaic-results (not in this repo; produced in CI), so I'm opening this as a draft for a maintainer with the results data to validate.

Problem

The 3D Navier–Stokes Optimization section shows only the recovery_evolution.gif — no numerical results — making the runs "hard to judge" (per the issue).

Root cause

_rank_optimization() (docs/generate_results.py) recognised only final_error / final_drag / final_compliance. The 3D IC-recovery experiment records its objective as final_ic_error (navier_stokes_3d_grid/optimization.py:304). With no recognised key, the ranker returned None and the "Solver ranking" table was silently skipped — whereas the 2D drag problem (final_drag) renders its table fine.

Change

  • Add final_ic_error to _OPT_FINAL_KEYS at lowest priority, so 2D still selects final_drag first.
  • Add _OPT_METRIC_LABELS for a clean column header (Final IC recovery error).

Verified offline: against the 3D recovery metrics dict the ranker now selects final_ic_error; given both keys, 2D still picks final_drag.

On the convergence curves

The issue also asks for convergence curves. _plot_convergence_curves() already renders one panel per sweep value whenever any solver recorded per-iteration errors, so convergence_curves.png should appear on the next results regeneration — the committed results_ns_3d_grid.qmd is a stale 2026-06-15 snapshot. No plotting change made; please confirm the figure is emitted when you regenerate.

To verify

  1. Run / obtain the 3D recovery results.
  2. python docs/generate_results.py and check results_ns_3d_grid.qmd now has a Solver ranking table under the recovery experiment and embeds convergence_curves.png.

🤖 Generated with Claude Code

@PasteurBot

Copy link
Copy Markdown
Contributor

📊 View the full benchmark results

No benchmarks ran for this PR, so there is no status report.


@andrinr
andrinr marked this pull request as ready for review June 30, 2026 14:14
@andrinr andrinr added benchmark:solver Benchmark only the modified solver benchmark:none Skip benchmarks (maintainer trusts no answer-changing code) and removed benchmark:solver Benchmark only the modified solver labels Jun 30, 2026
@dionhaefner

Copy link
Copy Markdown
Contributor

Thanks @andrinr. While we're at it, is there a good way to re-name the "Recovery Constant Ic Bfgs Proj" section? Doesn't seem very informative at face value.

andrinr and others added 2 commits July 9, 2026 10:56
Addresses #86 (WIP — needs a benchmark run to verify the rendered page).

The 3D Navier-Stokes optimization section showed only the field-evolution
GIF, with no numerical results, because _rank_optimization() recognised
only final_error / final_drag / final_compliance. The 3D IC-recovery
experiment records its objective as `final_ic_error` (see
navier_stokes_3d_grid/optimization.py:304), so the ranker found no
recognised key, returned None, and the "Solver ranking" table was skipped
— while the 2D drag problem (final_drag) renders its table fine.

Add final_ic_error to _OPT_FINAL_KEYS (lowest priority, so 2D still picks
final_drag first) and give it a clean column label via a new
_OPT_METRIC_LABELS map.

Note on the convergence curves the issue also mentions:
_plot_convergence_curves() already renders one panel per sweep value
whenever any solver recorded per-iteration `errors`, so convergence_curves.png
should be produced on the next results regeneration (the committed qmd is a
stale 2026-06-15 snapshot). No plotting change needed there.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The results pages titled optimization sections by title-casing the raw
experiment key, e.g. "Recovery Constant Ic Bfgs Proj" — uninformative
(flagged in review). Map the optimization keys that title-case badly to
proper names in EXPERIMENT_LABELS:

  recovery_constant_ic_bfgs_proj -> Initial-Condition Recovery (L-BFGS)
  conductivity_recovery_bfgs     -> Conductivity Recovery (L-BFGS)
  drag_opt                       -> Drag Optimisation

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@andrinr
andrinr force-pushed the doc/ns3d-optimization-ranking branch from 7d3021e to fef6564 Compare July 9, 2026 08:57
@andrinr

andrinr commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator Author

@dionhaefner done

@dionhaefner
dionhaefner enabled auto-merge (squash) July 9, 2026 10:35
@dionhaefner
dionhaefner merged commit 639a1a3 into main Jul 9, 2026
13 checks passed
@dionhaefner
dionhaefner deleted the doc/ns3d-optimization-ranking branch July 9, 2026 11:00
@pasteurlabs pasteurlabs locked and limited conversation to collaborators Jul 9, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

benchmark:none Skip benchmarks (maintainer trusts no answer-changing code)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants