EVOLUTION: Add status argument to advance().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2019-02-12 10:34:38 -02:00
parent 83f25af24a
commit 721cf8efae
2 changed files with 15 additions and 15 deletions

View File

@ -540,7 +540,7 @@ program amun
! performe one step evolution
!
call advance(dtnext)
call advance(dtnext, iret)
! advance the iteration number and time
!

View File

@ -403,21 +403,19 @@ module evolution
!
! Arguments:
!
! dtnext - next time step;
! dtnext - the next time step;
! status - the subroutine call status: 0 for success, otherwise failure;
!
!===============================================================================
!
subroutine advance(dtnext)
subroutine advance(dtnext, status)
! include external procedures
! references
!
use blocks , only : set_blocks_update
use coordinates, only : toplev
use mesh , only : update_mesh
! include external variables
!
use coordinates , only : toplev
! local variables are not implicit by default
!
implicit none
@ -425,10 +423,7 @@ module evolution
! input variables
!
real(kind=8), intent(in) :: dtnext
! local variables
!
integer :: status
integer , intent(out) :: status
!
!-------------------------------------------------------------------------------
!
@ -457,6 +452,7 @@ module evolution
! check refinement and refine
!
call update_mesh(status)
if (status /= 0) go to 100
! update primitive variables
!
@ -474,6 +470,10 @@ module evolution
call check_variables()
#endif /* DEBUG */
! error entry point
!
100 continue
#ifdef PROFILE
! stop accounting time for solution advance
!