This update includes the pull request "Bugfix/reset dt consistently new"
This fix closes issue #33; I've tested and confirmed (by forcing restart_time_step to .true.) that if the timestep needs be reset, the changes to g and phi are discarded and the timestep is re-done (for both flip_flop = .false. and flip_flop = .true.)
Replaced {cfl_cushion; delt_adjust} by {cfl_cushion_upper; cfl_cushion_middle; cfl_cushion_lower}
If code_dt>cfl_dt*cfl_cushion_upper or code_dt<cfl_dt*cfl_cushion_lower, set code_dt to cfl_dt*cfl_cushion_middle. If we set cfl_cushion_upper=cfl_cushion and cfl_cushion_middle=cfl_cushion_upper/delt_adjust, then the behaviour is the same as before. If cfl_cushion_lower is very low, the code_dt will never be increased. Regardless, code_dt will never increase above delt_max=code_dt_max.
Exit stella if code_dt has been reset more than 5 times in the same while loop. If the cfl_cushions are chosen badly, or if a simulation is running which fluctuates too strongly in |phi|^2, then we can trigger the increase and decrease of cde_dt over and over, thus exit stella to not waste CPU time.
If code_dt < delt_min=code_dt_min, exit stella. Sometimes a simulation blows up and code_dt drops to 1e-10 or 1e-100, exit stella to not waste CPU time.
Split up cfl_dt in {cfl_dt_linear; cfl_dt_exb; cfl_dt_parallel} in order to print information about cfl_dt_exb to the output file, this allows us to choose {cfl_cushion_upper; cfl_cushion_middle; cfl_cushion_lower} more accurately in future simulations.
This fix closes issue #33; I've tested and confirmed (by forcing restart_time_step to .true.) that if the timestep needs be reset, the changes to g and phi are discarded and the timestep is re-done (for both flip_flop = .false. and flip_flop = .true.)
If code_dt>cfl_dt*cfl_cushion_upper or code_dt<cfl_dt*cfl_cushion_lower, set code_dt to cfl_dt*cfl_cushion_middle. If we set cfl_cushion_upper=cfl_cushion and cfl_cushion_middle=cfl_cushion_upper/delt_adjust, then the behaviour is the same as before. If cfl_cushion_lower is very low, the code_dt will never be increased. Regardless, code_dt will never increase above delt_max=code_dt_max.
Exit stella if code_dt has been reset more than 5 times in the same while loop. If the cfl_cushions are chosen badly, or if a simulation is running which fluctuates too strongly in |phi|^2, then we can trigger the increase and decrease of cde_dt over and over, thus exit stella to not waste CPU time.
If code_dt < delt_min=code_dt_min, exit stella. Sometimes a simulation blows up and code_dt drops to 1e-10 or 1e-100, exit stella to not waste CPU time.
Split up cfl_dt in {cfl_dt_linear; cfl_dt_exb; cfl_dt_parallel} in order to print information about cfl_dt_exb to the output file, this allows us to choose {cfl_cushion_upper; cfl_cushion_middle; cfl_cushion_lower} more accurately in future simulations.