next_time_step Subroutine

subroutine next_time_step()

Changes to the next time step in the sequence as determined by the usual rules to reduce the timestep in a nonlinear simulation.

Arguments

None

Contents

Source Code


Source Code

  subroutine next_time_step
    use gs2_time, only: code_dt, save_dt
    use gs2_reinit, only: reduce_time_step
    use fields, only: f_reset => reset_init
    use collisions, only: c_reset => reset_init
    use dist_fn, only: d_reset => finish_dist_fn_level_3
    implicit none

    !First reduce the time step
    call reduce_time_step

    !Save the time step
    call save_dt(code_dt)

    !Now reset the modules
    call d_reset
    call c_reset
    call f_reset
  end subroutine next_time_step