is_restart_write_step Function

function is_restart_write_step(params, step) result(write_now)

Arguments

Type IntentOptional Attributes Name
type(case_params_t), intent(in) :: params
integer, intent(in) :: step

Return Value logical


Source Code

   logical function is_restart_write_step(params, step) result(write_now)
      type(case_params_t), intent(in) :: params
      integer, intent(in) :: step

      write_now = .false.
      if (.not. params%write_restart) return
      if (params%restart_interval <= 0) return
      write_now = (mod(step, params%restart_interval) == 0) .or. (step == params%nsteps)
   end function is_restart_write_step