Neko 1.99.9
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
time_based_controller.f90 File Reference

Go to the source code of this file.

Data Types

type  time_based_controller::time_based_controller_t
 A utility type for determining whether an action should be executed based on the current time value. Used to e.g. control whether we should write a file or execute a simcomp. More...
 

Modules

module  time_based_controller
 Contains the time_based_controller_t type.
 

Functions/Subroutines

subroutine time_based_controller::time_based_controller_init (this, start_time, end_time, control_mode, control_value, write_at_start, anchor_time, direction)
 Constructor.
 
subroutine time_based_controller::time_based_controller_free (this)
 Destructor.
 
logical function time_based_controller::time_based_controller_check (this, time, force)
 Check if the execution should be performed.
 
pure integer function time_based_controller::next_index_after (this, time)
 The number of scheduled times at or before the given time, counted from first_index. Assigning it to next_index after an execution makes the next scheduled time the first one after the given time.
 
subroutine time_based_controller::time_based_controller_register_execution (this, time)
 Increment nexecutions and advance next_index past the current time.
 
subroutine time_based_controller::time_based_controller_set_counter (this, time)
 Set next_index to the first scheduled time not yet reached, and nexecutions to the number of executions performed up to the current time. Called when restarting a simulation.
 
pure real(kind=dp) function time_based_controller::time_based_controller_tolerance (this, dt)
 The tolerance used when comparing the simulation time to a scheduled execution time.
 
pure real(kind=dp) function time_based_controller::time_based_controller_next_time (this)
 The time of the next scheduled execution.
 

Variables

real(kind=dp), parameter, public time_based_controller::time_tol = 0.1_dp
 Tolerance for comparing the simulation time to a scheduled time, as a fraction of the time step. A scheduled time t_k is considered reached at the first step with t >= t_k - TIME_TOL * dt, so that round-off in the accumulation of t does not postpone the execution by a full step. The tolerance is limited to the same fraction of the output interval, so that a time step longer than the interval (in particular the dt = 1 placeholder a variable time step run starts from) cannot make a scheduled time count as reached before the previous one has passed.
 
real(kind=dp), parameter, public time_based_controller::span_tol = 1.0e-9_dp
 Relative tolerance for round-off in k * time_interval when comparing a scheduled time to start_time and end_time.