Report confinement over resolved orbits#491
Closed
krystophny wants to merge 1 commit into
Closed
Conversation
5 tasks
Member
Author
|
Superseded by the adversarially reviewed integration PR #492, which includes the resolved-population accounting together with the recovery signal it needs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Risk tier
Correctness contract
Intended behavior change
confined_fraction.datnow reports confinement conditional on numericallyresolved outcomes. Numerically fatal markers are excluded from both the
confined numerator and the denominator; column 4 records that resolved
denominator. Numerical fatalities are written as
NaNintimes_lost.dat.The SPECTRE RK and symplectic drivers now populate exit codes and unresolved
counts consistently, and restarts recognize completed wall-loss markers.
Behavior that must not change
Physical LCFS and wall losses remain in the resolved denominator. Completed
and intentionally skipped markers retain their existing confinement
semantics. This PR does not change an integrator, recovery policy, trajectory,
or physical loss decision.
Coordinate / unit conventions
No coordinate or unit convention changes. Loss times remain in seconds.
Numerical invariants
For a nonempty resolved population,
confined_fraction = N_confined / (N_confined + N_physical_loss).If no marker is resolved, both confined-fraction columns are
NaN. Numericalexit codes 101--105 always have a
NaNloss time and are never counted asconfined or physically lost.
Tests added
test_result_accountingcovers one confined marker, one physicalloss, one numerical fatality, the resolved denominator, numerical
NaN,and the zero-resolved case.
NaNtogether with anumerical exit code and compares the final fraction with the resolved
population.
fo checksuite.Golden-record impact
When a run contains numerical fatalities,
confined_fraction.datincreasesfrom a lower bound over the initial population to the conditional fraction
over resolved outcomes, and column 4 decreases by the unresolved count.
Runs without numerical fatalities are unchanged.
Failure modes considered
The implementation guards the zero-resolved denominator with
NaN, keepsphysical losses in the denominator, sanitizes stale finite loss times for
numerical exit codes at write time, and preserves wall-loss results across a
restart.
Manual validation
The focused accounting test passed in 0.06 s. The affected SPECTRE validation
passed in 25.66 s.
Verification
fo checkbuilt 176 modules and passed 85/85 tests in 280.2 s.git diff --checkpassed.fo lintreached the existing repository-widebaseline of 374 compiler warnings and reported zero unused imports.