Determines whether simulation is over.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(timer_obj), | intent(inout) | :: | this |
Timer |
Result
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