Skip to content

Commit bdef735

Browse files
authored
Merge pull request #1422 from TeamCOMPAS/Matlab
MALTSEV and Piersanti fixes
2 parents 52c8d75 + 887c20d commit bdef735

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

src/GiantBranch.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1320,6 +1320,8 @@ double GiantBranch::CalculateRemnantMassByMaltsev2024(const double p_COCoreMass,
13201320
delete newStar; newStar = nullptr; // return the memory allocated for the new star
13211321
}
13221322

1323+
if (massTransferCase == MT_CASE::NONE && HydrogenAbundanceSurface() == 0.0) massTransferCase = MT_CASE::B; // if a star was stripped by winds, treat it as if it experienced Case B mass transfer
1324+
13231325
// apply the appropriate remnant mass prescription for the chosen MT case
13241326
switch (massTransferCase) { // which MT_CASE?
13251327

src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ ifneq ($(filter staticfast,$(MAKECMDGOALS)),)
4040
endif
4141

4242

43-
CXXFLAGS := -std=c++17 -g -fnon-call-exceptions -Wall -Woverloaded-virtual -Wno-vla-cxx-extension $(OPTFLAGS)
43+
CXXFLAGS := -std=c++17 -g -fnon-call-exceptions -Wall -Woverloaded-virtual -Wno-vla-extension $(OPTFLAGS)
4444
ICFLAGS := -I$(GSLINCDIR) -I$(BOOSTINCDIR) -I$(HDF5INCDIR) -I.
4545

4646
LIBS := -lm -lz -ldl -lpthread

src/WhiteDwarfs.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ double WhiteDwarfs::CalculateEtaPTY(const double p_MassTransferRate) {
118118
etaPTY = -WD_PIERSANTI_M102_G0 + WD_PIERSANTI_M102_G1 * massRate - WD_PIERSANTI_M102_G2 * massRate_2 + WD_PIERSANTI_M102_G3 * massRate_3;
119119
}
120120

121-
return etaPTY;
121+
// Returned eta should be between 0 and 1
122+
return std::min(std::max(etaPTY, 0.0), 1.0);
122123
}
123124

124125

src/changelog.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1647,6 +1647,9 @@
16471647
// - Fixed online docs for omissions in v03.22.02:
16481648
// - fixed description for "--initial-mass-function" in "program-options-list-defaults.rst", and
16491649
// - changed "--initial-mass-power" to "--initial-mass-function-power" in "program-options-list-defaults.rst"
1650+
// 03.23.01 IM - August 18, 2025 - Enhancement, defect repair:
1651+
// - In the MALTSEV SN prescription, treat wind-stripped stars as if they experienced case B mass transfer
1652+
// - Limit the output of CalculateEtaPTY() [Helium accretion efficiency onto WDs from Piersanti+ 2014, A3] to be in [0,1]
16501653
//
16511654
//
16521655
// Version string format is MM.mm.rr, where
@@ -1658,7 +1661,7 @@
16581661
// if MM is incremented, set mm and rr to 00, even if defect repairs and minor enhancements were also made
16591662
// if mm is incremented, set rr to 00, even if defect repairs were also made
16601663

1661-
const std::string VERSION_STRING = "03.23.00";
1664+
const std::string VERSION_STRING = "03.23.01";
16621665

16631666

16641667
# endif // __changelog_h__

0 commit comments

Comments
 (0)