B&S2026 Figure 2 Trilinos-side eigenvalues
Please start work on TASK-023.
Started TASK-023 and assigned it to @pi.
Current implementation plan is already recorded on the task:
- Inspect LOCA C++ model, Sacado residual Jacobian path, CMake/Trilinos configuration, and Teuchos availability.
- Add separate C++ physical vector-field function matching Python physical ODE RHS.
- Add Sacado physical Jacobian path with respect to physical
(n, q, s). - Implement backend dense eigenvalue computation via
Teuchos::LAPACKGEEV, documenting fallback if needed. - Extend Figure 2 LOCA output with canonical physical eigenvalues/regime/stability and separate Jacobian diagnostics.
- Add tests comparing LOCA Jacobian/eigenvalues to Python reference and smoke-test output schema/range.
Show remaining 2 lines
Please confirm this plan, and I’ll proceed with implementation.
Go ahead (remember that the Trilinos CMake settings are in loca/CMakeLists.txt).
Completed TASK-023 and marked it Done.
Changed:
loca/include/bergner_spichtinger_2026_loca/model.hpp- Added separate physical vector field.
- Added Sacado physical Jacobian for
(n, q, s). loca/src/model_cli.cpp- Added
physical-rhs,physical-jacobian, andeigenvaluesCLI commands. - Added Teuchos::LAPACK
GEEVeigenvalue workflow. - Added canonical eigenvalue ordering, regime, and stability classification.
Show remaining 11 lines
episodes/005-figure2-eigenvalues/scripts/run_loca_figure2_eigenvalues.py- New LOCA Figure 2 orchestration script.
- Writes dense 400+ point branch/eigenvalue outputs and separate physical-Jacobian diagnostics.
- Tests:
tests/test_loca_model_core.pytests/test_episode5_loca_figure2.py
Validation:
uv run pytest -q- Result:
70 passed, 1 warning
Warning is the existing Python Figure 2 overflow RuntimeWarning during continuation probing.
There is no output from the LOCA code yet. Is that intentional?
Not intentional as a final state — I had only smoke-tested the LOCA output under [REDACTED_TEMP_PATH], not written the episode-local outputs.
I’ve now run the default LOCA Figure 2 script. Outputs are at:
episodes/005-figure2-eigenvalues/outputs/figure2_loca_eigenvalues/
Files:
loca_figure2_branch_points.csvloca_figure2_eigenvalues.csvloca_figure2_physical_jacobian_diagnostics.csv
Show remaining 6 lines
loca_figure2_summary.jsonrun_metadata.jsonraw/bs2026_loca_figure2_raw.csvraw/bs2026_loca_figure2.stderr.txt
The warning during generation is the same existing Python-side overflow warning from initial equilibrium probing, not a LOCA failure.
Can you generate plots for the AUTO and LOCA outputs like you did for the Python version?
Yes — generated them.
New plots:
episodes/005-figure2-eigenvalues/outputs/figure2_auto_eigenvalues/auto_figure2_eigenvalues.pngepisodes/005-figure2-eigenvalues/outputs/figure2_loca_eigenvalues/loca_figure2_eigenvalues.png
I also added a reusable plotting script:
episodes/005-figure2-eigenvalues/scripts/plot_figure2_eigenvalue_outputs.py
Usage:
Show remaining 6 lines
uv run python episodes/005-figure2-eigenvalues/scripts/plot_figure2_eigenvalue_outputs.py auto
uv run python episodes/005-figure2-eigenvalues/scripts/plot_figure2_eigenvalue_outputs.py loca
It uses the same Figure 2-style real/imag tracked-eigenvalue layout as the Python plot.
OK, good. Please commit the changes.
Committed changes.
Commit:
f79e1a4 Implement LOCA Figure 2 eigenvalue workflow
Working tree is clean.