Implements type time_step_controller.
|
| subroutine | time_step_controller_init (this, params) |
| | Constructor.
|
| |
| pure real(kind=dp) function | time_step_controller_first_dt (this, time, cfl) |
| | The first time step of a variable time step run: the one giving the target CFL number, limited by timestep, max_timestep and min_timestep where given.
|
| |
| subroutine | time_step_controller_set_dt (this, time, cfl) |
| | Set new dt based on cfl if requested.
|
| |
| subroutine | time_step_controller_land (this, time, time_to_next) |
| | Fit the time step so that the next scheduled time, or the end time, is reached exactly.
|
| |
|
| real(kind=dp), parameter, public | landing_tol = 1.0e-6_dp |
| | Relative tolerance on the number of steps up to a scheduled time, so that round-off in the accumulated time does not add a step, and on the change of the step that counts as one.
|
| |
| real(kind=dp), parameter | max_landing_steps = 1.0e15_dp |
| | Largest number of steps up to a scheduled time that is still fitted.
|
| |
◆ time_step_controller_first_dt()
- Parameters
-
| time | The time state, whose dt is the step the CFL number was computed with. |
| cfl | The CFL number of that step. |
Definition at line 157 of file time_step_controller.f90.
◆ time_step_controller_init()
◆ time_step_controller_land()
- Parameters
-
| time | The time state, whose dt is the step proposed by the CFL controller, adjusted in place. |
| time_to_next | The time until the next scheduled time, as time_to_next of the controllers gives it, huge(0.0_dp) if none. |
To be called right after set_dt. The time up to the next target is divided into the number of equal steps nearest, in ratio, to the proposed step, within min_dt_decrease_factor and max_dt_increase_factor of the previous step and below max_timestep. As long as the CFL controller keeps the step and the step divides the remaining time, which it does between scheduled times and at those of equal intervals, the step is returned unchanged. The end is the target if the next scheduled time is within min_dt_decrease_factor times the previous step of it, and that scheduled time is executed at the end. A scheduled time closer than that is passed, and executed at the first step past it.
Designed for output intervals of several steps, the same for all controllers or whole multiples of each other. Schedules that produce scheduled times close to each other make the step shorter than needed.
Definition at line 286 of file time_step_controller.f90.
◆ time_step_controller_set_dt()
- Parameters
-
| time | The time state, whose dt is the step taken last on entry and the step about to be taken on exit. |
| cfl | courant number of current iteration. @Algorithm:
- Set the first time step such that cfl is the set one;
- During time-stepping, adjust dt when cfl_avg is offset by 20%.
- An exact zero cfl, e.g. from a zero velocity field, puts no limit on dt, so the first time step is the initial one and a later one is increased by the maximum increase factor. With
exact_output_time the step is then fitted to the next scheduled time by land, which is to be called right after.
|
Definition at line 181 of file time_step_controller.f90.
◆ landing_tol
◆ max_landing_steps
| real(kind=dp), parameter time_step_controller::max_landing_steps = 1.0e15_dp |
|
private |