Skip to content

Commit dccc8db

Browse files
authored
Merge pull request #1387 from TeamCOMPAS/issue-1378
Fix for issue #1378
2 parents a20b101 + e89da72 commit dccc8db

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

src/Options.h

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,19 @@ const std::string NOT_PROVIDED_STR(1, static_cast<char>(NOT_PROVIDED_CHAR));
7070
// grid line
7171
//
7272
// 2. if 'fallback' is 'true':
73-
// the value specified on the commandline IFF the user did not specify the
74-
// option on the grid line but did specify the option on the commandline
73+
// the value specified on the commandline if the user did not specify the
74+
// option on the grid line (regardless of whether they specified the option
75+
// on the commandline). In this case, if the user did not speify a value on
76+
// the commandline, the commandline value is set according to the default
77+
// behaviour for the option, and the grid line value is set from that. Note
78+
// that for options whose default behavious is to draw a random number, this
79+
// will only be done once for the commandline value, and each grid line that
80+
// falls back to the commandline will take the same value as the commandline.
81+
// Consider using 'fallback' = 'false' for those cases.
82+
//
7583
// else if 'fallback' is 'false':
7684
// the default value for the option
7785
//
78-
// 3. the default value for the option
79-
//
8086
// For most options we will use
8187
//
8288
// OPT_VALUE("option-name", m_OptionVar, true)
@@ -1458,9 +1464,9 @@ class Options {
14581464
double KickMagnitude1() const { return OPT_VALUE("kick-magnitude-1", m_KickMagnitude1, true); }
14591465
double KickMagnitude2() const { return OPT_VALUE("kick-magnitude-2", m_KickMagnitude2, true); }
14601466

1461-
double KickMagnitudeRandom() const { return OPT_VALUE("kick-magnitude-random", m_KickMagnitudeRandom, true); }
1462-
double KickMagnitudeRandom1() const { return OPT_VALUE("kick-magnitude-random-1", m_KickMagnitudeRandom1, true); }
1463-
double KickMagnitudeRandom2() const { return OPT_VALUE("kick-magnitude-random-2", m_KickMagnitudeRandom2, true); }
1467+
double KickMagnitudeRandom() const { return OPT_VALUE("kick-magnitude-random", m_KickMagnitudeRandom, false); }
1468+
double KickMagnitudeRandom1() const { return OPT_VALUE("kick-magnitude-random-1", m_KickMagnitudeRandom1, false); }
1469+
double KickMagnitudeRandom2() const { return OPT_VALUE("kick-magnitude-random-2", m_KickMagnitudeRandom2, false); }
14641470

14651471
STR_VECTOR LogClasses() const { return m_CmdLine.optionValues.m_LogClasses; }
14661472
std::string LogfileCommonEnvelopes() const { return m_CmdLine.optionValues.m_LogfileCommonEnvelopes; }

src/changelog.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,9 @@
15471547
// - Fix for issue #1380, which appears when the Loveridge binding energy is so high that lambda is rounded off to zero
15481548
// 03.18.04 IM - May 4, 2025 - Defect repair:
15491549
// - Added a check to avoid Loveridge lambda becoming zero when the envelope mass is positive but very small
1550+
// 03.18.05 JR - May 8, 2025 - Defect repair:
1551+
// - Fix for issue #1378: reinstate "false" fallback option for `kick-magnitude-random*` options (mistakenly changed to "true" in v03.00.00)
15501552

1551-
const std::string VERSION_STRING = "03.18.04";
1553+
const std::string VERSION_STRING = "03.18.05";
15521554

15531555
# endif // __changelog_h__

0 commit comments

Comments
 (0)