diff --git a/CHANGES b/CHANGES index f7c27ed67c5edefa306f48cc9c23d3321b6d0f47..a7a695dc823a233c4178e292c674d9a8c17c0ba7 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,8 @@ Change how reset_timeout works so it doesn't require LINUX, rather it requires _ The binary_grid (v1) perl module has been completely deprecated in favour of binary_grid2. +Deprecated the BSE time evolution algorithm (you were warned long ago that this would happen!) + 14/11/2019 V2.1.4 What a difference a week makes. 2.1.4 brings some (minor) bug fixes, but diff --git a/meson.build b/meson.build index 7ed4093ac3010a87e18e3f80b9d8f5b7188a179f..1e86411df20b8c94bcf0c45d9e93583378ca9071 100644 --- a/meson.build +++ b/meson.build @@ -34,12 +34,19 @@ # define the binary_c project project( 'binary_c','c', - version : run_command('sh','-c','meson/binary_c_version.sh').stdout().strip(), + version : meson.get_compiler('c').run(''' +#include <stdio.h> +#include "''' + meson.source_root() + '''/src/binary_c_version.h" +int main(int argc,char **argv) +{ + fprintf(stdout,"%s",BINARY_C_VERSION); + return 0; +} +''').stdout().strip(), default_options : [ 'c_std=gnu99', ] ) -binary_c_version = run_command('sh','-c','meson/binary_c_version.sh').stdout().strip() compiler = meson.get_compiler('c') ############################################################ @@ -55,9 +62,21 @@ homedir = run_command('sh','-c','echo $HOME').stdout().strip() binary_c = meson.source_root() binary_c_src = meson.source_root() + '/src' + ############################################################ -# SVN and git information +# binary_c version +binary_c_version = compiler.run(''' +#include <stdio.h> +#include "''' + binary_c_src + '''/binary_c_version.h" +int main(int argc,char **argv) +{ + fprintf(stdout,"%s",BINARY_C_VERSION); + return 0; +}''').stdout().strip() +message('binary_c version is ' + binary_c_version) +############################################################ +# SVN and git information git_revision = run_command('sh','-c','meson/git_revision.sh').stdout().strip() svn_revision = run_command('sh','-c','meson/svn_revision.sh').stdout().strip() git_url = run_command('sh','-c','meson/git_url.sh').stdout().strip() @@ -187,17 +206,19 @@ if os == 'linux' # Linux system cflags += [ '-DLINUX', + '-DPOSIX', '-DLARGEFILE_SOURCE' ] elif os == 'windows' # windows cflags += [ - '-DWINDOWS' + '-DWINDOWS', ] elif os == 'darwin' # darwin (MacOSX) cflags += [ - '-DDARWIN' + '-DDARWIN', + '-DPOSIX', ] else cflags += [ @@ -291,7 +312,12 @@ foreach libname : _required_libraries cflags += run_command('sh','-c','gsl-config --cflags').stdout().strip().split(' ') cflags += '-DUSE_GSL' libs += run_command('sh','-c','gsl-config --libs').stdout().strip().split(' ') - gsl_libdirs = run_command('sh','-c','gsl-config --libs | tr " " "\n"|grep ^-L | tr "\n" " "').stdout().strip().split(' ') + gsl_libdirs = [] + foreach gsl_libdir :run_command('sh','-c','gsl-config --libs').stdout().strip().split(' ') + if gsl_libdir.startswith('-L') + gsl_libdirs += gsl_libdir + endif + endforeach libdirs += gsl_libdirs incdirs += run_command('sh','-c','gsl-config --prefix').stdout().strip()+'/include' endif diff --git a/meson/binary_c_version.sh b/meson/binary_c_version.sh index fd7f45fe131f3a25142b86fcd5eb83079862ddd5..b8ce62ce002f7340c582ce857111f4badb6db8a4 100755 --- a/meson/binary_c_version.sh +++ b/meson/binary_c_version.sh @@ -1,4 +1,7 @@ #!/bin/bash - +# # script to return the binary_c version number -grep define\ BINARY_C_VERSION\ \" src/binary_c_version.h | gawk "{print \$3}"|tr -d '"' +# based on which is in binary_c_version.h +# (i.e. does not require binary_c to be built) +# +grep define\ BINARY_C_VERSION\ \" src/binary_c_version.h | awk "{print \$3}"|tr -d '"' diff --git a/meson/git_revision.sh b/meson/git_revision.sh index 6fe511baf126ba22825a863b51f1b21f985e1559..4d2d1ae21232f0c2ff953613e6d7f54410995c70 100755 --- a/meson/git_revision.sh +++ b/meson/git_revision.sh @@ -1,8 +1,11 @@ #!/bin/bash # wrapper to output the git revision +# (outputs nothing on failure) +d=`date +%Y%m%d 2>/dev/null` +c=`git rev-list --full-history --all --abbrev-commit 2>/dev/null | /usr/bin/wc -l | sed -e 's/^ *//'` +h=`git rev-list --full-history --all --abbrev-commit 2>/dev/null | head -1` -d=`date +%Y%m%d` -c=`git rev-list --full-history --all --abbrev-commit | /usr/bin/wc -l | sed -e 's/^ *//'` -h=`git rev-list --full-history --all --abbrev-commit | head -1` -echo ${c}:${d}:${h} \ No newline at end of file +if [[ ! -z "$d" && ! -z "$c" && ! -z "$h" ]]; then + echo ${c}:${d}:${h} +fi diff --git a/src/binary_c_macros.h b/src/binary_c_macros.h index b3c6f2e02f89a4b1ec0cbfe4239de804a62c6459..2e74193bb8700a27f8318a0d5bf41efc51f12e0a 100644 --- a/src/binary_c_macros.h +++ b/src/binary_c_macros.h @@ -966,14 +966,6 @@ #define UPDATE_TIME TRUE #define DO_NOT_UPDATE_TIME FALSE - -/* - * Evolution algorithms - */ -#define EVOLUTION_ALGORITHM_BINARY_C 0 -#define EVOLUTION_ALGORITHM_BSE 1 - - /* * Actions for copy_stardata() */ diff --git a/src/binary_c_main.h b/src/binary_c_main.h index a582e9626c1e75dc7fa333e075e6830f1c4d6a12..40180cb0b7415d9ea8eb791eb908afc57fe214a2 100644 --- a/src/binary_c_main.h +++ b/src/binary_c_main.h @@ -40,6 +40,14 @@ #ifdef CODESTATS struct codestats_t codestats; static void output_codestats(void); + +#define Output_codestats output_codestats(); +#else +#define Output_codestats /* do nothing */ #endif//CODESTATS +static int binary_c_main(int argc, + char ** argv, + struct stardata_t ** RESTRICT s); + #endif // BINARY_C_MAIN_H diff --git a/src/binary_c_structures.h b/src/binary_c_structures.h index 5ad82b1fe2595e20dd37ad96c8bf63d78d158011..cf1bf176522f90f9f509252849e68cf81d655fac 100644 --- a/src/binary_c_structures.h +++ b/src/binary_c_structures.h @@ -873,10 +873,7 @@ struct preferences_t { int nova_retention_method; int solver; - - /* evolution algorithm : currently have only BSE */ - unsigned int evolution_algorithm; - + /* Wind-RLOF parameter */ #ifdef WRLOF_MASS_TRANSFER int WRLOF_method; diff --git a/src/binary_c_version.h b/src/binary_c_version.h index f6a41650eca9f969ebbe2c6e0689d691b69020f7..66eae873899ab1d780d8daa1ce4644e20f7fc6b4 100644 --- a/src/binary_c_version.h +++ b/src/binary_c_version.h @@ -30,12 +30,12 @@ * * Patch is zero for a major release. */ -#define BINARY_C_VERSION "2.1.4" +#define BINARY_C_VERSION "2.1.5" /* and a CEMP run version */ #define CEMP_VERSION "prelim10-O1-noCNEMPs" #define BINARY_C_START_YEAR 2000 -#define BINARY_C_END_YEAR 2019 +#define BINARY_C_END_YEAR 2020 #endif// BINARY_C_VERSION_H diff --git a/src/binary_star_functions/detached_limit_mass_loss_and_timestep.c b/src/binary_star_functions/detached_limit_mass_loss_and_timestep.c deleted file mode 100644 index ae951c5c948308f1704c58ce774f6380fdb2f172..0000000000000000000000000000000000000000 --- a/src/binary_star_functions/detached_limit_mass_loss_and_timestep.c +++ /dev/null @@ -1,65 +0,0 @@ -#include "../binary_c.h" - -void detached_limit_mass_loss_and_timestep(struct stardata_t * RESTRICT const stardata) -{ - if(stardata->preferences->evolution_algorithm==EVOLUTION_ALGORITHM_BSE) - { -/************************************************************ - * WARNING : this code is deprecated. - * - * In the new binary_c, systems which have mass changes that - * are too large should be rejected, and the evolutionary - * step rerun with a shorter timestep. - * - ************************************************************/ - Star_number k; - double dtwas = stardata->model.dt; - - /* - * Given the rate of mass loss/accretion, - * limit the timestep to 1% - */ - Evolving_STARLOOP(k) - { - SETstar(k); - - /* calculate mass change rate */ - double mdot_net = Mdot_net(star); - double mdot = fabs(mdot_net); - - /* - * representative mass to be resolved - * - * In case of net mass loss this is - * 1/10 of the stellar envelope or 1% of the mass, - * whichever is small, but do not let it get below - * 0.01Msun per timestep. - * - * If mass gain we use the 1% of the stellar mass - * limit, but again limit to 0.01Msun to prevent - * lock ups. - */ - double m = mdot_net > 0.0 ? - /* net mass gain */ - Max(0.01,0.01*star->mass) - /* net mass loss */ - : Max(0.01,Min(0.1*(star->mass - star->core_mass), - 0.01*star->mass)); - - if(star->stellar_type<HeWD && Is_not_zero(mdot)) - { - /* hence mass loss timescale */ - double tmdot = m/Max(1e-30,mdot); - - /* resolve mass loss */ - stardata->model.dt = Limit_timestep_old(tmdot); - stardata->model.dtm = 1e-6 * stardata->model.dt; - } - Dprint("Limited dt to %g (was %g, dtm to %g) because of mdot (star %d) = %g (representative mass m=%g)\n", - stardata->model.dt,dtwas, - stardata->model.dtm, - k, - mdot,m); - } - } -} diff --git a/src/binary_star_functions/detached_timestep_limits.c b/src/binary_star_functions/detached_timestep_limits.c deleted file mode 100644 index 6d3f57e823ee61f06ab0783ef737170d0bf438bd..0000000000000000000000000000000000000000 --- a/src/binary_star_functions/detached_timestep_limits.c +++ /dev/null @@ -1,17 +0,0 @@ - -#include "../binary_c.h" - -void detached_timestep_limits(struct stardata_t * RESTRICT const stardata) -{ - /* - * Limit the timestep, and perhaps amount of mass - * transferred, to prevent changes being - * too great between successive time steps. - */ - - /* set mass and timestep limits */ - detached_limit_mass_loss_and_timestep(stardata); - - /* Limit to 2% orbital angular momentum change.*/ - limit_timestep_to_2percent_ang_mom_change(stardata); -} diff --git a/src/binary_star_functions/limit_timestep_to_2percent_ang_mom_change.c b/src/binary_star_functions/limit_timestep_to_2percent_ang_mom_change.c deleted file mode 100644 index 1ff859de2212394c4afce46e4ff27d112564ec03..0000000000000000000000000000000000000000 --- a/src/binary_star_functions/limit_timestep_to_2percent_ang_mom_change.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "../binary_c.h" - -/* - * Limit to 2% orbital angular momentum change in a timestep - */ -void limit_timestep_to_2percent_ang_mom_change(struct stardata_t * RESTRICT const stardata) -{ - if(stardata->preferences->evolution_algorithm==EVOLUTION_ALGORITHM_BSE) - { -/************************************************************ - * WARNING : this code is deprecated. - * - * In the new binary_c, systems which have mass changes that - * are too large should be rejected, and the evolutionary - * step rerun with a shorter timestep. - * - ************************************************************/ - - stardata->model.sgl = System_is_single; - - if(stardata->model.sgl==FALSE && - stardata->model.intpol==0 && - !Fequal(stardata->model.dtm,0.0)) - { - if(Is_not_zero(stardata->model.derivative[DERIVATIVE_ORBIT_ANGMOM])) - { - double dtjdot = 0.02*fabs(stardata->common.orbit.angular_momentum/ - stardata->model.derivative[DERIVATIVE_ORBIT_ANGMOM]); - stardata->model.dt = Limit_timestep_old(dtjdot); - stardata->model.dtm = stardata->model.dt*1e-6; - } - - if(Is_not_zero(stardata->model.derivative[DERIVATIVE_ORBIT_ECCENTRICITY])) - { - double dtedot = 0.01*fabs(stardata->common.orbit.eccentricity/ - stardata->model.derivative[DERIVATIVE_ORBIT_ECCENTRICITY]); - stardata->model.dt = Limit_timestep_old(dtedot); - stardata->model.dtm = stardata->model.dt*1e-6; - } - } - } -} diff --git a/src/binary_star_functions/update_masses_angular_momenta_and_structure.c b/src/binary_star_functions/update_masses_angular_momenta_and_structure.c index 1aa817a522b49a5a8e4627ee87916564157d1c56..c9f5b5bb9f1afb45fe07f1412d52ed0598ab7361 100644 --- a/src/binary_star_functions/update_masses_angular_momenta_and_structure.c +++ b/src/binary_star_functions/update_masses_angular_momenta_and_structure.c @@ -1,8 +1,7 @@ #include "../binary_c.h" /* - * Update the mass/angular momenta of stars, - * also evolves circumbinary discs. + * Update the mass/angular momenta of stars, also evolves circumbinary discs. * * NB if RLOF is unstable, its outcome is dealt with elsewhere */ @@ -45,11 +44,11 @@ int update_masses_angular_momenta_and_structure(struct stardata_t * RESTRICT con struct RLOF_orbit_t * RLOF_orbit = Malloc(sizeof(struct RLOF_orbit_t)); RLOF_init_dM_orbit(stardata,RLOF_orbit); RLOF_stars; - double mass_transfer_rate = RLOF_mass_transfer_rate(donor->radius, - donor->roche_radius, - donor->mass, - stardata, - donor); + const double mass_transfer_rate = RLOF_mass_transfer_rate(donor->radius, + donor->roche_radius, + donor->mass, + stardata, + donor); Dprint("update masses etc. RLOF : rate = %g\n",mass_transfer_rate); RLOF_mass_transferred_in_one_orbit(stardata, @@ -73,8 +72,6 @@ int update_masses_angular_momenta_and_structure(struct stardata_t * RESTRICT con Dprint("post-RLOF\n"); } - /* impose timestep limits based on mass/angmom rates */ - detached_timestep_limits(stardata); Dprint("Main loop: update_mass_spin_epoch var=%g dtm=%g\n",OUTVAR,stardata->model.dtm); /* limit accretion rates (also novae and updates stellar types) */ @@ -93,7 +90,7 @@ int update_masses_angular_momenta_and_structure(struct stardata_t * RESTRICT con { Dprint("RLOF and dtm!=0\n"); /* - * If in RLOF, but with a timestep of zero (e.g. post-CE) + * If in RLOF, but with a timestep of zero (e.g. post-CE), * we still require the next timestep to be non-zero otherwise * the evolution algorithm will lock up. */ @@ -107,22 +104,24 @@ int update_masses_angular_momenta_and_structure(struct stardata_t * RESTRICT con evolve_discs(stardata); #endif - /* apply stellar derivatives (may be zero) */ + /* apply stellar derivatives (which may be zero) */ apply_stellar_mass_and_angular_momentum_derivatives(stardata,RLOF); Dprint("post apply stellar\n"); - /* apply other derivatives (also may be zero) */ + /* apply other derivatives (which also may be zero) */ apply_other_stellar_derivatives(stardata,RLOF); /* apply orbital derivatives */ Dprint("Main loop: update and check ecc var=%g, dtm=%g\n",OUTVAR,stardata->model.dtm); Nancheck(stardata->common.orbit.angular_momentum); - Boolean retval = apply_orbital_angular_momentum_and_eccentricity_derivatives(stardata,RLOF); + const Boolean retval = + apply_orbital_angular_momentum_and_eccentricity_derivatives(stardata, + RLOF); Dprint("post-apply orb and ecc : J=%g NaN? %d\n", stardata->common.orbit.angular_momentum, isnan(stardata->common.orbit.angular_momentum)); Nancheck(stardata->common.orbit.angular_momentum); - return(retval); + return retval; } diff --git a/src/evolution/evolution_cleanup.c b/src/evolution/evolution_cleanup.c index 859a2028f523aa84254a2c59c20a7ecfa6eb070a..2956f4562bab01a1058b9f670c086ea27fb532ff 100644 --- a/src/evolution/evolution_cleanup.c +++ b/src/evolution/evolution_cleanup.c @@ -55,9 +55,9 @@ void evolution_cleanup(struct stardata_t * RESTRICT const stardata, * output to work properly with the new evolution algorithm : * at some point this should be fixed! */ - if(stardata->preferences->evolution_algorithm==EVOLUTION_ALGORITHM_BINARY_C) stardata->model.dt = TINY*2.0; // small but non-zero - - nucsyn_binary_yield(stardata,TRUE); + stardata->model.dt = TINY*2.0; // small but non-zero + + nucsyn_binary_yield(stardata,TRUE); } #endif Dprint("Leaving function evolution()\n"); diff --git a/src/evolution/evolve_system.c b/src/evolution/evolve_system.c index e9349b820f4cb1212e0155cb7044a21dce95e855..69484471ce41754d7e3ff4980f3a3e3866b3a23f 100644 --- a/src/evolution/evolve_system.c +++ b/src/evolution/evolve_system.c @@ -21,104 +21,11 @@ int evolve_system(struct stardata_t * RESTRICT const stardata) { - int retval; pre_evolution(stardata); - if(stardata->preferences->evolution_algorithm == - EVOLUTION_ALGORITHM_BINARY_C) - { - /* - * new evolution loop for binary_c : leaner, meaner, - * and a lot more readable! - */ - stardata->evolving = TRUE; - retval = evolve_system_binary_c(stardata); - } - else - { - /* - * loop based on the old BSE algorithm - */ - - stardata->evolving = TRUE; - - Dprint("EVOLVE SYSTEM stardata=%p previous_stardata=%p stardata = %p store = %p (buffer = %p, size %zu)\n", - stardata, - stardata->previous_stardata, - stardata, - stardata->store, - stardata->tmpstore->raw_buffer, - stardata->tmpstore->raw_buffer_size - ); - Dprint("In evolve_system() stardata=%p t=%g\n", - stardata,stardata->model.time); - reset_binary_c_timeout(); - - Dprint("Start ev timer\n"); - Start_evolution_timer; - - Dprint("Call start_of_evolution\n"); - if(Is_zero(stardata->model.time)) - start_of_evolution(stardata); - - Dprint("Save to previous\n"); - Boolean evolving=TRUE, - RLOFing_system=FALSE, - initialize=TRUE; - - /* back up to previous stardatas */ - evolution_save_to_previous(stardata); - - Dprint( - "start evolution M1=%g M2=%g t=%g a=%g P=%g\n", - stardata->star[0].mass, - stardata->star[1].mass, - stardata->model.time, - stardata->common.orbit.separation, - stardata->common.orbit.period - ); - - //show_stardata(stardata); - while(evolving==TRUE) - { - stardata->model.model_number++; - - Dprint("Evolution loop top\n"); - if(evolution_loop_top(stardata)==EVOLUTION_BREAK) - { - evolving = FALSE; - Dprint("Break evolution\n"); - } - else - { - /* evolve detached systems... */ - if(RLOFing_system==FALSE) - { - Dprint("Evolve Detached System\n"); - Evolution_loop_check(evolve_detached_system(stardata, - &initialize)); - } - - /* we reach here if RLOF has started or we were already in RLOF */ - - /* ... then evolve RLOF systems */ - Dprint("Evolve RLOFing system\n"); - Evolution_loop_check(evolve_RLOFing_system(stardata)); - } - - /* - * catch outstanding events - */ - catch_events(stardata); - } - Dprint("End of evolution\n"); - - end_of_evolution(stardata); - End_evolution_timer; - evolution_cleanup(stardata,TRUE,TRUE); + stardata->evolving = TRUE; - retval = 0; - } + int retval = evolve_system_binary_c(stardata); post_evolution(stardata); diff --git a/src/main.c b/src/main.c index 9f974bf38863b7ccf387aa9c8b56755f65cfe5d1..d35e5a710ce582d59062a7109686ce1bc9324120 100644 --- a/src/main.c +++ b/src/main.c @@ -26,13 +26,18 @@ * For help and other documention, please see the doc/ * directory. */ -static int binary_c_main(int argc, - char ** argv, - struct stardata_t ** RESTRICT s); int main (int argc, char ** argv) { + /* + * This is binary_c's entry point when called on the + * command line. + * + * In main() we set up signals and floating-point + * options, make a stardata, then call binary_c main + * with the stardata. + */ #if !defined SEGFAULTS char * altstack = setup_segfaults(); #endif @@ -43,13 +48,13 @@ int main (int argc, struct stardata_t * stardata Aligned = NULL; - int ret = binary_c_main(argc,argv,&stardata); + const int ret = binary_c_main(argc,argv,&stardata); + #if !defined SEGFAULTS Safe_free(altstack); #endif -#ifdef CODESTATS - output_codestats(); -#endif//CODESTATS + Output_codestats; + return ret; } @@ -63,18 +68,25 @@ static int binary_c_main(int argc, struct store_t * store = NULL; /* - * Do the main memory allocations and build the store + * binary_c_main is where you end up if you call binary_c + * from the command line. + * + * Most of what is in here is setup then a loop to run + * binary stellar evolution, possibly in batchmode. + * + * First, do the main memory allocations and build the store */ main_allocations(&stardata, NULL, &preferences, &store); - *s = stardata; +#ifdef USE_GSL /* set up GSL */ setup_GSL_handlers(stardata); - +#endif//USE_GSL + /* welcome message */ Dprint ("Welcome to the Binary Star Evolution program binary_c/nucsyn version %s; written by Robert Izzard %d-%d \n", BINARY_C_VERSION, @@ -93,8 +105,8 @@ static int binary_c_main(int argc, #endif /* save argv and argc */ - stardata->common.argv=argv; - stardata->common.argc=argc; + stardata->common.argv = argv; + stardata->common.argc = argc; #ifdef TEST_OPACITY @@ -127,7 +139,12 @@ static int binary_c_main(int argc, #endif - /* set up repeat-run loop */ + /* + * set up repeat-run loop + * + * binary_c has a parameter preferences->repeat which you can + * use to run the current system as many times as you like. + */ int repeat; Boolean repeat_reset = (stardata->preferences->repeat>1); @@ -136,13 +153,9 @@ static int binary_c_main(int argc, for(repeat=0;repeat<stardata->preferences->repeat;repeat++) { - if(0)fprintf(stdout, - "Repeat (in loop) repeat=%d preferences=%p stardata->preferences=%p\n", - repeat, - &preferences, - stardata->preferences); - - /* if we're repeating we need to reset and reload vars */ + /* + * if we're repeating we need to reset and reload vars + */ if(repeat_reset && repeat) { set_default_preferences(preferences); @@ -163,7 +176,6 @@ static int binary_c_main(int argc, if(stardata->preferences->random_systems) { set_random_system(stardata); - fflush(stdout); } #endif //RANDOM_SYSTEMS @@ -177,14 +189,18 @@ static int binary_c_main(int argc, #ifdef BATCHMODE if(Batchmode_is_on(stardata->preferences->batchmode)) { - /* Call the batchmode loop handler to evolve many stars */ + /* + * Call the batchmode loop handler to evolve many stars + */ Call_batchmode_loop; } else { #endif // BATCHMODE - /* Call the evolve_system function to evolve the stars */ - evolve_system (stardata); + /* + * Call the evolve_system function to evolve the stars + */ + evolve_system(stardata); #ifdef BATCHMODE } #endif // BATCHMODE @@ -197,9 +213,8 @@ static int binary_c_main(int argc, /* free all allocated memory */ free_memory(s,TRUE,TRUE,TRUE,TRUE); - - fflush(stdout); - return(BINARY_C_NORMAL_EXIT); + + return BINARY_C_NORMAL_EXIT; } #ifdef CODESTATS diff --git a/src/maths/setup_GSL_handlers.c b/src/maths/setup_GSL_handlers.c index 6efe77afa136078dacab6c4865f5fd37cef4a5c1..77a96948c55af1fe8b8072ff30e580e129f587c7 100644 --- a/src/maths/setup_GSL_handlers.c +++ b/src/maths/setup_GSL_handlers.c @@ -1,5 +1,6 @@ #include "../binary_c.h" +#ifdef USE_GSL /* * Handler for GSL errors */ @@ -7,3 +8,4 @@ void setup_GSL_handlers(struct stardata_t * RESTRICT const stardata) { gsl_set_error_handler_off(); } +#endif//USE_GSL diff --git a/src/setup/cmd_line_args.h b/src/setup/cmd_line_args.h index 366fa3b02f9b0d09b6071e18cd8775a15d81bb43..396d41e1dd3bd7a7a8b6ad12d15ec3f37396c48d 100644 --- a/src/setup/cmd_line_args.h +++ b/src/setup/cmd_line_args.h @@ -467,15 +467,6 @@ struct cmd_line_arg_t &(stardata->preferences->max_model_number), \ 1.0 \ }, \ -{ \ - ARG_SECTION_STARS, \ - "evolution_algorithm", \ - "Set the evolution algorithm. 0 = BSE, 1 = binary_c.", \ - ARG_UNSIGNED_INTEGER , \ - WTTS_USE_DEFAULT, \ - &(stardata->preferences->evolution_algorithm), \ - 1.0 \ - }, \ { \ ARG_SECTION_STARS, \ "monte_carlo_kicks", \ diff --git a/src/setup/set_cmd_line_macro_pairs.c b/src/setup/set_cmd_line_macro_pairs.c index 20d7c2d654442815bcad8132d6cf0dca0091e6dc..3eda0d424ad4b50e4e54487cd7c5120a1cc496f2 100644 --- a/src/setup/set_cmd_line_macro_pairs.c +++ b/src/setup/set_cmd_line_macro_pairs.c @@ -23,10 +23,6 @@ void set_cmd_line_macro_pairs(struct stardata_t * RESTRICT const stardata, unsigned int __i; struct cmd_line_arg_t * __prevarg = NULL; char * __prevstring = NULL; - Add_value_macro_pair("evolution_algorithm", - EVOLUTION_ALGORITHM_BINARY_C); - Add_value_macro_pair("evolution_algorithm", - EVOLUTION_ALGORITHM_BSE); Add_value_macro_pair("stellar_structure_algorithm", STELLAR_STRUCTURE_ALGORITHM_MODIFIED_BSE); Add_value_macro_pair("stellar_structure_algorithm", diff --git a/src/setup/version.c b/src/setup/version.c index 26712de6e3595a82f41de6cd84a8a0613eeb7d70..f749b32acfccc1d722fed8a6bc1b4486e1e9d5b9 100644 --- a/src/setup/version.c +++ b/src/setup/version.c @@ -957,7 +957,7 @@ void version(struct stardata_t * RESTRICT const stardata) #endif Macrotest(FLUSH_LOG); Macrotest(__HAVE_VALGRIND__); - Macrotest(__HAVE_GSL__); + Macrotest(__HAVE_LIBGSL__); Macrotest(__HAVE_LIBBFD__); Macrotest(__HAVE_LIBBSD__); Macrotest(__HAVE_LIBIBERTY__); @@ -988,10 +988,6 @@ void version(struct stardata_t * RESTRICT const stardata) Macrotest(BATCHMODE); Macrotest(NANCHECKS); Macrotest(USE_NATIVE_ISNAN); - - Show_int_macro(EVOLUTION_ALGORITHM_BINARY_C); - Show_int_macro(EVOLUTION_ALGORITHM_BSE); - Macrotest(USE_2011_MASS_LOSS); Macrotest(USE_2012_MAIN_SEQUENCE_LIFETIMES_TABLE); Macrotest(MODULATE_TIMESTEP_TO_RESOLVE_ROTATION_MASS_LOSS); diff --git a/tbse b/tbse index 8866bff0f01de9b946acb30ad541ea73c496b1bb..98fd595a87d4a990bffe90cf02a3454ff0c2c50e 100755 --- a/tbse +++ b/tbse @@ -133,11 +133,6 @@ EFFECTIVE_METALLICITY=DEFAULT_TO_METALLICITY # 3 = STELLAR_STRUCTURE_ALGORITHM_BINT = BINT (work in progress) STELLAR_STRUCTURE_ALGORITHM=STELLAR_STRUCTURE_ALGORITHM_MODIFIED_BSE -# evolution algorithm -# 0 = EVOLUTION_ALGORITHM_BINARY_C = binary_c -# 1 = EVOLUTION_ALGORITHM_BSE = BSE (modified) >>> deprecated <<< -EVOLUTION_ALGORITHM=EVOLUTION_ALGORITHM_BINARY_C - # possible example systems if [ -f "example_systems" ]; then source "example_systems" @@ -2163,7 +2158,6 @@ $WARMUP \ --WDWD_merger_algorithm $WDWD_MERGER_ALGORITHM \ --max_model_number $MAX_MODEL_NUMBER \ --disable_events $DISABLE_EVENTS \ ---evolution_algorithm $EVOLUTION_ALGORITHM \ $STARDATA_DUMP_FILENAME \ $STARDATA_LOAD_FILENAME \ $TIMESTEP_MULTIPLIERS \