Fix to non-random supernova kick angles#1481
Conversation
Ran into another bug similar to issue TeamCOMPAS#1378 (while working on the CBD PR, still forthcoming 🙂), applied the analogous fix to PR TeamCOMPAS#1387. (Missed it back then because I bypassed TeamCOMPAS#1378 by using a bash script which sent each seed individually)
ilyamandel
left a comment
There was a problem hiding this comment.
@jeffriley , I am a bit puzzled by the description of OPT_VALUE. It says:
//. if the user did not speify a value on
// the commandline, the commandline value is set according to the default
// behaviour for the option, and the grid line value is set from that. Note
// that for options whose default behaviours is to draw a random number, this
// will only be done once for the commandline value, and each grid line that
// falls back to the commandline will take the same value as the commandline.
// Consider using 'fallback' = 'false' for those cases.
[aside: note typo in speify, should be specify :) ]
My question is, how is the programmer to know whether this is the first time that OPT_VALUE is called for this option, and so whether a random-number should be regenerated or not?
If I understand the question correctly @ilyamandel, the value for the option is set (once) at parse time in Options.cpp (and that's where we call RAND->Random()), OPT_VALUE just retrieves the value when called. (EDIT: So the programmer doesn't need to know how many times the getter (which uses OPT_VALUE) is called - it will always return the same value.) |
jeffriley
left a comment
There was a problem hiding this comment.
I changed my mind. changelog needs to be updated - record the change and change the patch/fix number.
|
@jeffriley : The comment says: |
Is one of us looking at the wrong changes? Didn't Aldana change the fallback values from "true" to "false"? Or am I completely misunderstanding your question? |
|
You are right, @jeffriley . :) |
jeffriley
left a comment
There was a problem hiding this comment.
Thanks @AldanaGrichener !
|
You are welcome :) |
Ran into another bug similar to issue #1378 (while working on the CBD PR, still forthcoming 🙂), applied the analogous fix to PR #1387.
(Missed it back then because I bypassed #1378 by using a bash script which sent each seed individually)