Skip to content

Commit

Permalink
Merge pull request #1312 from jeffriley/issue-1310
Browse files Browse the repository at this point in the history
Fix for issue #1310
  • Loading branch information
jeffriley authored Dec 15, 2024
2 parents efe2ccc + 81d2c2b commit 20aa889
Show file tree
Hide file tree
Showing 3 changed files with 210 additions and 185 deletions.
13 changes: 9 additions & 4 deletions src/BaseBinaryStar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,14 @@ BaseBinaryStar::BaseBinaryStar(const unsigned long int p_Seed, const long int p_

if (!done) error = ERROR::INVALID_INITIAL_ATTRIBUTES; // too many iterations - bad initial conditions

if (error != ERROR::NONE) THROW_ERROR(error); // throw error if necessary

SetRemainingValues(); // complete the construction of the binary
if (error != ERROR::NONE) { // ok?
m_EvolutionStatus = EVOLUTION_STATUS::BINARY_ERROR; // set evolutionary status
(void)PrintBinarySystemParameters(); // no - print (log) binary system parameters
THROW_ERROR(error); // throw error - can't return it...
}
else { // yes - ok
SetRemainingValues(); // complete the construction of the binary
}
}


Expand Down Expand Up @@ -1644,7 +1649,7 @@ void BaseBinaryStar::ResolveCommonEnvelopeEvent() {
}
}

if (utils::Compare(m_SemiMajorAxis, 0.0) <= 0 || utils::Compare(m_Star1->CalculateRemnantRadius() + m_Star2->CalculateRemnantRadius(), m_SemiMajorAxis * AU_TO_RSOL) > 0) { // catch merger in CE here, do not update stars
if (utils::Compare(m_SemiMajorAxis, 0.0) <= 0 || utils::Compare(m_Star1->CalculateRemnantRadius() + m_Star2->CalculateRemnantRadius(), m_SemiMajorAxis * AU_TO_RSOL) > 0) { // catch merger in CE here, do not update stars
m_MassTransferTrackerHistory = MT_TRACKING::MERGER;
m_Flags.stellarMerger = true;
}
Expand Down
5 changes: 4 additions & 1 deletion src/changelog.h
Original file line number Diff line number Diff line change
Expand Up @@ -1419,6 +1419,9 @@
// 03.10.02 IM - Dec 13, 2024 - Defect repair:
// - if the Hurley supernova criteria are met yet ECSN criteria based on mass transfer history are not met, a normal CCSN ensues as opposed to an ONeWD
// - exactly preserve the product of semi-major axis * total mass on wind mass loss
const std::string VERSION_STRING = "03.10.02";
// 03.10.03 JR - Dec 16, 2024 - Defect repair:
// - fix for issue #1310 - run terminates prematurely if error in grid file

const std::string VERSION_STRING = "03.10.03";

# endif // __changelog_h__
Loading

0 comments on commit 20aa889

Please sign in to comment.