Repository navigation
GPEC - BUG FIX - Use each surface's own R for |grad psi| in xbnormal - #356
Merged
Merged
Conversation
gpout_xbnormal formed |grad psi| from the shared r(:) without setting it, so each surface used whatever surface the previous caller left there: usually one surface behind, and on the first surface whatever gpout_singfld left. Set r(itheta) from the surface's own rs, as the gpeq_* routines do. xno, bno and bwp move by up to 0.4% near the edge and no longer depend on singfld_flag. Supersedes #353. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VMDGyfQKRZQMdk3NJXsKQE
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.
gpout_xbnormalbuilds |∇ψ| (delpsi, which normalizesxno,bnoandbwp) from the shared surface arrayr(:)but never sets it. Each surface therefore used whatever surface the previous caller left inr. Inside the loop that is usually the previous surface, becausegpeq_bcoordsresetsrwhen it transforms coordinates. On the first surface it was whatevergpout_singfldhad left, which is the symptom @krystophny found in #353, where switchingsingfld_flagchanged thexbnormaloutput.This adds one line that sets
r(itheta)from the surface's ownrs(istep,itheta)before it is used, the same way thegpeq_*routines setrthemselves. It is the only routine ingpec/that readrwithout setting it. This supersedes #353, which saved and restoredraroundgpout_singfld. That made the output independent of the flag, but it still used the wrong surface's R.Checks (gfortran -O3, develop vs this branch):
All runs terminate normally. The
xbnormaloutputs of every run move slightly, so this needs a line in the 1.6.0 release notes.Closes #353.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VMDGyfQKRZQMdk3NJXsKQE