Skip to content

Commit

Permalink
Merge branch 'dev' into tides_ecc_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
veome22 authored Jan 14, 2025
2 parents fe9cf1e + 603e831 commit 85218cf
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
24 changes: 13 additions & 11 deletions src/BaseBinaryStar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2917,8 +2917,8 @@ void BaseBinaryStar::EvaluateBinary(const double p_Dt) {
}
}

if (!StellarMerger()) { // stellar merger?
// no - continue evolution
if (!StellarMerger() || (HasOneOf({ STELLAR_TYPE::MASSLESS_REMNANT }) && OPTIONS->EvolveMainSequenceMergers())) { // check stellar merger or evolving MS mergers
// continue evolution
if ((m_Star1->IsSNevent() || m_Star2->IsSNevent())) {
EvaluateSupernovae(); // evaluate supernovae (both stars) if mass changes are responsible for a supernova
(void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::POST_SN); // print (log) detailed output
Expand Down Expand Up @@ -3172,23 +3172,25 @@ EVOLUTION_STATUS BaseBinaryStar::Evolve() {
}
}

(void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::PRE_STELLAR_TIMESTEP); // print (log) detailed output

if (evolutionStatus == EVOLUTION_STATUS::CONTINUE) { // continue evolution?
// yes
(void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::PRE_STELLAR_TIMESTEP); // print (log) detailed output

error = EvolveOneTimestep(dt); // evolve the binary system one timestep
if (error != ERROR::NONE) { // SSE error for either constituent star?
evolutionStatus = EVOLUTION_STATUS::SSE_ERROR; // yes - stop evolution
}
else { // continue evolution
}

(void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::TIMESTEP_COMPLETED); // print (log) detailed output: this is after all changes made in the timestep
(void)PrintDetailedOutput(m_Id, BSE_DETAILED_RECORD_TYPE::TIMESTEP_COMPLETED); // print (log) detailed output: this is after all changes made in the timestep

if (stepNum >= OPTIONS->MaxNumberOfTimestepIterations()) evolutionStatus = EVOLUTION_STATUS::STEPS_UP; // number of timesteps for evolution exceeds maximum
else if (evolutionStatus == EVOLUTION_STATUS::CONTINUE && usingProvidedTimesteps && stepNum >= timesteps.size()) { // using user-provided timesteps and all consumed
evolutionStatus = EVOLUTION_STATUS::TIMESTEPS_EXHAUSTED; // yes - set status
SHOW_WARN(ERROR::TIMESTEPS_EXHAUSTED); // show warning
}

if (evolutionStatus == EVOLUTION_STATUS::CONTINUE) { // continue evolution?
// yes
if (stepNum >= OPTIONS->MaxNumberOfTimestepIterations()) evolutionStatus = EVOLUTION_STATUS::STEPS_UP; // number of timesteps for evolution exceeds maximum
else if (evolutionStatus == EVOLUTION_STATUS::CONTINUE && usingProvidedTimesteps && stepNum >= timesteps.size()) { // using user-provided timesteps and all consumed
evolutionStatus = EVOLUTION_STATUS::TIMESTEPS_EXHAUSTED; // yes - set status
SHOW_WARN(ERROR::TIMESTEPS_EXHAUSTED); // show warning
}

if (evolutionStatus == EVOLUTION_STATUS::CONTINUE) { // continue evolution?
Expand Down
10 changes: 7 additions & 3 deletions src/changelog.h
Original file line number Diff line number Diff line change
Expand Up @@ -1423,9 +1423,13 @@
// - fix for issue #1310 - run terminates prematurely if error in grid file
// 03.10.04 RTW - Nov 27, 2024 - Defect repair:
// - fix for issue #1247 - SN Euler angles had incomplete logic, leading to a div by zero in some cases
// 03.10.05 VK - Jan 7, 2025 - Enhancement:
// - Modified the KAPIL2024 tides to ignore quadratic 'e' terms for spin and separation evolution if they incorrectly spin up an already synchronized star.
// 03.10.05 JR - Jan 08, 2025 - Defect repair:
// - fix for issue #1317 - SN events not always logged in BSE SN file when evolving MS merger products
// - added code to ensure final BSE detailed output file TIMESTEP_COMPLETED record is always logged
// (may duplicate FINAL_STATE record, but logging TIMESTEP_COMPLETED is consistent, and it's what most people look for)
// 03.10.06 VK - Jan 13, 2025 - Enhancement:
// - Modified the KAPIL2024 tides to ignore quadratic 'e' terms (for spin and separation evolution) if they spin up an already synchronized star.

const std::string VERSION_STRING = "03.10.05";
const std::string VERSION_STRING = "03.10.06";

# endif // __changelog_h__

0 comments on commit 85218cf

Please sign in to comment.