Skip to content

Commit

Permalink
Merge pull request #1198 from TeamCOMPAS/GW-fixes
Browse files Browse the repository at this point in the history
Gw fixes - fix bad merge
  • Loading branch information
ilyamandel authored Aug 25, 2024
2 parents 6073407 + 5bcd896 commit 1fe9f7b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 28 deletions.
30 changes: 3 additions & 27 deletions src/BaseBinaryStar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2804,37 +2804,13 @@ EVOLUTION_STATUS BaseBinaryStar::Evolve() {

while (evolutionStatus == EVOLUTION_STATUS::CONTINUE) { // perform binary evolution - iterate over timesteps until told to stop

stepNum++; // increment stepNum

// if user selects to emit GWs, calculate the effects of radiation
// - note that this is placed before ChooseTimestep() is called because
// the timestep is a function of graviational radiation
if (OPTIONS->EmitGravitationalRadiation()) {
CalculateGravitationalRadiation();
}

if (stepNum > 1) { // after the first timestep, set previous timestep
m_Star2->UpdatePreviousTimestepDuration();
m_Star1->UpdatePreviousTimestepDuration();
}
if (usingProvidedTimesteps) { // user-provided timesteps?
// select a timestep
// - don't quantise
// - don't apply timestep multiplier
// (we assume user wants the timesteps in the file)
dt = timesteps[stepNum - 1];
}
else { // no - not using user-provided timesteps
dt = ChooseTimestep(dt);
}

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
if (OPTIONS->EmitGravitationalRadiation()) { // emitting GWs?

if (OPTIONS->EmitGravitationalRadiation()) { // emitting GWs?
EmitGravitationalWave(dt); // yes - emit graviataional wave
}

Expand Down Expand Up @@ -2930,7 +2906,7 @@ EVOLUTION_STATUS BaseBinaryStar::Evolve() {

m_Star2->UpdatePreviousTimestepDuration();
m_Star1->UpdatePreviousTimestepDuration();

if (usingProvidedTimesteps) { // user-provided timesteps?
// select a timestep
// - don't quantise
Expand Down
4 changes: 3 additions & 1 deletion src/changelog.h
Original file line number Diff line number Diff line change
Expand Up @@ -1265,8 +1265,10 @@
// make it work properly for both INTEL and ARM architectures.
// 03.01.00 APB - Aug 24, 2024 - Enhancement:
// - Implemented gravitational radiation at each timestep of binary evolution. Available with new '--emit-gravitational-radiation' option. Updates time step dynamically if required.
// 03.01.01 JR - Aug 24, 2024 - Defect repair:
// - Fix bad merge - use this version instead of v03.01.00


const std::string VERSION_STRING = "03.01.00";
const std::string VERSION_STRING = "03.01.01";

# endif // __changelog_h__

0 comments on commit 1fe9f7b

Please sign in to comment.