ForceFreeStates - BUG - Fixed-boundary zero-crossing check can reject genuine Newcomb crossings

Aperta
#558 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
julia

Direzione di ricerca

Start with src/ForceFreeStates/FixedBoundaryStability.jl:71-86 and compare its crossing check with the Fortran behavior documented in GPEC#292. Then run a fixed-boundary Solov'ev q0 scan at default and tightened tolerances, including a pole case. Done means Julia finds the same genuine crossings at both tolerance settings while still rejecting the pole.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

check_for_zero_crossings! (src/ForceFreeStates/FixedBoundaryStability.jl:71-86) is a line-for-line port of the Fortran ode_output_monitor test. When crit changes sign between two accepted ODE steps, it interpolates u linearly to the estimated root and accepts the crossing only if the midpoint value lies between the endpoints and |crit_mid| < 0.5*min(|crit|,|crit_prev|). Accepted steps can be long where crit is strongly nonlinear, so a genuine Newcomb zero crossing can fail this test and be discarded.

In the Fortran code this defect is reproduced and documented in GPEC#292: for fixed-boundary Solov'ev cases near q0 ≈ 1.03, DCON misses crossings at its default tolerances and finds them only after the tolerances are tightened. The Julia check has the same logic, so the same failure is expected, but I have not yet run the Julia q0 scan.

Simply relaxing the magnitude test is not the fix, because the sign change can also come from a pole of crit, which must not be counted. A robust check brackets the root, for example by bisection on the integrator's dense output, and distinguishes a zero (|crit| decreasing towards the bracket point) from a pole (|crit| growing).

Acceptance: a fixed-boundary Solov'ev q0 scan where Julia reports the same crossings at default and at tightened tolerances, with a pole case that is still rejected.

Chris&AI

Lingua principale
Julia
Stelle
11
Fork
7
Merge medio
4g 3h
PR unite (30g)
70

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di OpenFUSIONToolkit/GPEC

Tutte le issue di OpenFUSIONToolkit/GPEC

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.