Skip to content
Snippets Groups Projects
Commit 944ffdf4 authored by Izzard, Robert Dr (Maths & Physics)'s avatar Izzard, Robert Dr (Maths & Physics)
Browse files

add a failure when discs are run with a solver other than forward euler

parent c12f579f
No related branches found
No related tags found
No related merge requests found
...@@ -25,12 +25,18 @@ void evolve_disc(struct stardata_t * const stardata, ...@@ -25,12 +25,18 @@ void evolve_disc(struct stardata_t * const stardata,
Discdebug(1,"EV t=%g dt=%g\n", Discdebug(1,"EV t=%g dt=%g\n",
disc->lifetime/YEAR_LENGTH_IN_SECONDS, disc->lifetime/YEAR_LENGTH_IN_SECONDS,
dtsecs/YEAR_LENGTH_IN_SECONDS); dtsecs/YEAR_LENGTH_IN_SECONDS);
if(stardata->preferences->solver != SOLVER_FORWARD_EULER)
{
Exit_binary_c(BINARY_C_ALGORITHM_OUT_OF_RANGE,
"The discs algorithm has not been tested with solvers other than Forward-Euler. Please only use this solver.");
}
disc->first = disc->first==TRUE ? TRUE : Boolean_(Is_zero(disc->lifetime)); disc->first = disc->first==TRUE ? TRUE : Boolean_(Is_zero(disc->lifetime));
disc->dT = 0.0; disc->dT = 0.0;
Clear_disc_feedback(disc); Clear_disc_feedback(disc);
if(Disc_is_disc(disc)) if(Disc_is_disc(disc))
{ {
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment