Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/BaseStar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -533,13 +533,16 @@ void BaseStar::CalculateAnCoefficients(DBL_VECTOR &p_AnCoefficients,
a[19] *= a[20];
a[29] = PPOW(a[29], (a[32]));
a[33] = min(1.4, 1.5135 + (0.3769 * xi));
a[33] = max(0.6355 - (0.4192 * xi), max(1.25, a[33]));
a[42] = min(1.25, max(1.1, a[42]));
a[44] = min(1.3, max(0.45, a[44]));
a[49] = max(a[49], 0.145);
a[50] = min(a[50], (0.306 + (0.053 * xi)));
a[51] = min(a[51], (0.3625 + (0.062 * xi)));
a[52] = (utils::Compare(Z, 0.01) > 0) ? min(a[52], 1.0) : max(a[52], 0.9);
a[53] = (utils::Compare(Z, 0.01) > 0) ? min(a[53], 1.1) : max(a[53], 1.0);
a[52] = max(a[52], 0.9);
a[52] = (utils::Compare(Z, 0.01) > 0) ? min(a[52], 1.0) : a[52];
a[53] = max(a[53], 1.0);
a[53] = (utils::Compare(Z, 0.01) > 0) ? min(a[53], 1.1) : a[53];
a[57] = min(1.4, a[57]);
a[57] = max((0.6355 - (0.4192 * xi)), max(1.25, a[57]));
a[62] = max(0.065, a[62]);
Expand Down Expand Up @@ -633,8 +636,8 @@ void BaseStar::CalculateBnCoefficients(DBL_VECTOR &p_BnCoefficients) {
b[1] = min(0.54, b[1]);
b[2] = PPOW(10.0, (-4.6739 - (0.9394 * sigma)));
b[2] = min(max(b[2], (-0.04167 + (55.67 * Z))), (0.4771 - (9329.21 * PPOW(Z, 2.94))));
b[3] = max(-0.1451, (-2.2794 - (1.5175 * sigma) - (0.254 * sigma * sigma)));
b[3] = (utils::Compare(Z, 0.004) > 0) ? max(b[3], 0.7307 + (14265.1 * PPOW(Z, 3.395))) : PPOW(10.0, b[3]);
b[3] = PPOW(10.0, max(-0.1451, (-2.2794 - (1.5175 * sigma) - (0.254 * sigma * sigma))));
b[3] = (utils::Compare(Z, 0.004) > 0) ? max(b[3], 0.7307 + (14265.1 * PPOW(Z, 3.395))) : b[3];
b[4] += 0.1231572 * xi_5;
b[6] += 0.01640687 * xi_5;
b[11] = b[11] * b[11];
Expand Down
51 changes: 50 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,56 @@ endif

# Common variables for both builds
EXE := $(BDIR)/COMPAS
SOURCES := $(wildcard *.cpp)

SOURCES := \
profiling.cpp \
utils.cpp \
yaml.cpp \
vector3d.cpp \
\
Rand.cpp \
Options.cpp \
Log.cpp \
Errors.cpp \
\
BaseStar.cpp \
\
Star.cpp \
\
MainSequence.cpp \
MS_lte_07.cpp \
MS_gt_07.cpp \
\
CH.cpp \
\
GiantBranch.cpp \
HG.cpp \
FGB.cpp \
CHeB.cpp \
EAGB.cpp \
TPAGB.cpp \
\
HeMS.cpp \
HeHG.cpp \
HeGB.cpp \
\
Remnants.cpp \
\
WhiteDwarfs.cpp \
HeWD.cpp \
COWD.cpp \
ONeWD.cpp \
\
NS.cpp \
BH.cpp \
MR.cpp \
\
BinaryConstituentStar.cpp \
BaseBinaryStar.cpp \
BinaryStar.cpp \
\
main.cpp

OBJS := $(patsubst %.cpp,$(ODIR)/%.o,$(SOURCES))

# GSL, Boost, and HDF5 directories
Expand Down
7 changes: 5 additions & 2 deletions src/changelog.h
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,10 @@
// fallback option, fixed remnant mass, and added lum and teff as attributes of RLOFProperties
// 03.25.00 RTW - August 18, 2025 - Enhancement:
// - Added KLENCKI_LINEAR AM loss, which is linear in the specific AM gamma instead of the orbital separation (as in MACLEOD_LINEAR)
//
// 03.25.01 JR - August 20, 2025 - Defect repairs:
// - Corrected calculations for Hurley A(n) and B(n) coefficients (see Hurley et al. 2000, appendix)
// - Changed utils::GetGSLVersion() to avoid compiler warning "warning: ignoring attributes on template argument ‘int (*)(FILE*)’ [-Wignored-attributes]"
// - Reverted Makefile line "SOURCES := $(wildcard *.cpp)" to listing actual source files
//
// Version string format is MM.mm.rr, where
//
Expand All @@ -1666,7 +1669,7 @@
// if MM is incremented, set mm and rr to 00, even if defect repairs and minor enhancements were also made
// if mm is incremented, set rr to 00, even if defect repairs were also made

const std::string VERSION_STRING = "03.25.00";
const std::string VERSION_STRING = "03.25.01";


# endif // __changelog_h__
2 changes: 1 addition & 1 deletion src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1836,7 +1836,7 @@ namespace utils {
std::string versionStr = "Not available"; // default return value

char buffer[128]; // command return buffer
std::unique_ptr<FILE, decltype(&pclose)> pipe(popen("gsl-config --version", "r"), pclose); // open pipe for command
std::unique_ptr<FILE, int(*)(FILE*)> pipe(popen("gsl-config --version", "r"), &pclose); // open pipe for command
if (pipe) { // ok?
versionStr = ""; // yes
while (fgets(buffer, sizeof(buffer), pipe.get()) != nullptr) versionStr += buffer; // copy buffer
Expand Down