timer_obj_Done Function

private impure function timer_obj_Done(this) result(res)

Determines whether simulation is over.

Type Bound

timer_obj

Arguments

Type IntentOptional Attributes Name
class(timer_obj), intent(inout) :: this

Timer

Return Value logical

Result


Called by

proc~~timer_obj_done~~CalledByGraph proc~timer_obj_done timer_obj%timer_obj_Done program~main main program~main->proc~timer_obj_done

Source Code

    impure function timer_obj_Done(this) result(res)
      !> Determines whether simulation is over.
      implicit none
      class(timer_obj), intent(inout) :: this                                  !! Timer
      logical :: res                                                           !! Result

      res=.false.
      if (this%finish) then
        res=.true.
        return
      else
        ! Check simulation time
        if (this%time+this%dt.gt.this%time_max) then
          res=.true.
          return
        end if
        ! Check iteration count
        if (this%iter+1 .gt.this%iter_max) then
          res=.true.
          return
        end if
        ! Check we hit max wall clock time (-10min)
        if (this%parallel%Time()-this%starttime.gt.(this%time_wall-10.0_wp/60.0_wp)*3600.0_wp) then
          res=.true.
          return
        end if
        ! Check walltime
      end if

      return
    end function timer_obj_Done