Skip to content

Commit baed521

Browse files
author
Ilya Mandel
committed
Fix to kick direction bug
1 parent c80ef28 commit baed521

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

online-docs/pages/whats-new.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ What's new
33

44
Following is a brief list of important updates to the COMPAS code. A complete record of changes can be found in the file ``changelog.h``.
55

6+
**03.27.02 December 16, 2025**
7+
8+
* Fixed a bug in the assignment of kick direction angles
9+
* Undid replacement of --scale-CHE-mass-loss-with-surface-helium-abundance with the more general --scale-mass-loss-with-surface-helium-abundance (see 03.26.02)
10+
611
**03.26.02 October 27, 2025**
712

813
* Added option --USSN-kicks-override-mandel-muller ; if set to true, use user-defined USSN kicks (as a fixed value) in lieu of the Mandel & Muller kick prescription for USSNe

src/Options.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2241,7 +2241,7 @@ std::string Options::OptionValues::SetCalculatedOptionDefaults(const BOOST_MAP p
22412241

22422242
if (phi1Defaulted || theta1Defaulted) {
22432243
double phi1, theta1;
2244-
std::tie(phi1, theta1) = utils::DrawKickDirection(m_KickDirectionDistribution.type, m_KickDirectionPower);
2244+
std::tie(theta1, phi1) = utils::DrawKickDirection(m_KickDirectionDistribution.type, m_KickDirectionPower);
22452245
if (phi1Defaulted) {
22462246
m_KickPhi1 = phi1;
22472247
if (p_UpdateMap == BOOST_MAP::UPDATE) {
@@ -2264,7 +2264,7 @@ std::string Options::OptionValues::SetCalculatedOptionDefaults(const BOOST_MAP p
22642264

22652265
if (phi2Defaulted || theta2Defaulted) {
22662266
double phi2, theta2;
2267-
std::tie(phi2, theta2) = utils::DrawKickDirection(m_KickDirectionDistribution.type, m_KickDirectionPower);
2267+
std::tie(theta2, phi2) = utils::DrawKickDirection(m_KickDirectionDistribution.type, m_KickDirectionPower);
22682268
if (phi2Defaulted) {
22692269
m_KickPhi2 = phi2;
22702270
if (p_UpdateMap == BOOST_MAP::UPDATE) {

src/changelog.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,6 +1684,8 @@
16841684
// --scale-CHE-mass-loss-with-surface-helium-abundance and applies only to CHE stars
16851685
// - Corrected behaviour of MS stars that stopped ageing after mass transfer when mass loss is disabled (issue #1444)
16861686
// - Corrected luminosity evolution for CH stars (issue #1443)
1687+
// 03.27.03 IM - December 16, 2025 - Defect repair:
1688+
// - Fix issue #1446: Theta and phi variables are flipped when assigning kicks, potentially giving unintended kick distributions
16871689
//
16881690
//
16891691
// Version string format is MM.mm.rr, where
@@ -1695,7 +1697,7 @@
16951697
// if MM is incremented, set mm and rr to 00, even if defect repairs and minor enhancements were also made
16961698
// if mm is incremented, set rr to 00, even if defect repairs were also made
16971699

1698-
const std::string VERSION_STRING = "03.27.02";
1700+
const std::string VERSION_STRING = "03.27.03";
16991701

17001702

17011703
# endif // __changelog_h__

0 commit comments

Comments
 (0)