Skip to content

Initialize the coarse retry after a bad initial Jacobian - #29

Open
philippbogdan wants to merge 1 commit into
jonathanschilling:masterfrom
philippbogdan:fix/initial-jacobian-bootstrap
Open

Initialize the coarse retry after a bad initial Jacobian#29
philippbogdan wants to merge 1 commit into
jonathanschilling:masterfrom
philippbogdan:fix/initial-jacobian-bootstrap

Conversation

@philippbogdan

Copy link
Copy Markdown

An initial bad Jacobian leaves ns_old at the failed grid. The fallback selects nsval=3, but the ns_old <= nsval guard then skips initialization. Reset the radial state and restore the original input axis before the coarse attempt, and limit this recovery to the first requested grid when it has more than three surfaces.

The new regression uses the fixed boundary of QUASR configuration 14802. The unmodified solver stops at ns=8 with ier_flag=1; the repaired solver follows 8 -> 3 -> 8 -> 16 -> 31 and reaches all three requested force tolerances of 1e-9. The test checks the actual residuals and final resolution as well as the single coarse stage.

Validation:

  • Both CTests pass. Running the same recovery test against the unmodified executable fails because no three-surface stage was initialized.
  • All 45 first-iteration coarse diagnostic arrays match an explicit cold-three run using the original input axis exactly.
  • Solovev, circular-tokamak and up/down-asymmetric controls retain identical numerical NetCDF outputs.
  • Initial-three, failed-retry and later-stage failure controls retain bounded retry behaviour.

Built with GNU Fortran 16.2.0 and NetCDF-Fortran 4.6.4 on macOS arm64. The fixture records its QUASR provenance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant