diff --git a/src/timestep/nonstellar_timestep.c b/src/timestep/nonstellar_timestep.c new file mode 100644 index 0000000000000000000000000000000000000000..b7a895c97f51a32d4a97440b6e89a4beaebd2d4b --- /dev/null +++ b/src/timestep/nonstellar_timestep.c @@ -0,0 +1,30 @@ +#include "../binary_c.h" +No_empty_translation_unit_warning; + +#include "timestep.h" + +void nonstellar_timestep(struct stardata_t * const stardata, + double * const dtm) +{ + Foreach_star(star) + { + timestep_fixed_timesteps(stardata, + star, + dtm); + } + + /* + * Hard wired minimum : do not apply + * if the timestep is limited by a fixed timestep + */ + Foreach_star(star) + { + if(stardata->model.fixed_timestep_triggered == FALSE && + star->dtlimiter != DT_LIMIT_FIXED_TIMESTEP) + { + *dtm = Max(*dtm, + MINIMUM_STELLAR_TIMESTEP); + } + } + +}