Neko 0.9.99
A portable framework for high-order spectral element flow simulations
Loading...
Searching...
No Matches
time_based_controller Module Reference

Contains the time_based_controller_t type.

Data Types

interface  assignment(=)
 
type  time_based_controller_t
 A utility type for determening 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. Note that the nexecutions variable should be incremented externally by calling the register_execution procedure. This is to allow running the the check multiple times at the same time step. More...
 

Functions/Subroutines

subroutine time_based_controller_init (this, end_time, control_mode, control_value)
 Constructor.
 
logical function time_based_controller_check (this, t, tstep, force)
 Check if the execution should be performed.
 
subroutine time_based_controller_assignment (ctrl1, ctrl2)
 Assignment operator. Simply copies attribute values.
 
subroutine time_based_controller_register_execution (this)
 Increment nexectutions.
 
subroutine time_based_controller_set_counter (this, t)
 Set the counter based on a time (for restarts)
 

Function/Subroutine Documentation

◆ time_based_controller_assignment()

subroutine time_based_controller::time_based_controller_assignment ( type(time_based_controller_t), intent(inout ctrl1,
type(time_based_controller_t), intent(in ctrl2 
)
private
Parameters
ctrl1Left-hand side.
ctrl2Right-hand side.

Definition at line 165 of file time_based_controller.f90.

◆ time_based_controller_check()

logical function time_based_controller::time_based_controller_check ( class(time_based_controller_t), intent(inout this,
real(kind=rp), intent(in t,
integer, intent(in tstep,
logical, intent(in), optional  force 
)
private
Parameters
tTime value.
tstepCurrent timestep.
forceWhether to force returning true. Optional.
Note
In the logic, nsteps being zero corresponds to us not knowing the number of time-steps between executions and thus having to rely on nexecutions. This is done in anticipation of having a variable timestep.

Definition at line 133 of file time_based_controller.f90.

◆ time_based_controller_init()

subroutine time_based_controller::time_based_controller_init ( class(time_based_controller_t), intent(inout this,
real(kind=rp), intent(in end_time,
character(len=*), intent(in control_mode,
real(kind=rp), intent(in control_value 
)
private
Parameters
end_timeThe final simulation time.
control_modeThe way to interpret the control_value parameter.
control_valueThe value definining the execution frequency.

Definition at line 90 of file time_based_controller.f90.

◆ time_based_controller_register_execution()

subroutine time_based_controller::time_based_controller_register_execution ( class(time_based_controller_t), intent(inout this)
private

Definition at line 178 of file time_based_controller.f90.

◆ time_based_controller_set_counter()

subroutine time_based_controller::time_based_controller_set_counter ( class(time_based_controller_t), intent(inout this,
real(kind=rp), intent(in t 
)
private
Parameters
tsimulation time.

Definition at line 187 of file time_based_controller.f90.