hamers / mse

Multiple Stellar Evolution -- A Population Synthesis Code for Multiple-Star Systems
GNU General Public License v3.0
9 stars 4 forks source link

(possible) typo in SSE timestep calculation #55

Closed TomWagg closed 2 years ago

TomWagg commented 2 years ago

See stellar_evolution.cpp:770

I believe the expression

dtm = CV_max(dtm,1.0d-07*age);

Should actually be

dtm = CV_max(dtm,1.0e-07*age);

(changing "d" to "e")

Since otherwise 1.0d-07 = -6, not 0.0000001

hamers commented 2 years ago

Thanks a lot for catching! Changed in 184298d. Fortunately, it takes the maximum and the age limit is usually not imposed so the impact should be small -- I have not found any difference as of yet (the stellar evolution unit tests, which compare directly to standalone SSE, still pass), but am running further tests. (This is what you get by porting code from Fortran to C.)