MESH: Add status argument to update_mesh().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2019-02-12 10:31:30 -02:00
parent 5368b60f18
commit 83f25af24a
2 changed files with 18 additions and 6 deletions

View File

@ -425,6 +425,10 @@ module evolution
! input variables ! input variables
! !
real(kind=8), intent(in) :: dtnext real(kind=8), intent(in) :: dtnext
! local variables
!
integer :: status
! !
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
@ -452,7 +456,7 @@ module evolution
! check refinement and refine ! check refinement and refine
! !
call update_mesh() call update_mesh(status)
! update primitive variables ! update primitive variables
! !

View File

@ -758,10 +758,13 @@ module mesh
! In the MPI version the data blocks are redistributed among all processes ! In the MPI version the data blocks are redistributed among all processes
! after the mesh update. ! after the mesh update.
! !
! Arguments:
!
! status - the subroutine call status: 0 for success, otherwise failure;
! !
!=============================================================================== !===============================================================================
! !
subroutine update_mesh() subroutine update_mesh(status)
! import external procedures and variables ! import external procedures and variables
! !
@ -774,9 +777,9 @@ module mesh
! !
implicit none implicit none
! local variables ! subroutine arguments
! !
integer :: status integer, intent(out) :: status
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
@ -809,6 +812,7 @@ module mesh
! update the list of leafs ! update the list of leafs
! !
call build_leaf_list(status) call build_leaf_list(status)
if (status /= 0) go to 100
#ifdef MPI #ifdef MPI
! redistribute blocks equally among all processors ! redistribute blocks equally among all processors
@ -822,6 +826,10 @@ module mesh
call check_neighbors() call check_neighbors()
#endif /* DEBUG */ #endif /* DEBUG */
! error entry point
!
100 continue
#ifdef PROFILE #ifdef PROFILE
! stop accounting time for the adaptive mesh refinement update ! stop accounting time for the adaptive mesh refinement update
! !