The relevant parameters in the input deck are
, , . These correspond to the simulation end time in normalized units, the number of desired outputs, and the maximum time-step
has to be an integer. If that is satisfied, the code enters a loop that goes from the 1st output step to the last. Within this loop, the goal is to have another loop such that OSHUN runs from beginning to end with a maximum time-step given by .
Numerically, it can be described by the following.
The first loop is given by
where tout_start = 0. Therefore, the loop goes from output no. 1 to output no. . Within this loop, the following is performed
where .
The Clock function is responsible for determining the time step. First, it calculates the number of timesteps within each clock loop using to ensure that . Using , the timestep is determined by .
This same Clock loop is performed times.