Preserve solved source distributions in propagators#159
Open
krystophny wants to merge 1 commit into
Open
Conversation
Member
Author
|
The corrected aCluster replay is complete: job 18572333 passes 12 focused tests, closes all 198 internal joins within 6.83e-15, and reproduces the saved stage-2 maps within 5.36e-15. The remaining periodic nullspace/closure defect is isolated in #160; this PR does not claim to fix or accept that seam. |
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.
The local solver stored source_p and source_m from the assembled right-hand side after the 2015 multispecies path moved the solved distribution to source_vector_all. Propagator reconstruction therefore combined solved boundary-response matrices with unsolved internal-source endpoints. Stage 1 was self-consistent with that saved map, but stage 2 solved a different map and produced percent-level internal jumps.
Read both outgoing source blocks from source_vector_all for the active species. This restores the documented propagator relation between incoming and outgoing distributions. It does not change the collision operator, source assembly, spatial or pitch discretization, convergence criteria, Fourier convention, CGS units, boundary conditions, ABI, or array layout.
An opt-in NEO2_INTERFACE_TRACE_FILE diagnostic records left and right kernel, assembled RHS, and solved-distribution rows under stable propagator, direction, force, Laguerre, and pitch identities. It allocates and writes nothing when disabled. Invalid shapes, nonfinite values, and I/O failures stop the diagnostic run.
At 480 spatial steps and eta_part=30, the corrected replay reproduces all 199 saved local propagator maps to 5.34e-15 relative. All 198 internal joins are continuous to 5.96e-15. The former 2.49% and 5.74% internal current jumps are gone. A separate 7.28e-4 periodic distribution residual remains because join_ends replaces one periodic equation with the Lorentz closure constraint; this PR does not change that nullspace treatment.
Verification
Test fails on integration head
Command:
FLUX_PUMPING_INTERFACE_TRACE=1 FLUX_PUMPING_NSTEP=480 FLUX_PUMPING_ETA_PART=30 python3 run_reconstruction.py
Observed at 73d6764:
incoming_replay_max_absolute_error: p=0, m=0
stage1_internal_map_max_relative_error: p=4.02e-15, m=7.27e-16
stage2_propagator_map_max_relative_error: p=3.85e-2, m=3.87e-2
one-sided current jumps: A1=2.49e-2, A2=5.74e-2
Test passes after fix
Commands and output:
fo test qflux_interface_diagnostic_test
qflux_interface_diagnostic_test PASS
Production replay at 130ea2c:
incoming_replay_max_absolute_error: p=0, m=0
stage1_internal_map_max_relative_error: p=4.23e-15, m=9.22e-16
stage2_propagator_map_max_relative_error: p=5.34e-15, m=3.85e-15
max internal solved-distribution mismatch: 5.96e-15
max internal current-contraction mismatch: 2.97e-15
qflux relative closure: A1=3.59e-15, A2=4.12e-16
artifacts: 199 reconstructed boundaries, 199 local-response files, 59,736 trace rows