Repository navigation
PENTRC - BUG FIX - Keep exact-zero omega_E controls exact in read_kin - #12
Draft
krystophny wants to merge 1 commit into
Draft
krystophny wants to merge 1 commit into
krystophny wants to merge 1 commit into
Conversation
read_kin replaced every zero omega_E knot by 1e-9 rad/s so that the wpfac rescaling, which divided by omega_E, would not produce NaN. A run with wefac = 0 therefore used omega_E = 1e-9 instead of zero. The rescaling is now the equivalent division-free welec + (wpfac-1)*(welec+wdian+wdiat), which keeps zeros and leaves omega_E unchanged for wpfac = 1.
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.
read_kinreplaces every zerowefac, andwpfacscales the total rotationwdian,wdiat). As a result, a run withwefac = 0andwpfac = 1usesThe rescaling now uses the equivalent form without the division, and the replacement and its warning are removed:
This keeps exact zeros, and with$\omega_E$ bit-for-bit unchanged; the old expression changed it by rounding.
wpfac = 1it leavesregression/test/pentrc_zero_omega_e.f90readsdocs/examples/regression_solovev_kinetic_example/kinetic.txt. It is run by hand against the built PENTRC objects and is not part of CI. Without the fix it stops withmax |omega_E| for wefac = 0: 1.0E-09; with the fix it passes. The Julia GPEC reformsUpstream: PrincetonUniversity#275.
Chris&AI