|
Neko 1.99.9
A portable framework for high-order spectral element flow simulations
|
Provides a tool to set time step dt. More...
Public Member Functions | |
| procedure, pass(this) | init (this, params) |
| Initialize object. | |
| procedure, pass(this) | set_dt (this, time, cfl) |
| Set time stepping. | |
| procedure, pass(this) | first_dt (this, time, cfl) |
| The first time step of a variable time step run. | |
| procedure, pass(this) | land (this, time, time_to_next) |
| Fit the time step to land on the next scheduled time. | |
Public Attributes | |
| logical | is_variable_dt = .false. |
| real(kind=dp) | cfl_trg = 0.0_dp |
| real(kind=dp) | cfl_avg = 0.0_dp |
| real(kind=dp) | init_dt = huge(0.0_dp) |
| real(kind=dp) | max_dt = 0.0_dp |
| real(kind=dp) | min_dt = 0.0_dp |
| integer | max_update_frequency = 0 |
| integer | min_update_frequency = 0 |
| integer | dt_last_change = -1 |
| Number of time steps since the time step last changed, 0 at the step it changed, -1 until the first time step. | |
| real(kind=dp) | alpha = 0.0_dp |
| coefficient of running average | |
| real(kind=dp) | max_dt_increase_factor = 0.0_dp |
| real(kind=dp) | min_dt_decrease_factor = 0.0_dp |
| real(kind=dp) | dev_tol = 0.0_dp |
| logical | exact_output_time = .false. |
| Whether to fit the time step so that the scheduled sampling and output times, and the end time, are reached exactly. | |
| real(kind=dp) | dt_previous = 0.0_dp |
| The step taken last. | |
Definition at line 57 of file time_step_controller.f90.
| procedure, pass(this) time_step_controller::time_step_controller_t::first_dt | ( | class(time_step_controller_t), intent(in) | this, |
| type(time_state_t), intent(in) | time, | ||
| real(kind=dp), intent(in) | cfl | ||
| ) |
| 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 84 of file time_step_controller.f90.
| procedure, pass(this) time_step_controller::time_step_controller_t::init | ( | class(time_step_controller_t), intent(inout) | this, |
| type(json_file), intent(inout) | params | ||
| ) |
| params | The time settings of the case file, case.time. |
Definition at line 80 of file time_step_controller.f90.
| procedure, pass(this) time_step_controller::time_step_controller_t::land | ( | class(time_step_controller_t), intent(inout) | this, |
| type(time_state_t), intent(inout) | time, | ||
| real(kind=dp), intent(in) | time_to_next | ||
| ) |
| 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 86 of file time_step_controller.f90.
| procedure, pass(this) time_step_controller::time_step_controller_t::set_dt | ( | class(time_step_controller_t), intent(inout) | this, |
| type(time_state_t), intent(inout) | time, | ||
| real(kind=dp), intent(in) | cfl | ||
| ) |
| 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:
|
Definition at line 82 of file time_step_controller.f90.
| real(kind=dp) time_step_controller::time_step_controller_t::alpha = 0.0_dp |
Definition at line 69 of file time_step_controller.f90.
| real(kind=dp) time_step_controller::time_step_controller_t::cfl_avg = 0.0_dp |
Definition at line 60 of file time_step_controller.f90.
| real(kind=dp) time_step_controller::time_step_controller_t::cfl_trg = 0.0_dp |
Definition at line 59 of file time_step_controller.f90.
| real(kind=dp) time_step_controller::time_step_controller_t::dev_tol = 0.0_dp |
Definition at line 72 of file time_step_controller.f90.
| integer time_step_controller::time_step_controller_t::dt_last_change = -1 |
Definition at line 68 of file time_step_controller.f90.
| real(kind=dp) time_step_controller::time_step_controller_t::dt_previous = 0.0_dp |
Definition at line 77 of file time_step_controller.f90.
| logical time_step_controller::time_step_controller_t::exact_output_time = .false. |
Definition at line 75 of file time_step_controller.f90.
Definition at line 61 of file time_step_controller.f90.
| logical time_step_controller::time_step_controller_t::is_variable_dt = .false. |
Definition at line 58 of file time_step_controller.f90.
| real(kind=dp) time_step_controller::time_step_controller_t::max_dt = 0.0_dp |
Definition at line 62 of file time_step_controller.f90.
| real(kind=dp) time_step_controller::time_step_controller_t::max_dt_increase_factor = 0.0_dp |
Definition at line 70 of file time_step_controller.f90.
| integer time_step_controller::time_step_controller_t::max_update_frequency = 0 |
Definition at line 64 of file time_step_controller.f90.
| real(kind=dp) time_step_controller::time_step_controller_t::min_dt = 0.0_dp |
Definition at line 63 of file time_step_controller.f90.
| real(kind=dp) time_step_controller::time_step_controller_t::min_dt_decrease_factor = 0.0_dp |
Definition at line 71 of file time_step_controller.f90.
| integer time_step_controller::time_step_controller_t::min_update_frequency = 0 |
Definition at line 65 of file time_step_controller.f90.