Clear unavailable gravity measurements before each attempt
This commit is contained in:
@@ -33,9 +33,30 @@ Two separate requirements remain:
|
||||
|
||||
Diagnostics retain the raw affine discrepancy, raw target defect, arithmetic
|
||||
estimate, and resulting target threshold separately. Nonfinite or negative
|
||||
norm inputs fail the assessment. A failed preparation leaves these measurements
|
||||
unavailable rather than reusing the preceding trial's values. Diagnostics also
|
||||
report whether compact gravity operator and inverse applications were selected.
|
||||
norm inputs fail the assessment. Each gravity attempt clears its correction
|
||||
norm and prepared-assessment measurements before the raw candidate preparation.
|
||||
An early preparation or inner-solve failure therefore leaves unmeasured values
|
||||
as NaN, rather than reusing the preceding attempt's values. Initial gravity
|
||||
completion follows the same rule. A failure in the corrected preparation can
|
||||
still retain that attempt's measured correction norm.
|
||||
|
||||
The last completed inner solve's true defect and cumulative solve/iteration/
|
||||
failure/time counters have a different lifetime: a candidate that fails before
|
||||
calling the inner solver does not erase them. A line-search candidate rejected
|
||||
before invoking the gravity strategy does not begin an auxiliary attempt and
|
||||
leaves all last-attempt diagnostics intact. Diagnostic consumers must distinguish
|
||||
these meanings. Diagnostics also report whether compact gravity operator and
|
||||
inverse applications were selected.
|
||||
|
||||
`lastLinearReportSpace` labels the retained `lastLinearSolve` report from the
|
||||
outer strategy's `Solve`. A later positivity-direction relift can fail while
|
||||
that outer report remains converged in reduced coordinates. The evaluation then
|
||||
reports `linear_solve_failure`; the auxiliary failure is reflected by the gravity
|
||||
failure counter and last completed inner true defect. Changing only the report
|
||||
space would incorrectly relabel the retained reduced-system norms. The full
|
||||
lifted Newton gate precedes feasibility repair; a repaired direction must pass
|
||||
its relift, descent check, and nonlinear acceptance, but is not claimed to solve
|
||||
the original Newton equations.
|
||||
|
||||
Three focused tests, appended to `tests/solver/gravity_reduction.cpp`, cover
|
||||
large cancelling contributions, rejection of defects beyond either gate,
|
||||
@@ -43,3 +64,17 @@ nonfinite measurements, and scaling over twenty-four orders of magnitude.
|
||||
The real stellar rejection must still be reproduced and reassessed; passing a
|
||||
synthetic arithmetic test alone establishes neither the hypothesis nor stellar
|
||||
convergence.
|
||||
|
||||
|
||||
## Reporting regression
|
||||
|
||||
Branch `research/gravity-trial-diagnostics-20260917` moves this reset to a shared
|
||||
attempt-entry helper, used by both trial strategies and initial completion.
|
||||
Existing production rollback fixtures now assert finite measurements after a
|
||||
completed curvature assessment, and unavailable prepared/correction fields after
|
||||
a failed initial inner solve while retaining its finite true defect and counters.
|
||||
No new stellar fixture or numerical behavior is introduced. The source-level
|
||||
success-then-early-failure path is covered by the unconditional shared reset;
|
||||
a separate expensive campaign is not justified for this reporting change.
|
||||
Build/run of the added assertions is deferred until the running immutable
|
||||
production campaign completes.
|
||||
|
||||
Reference in New Issue
Block a user