MESH: Add status argument to update_mesh().
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
5368b60f18
commit
83f25af24a
@ -425,6 +425,10 @@ module evolution
|
||||
! input variables
|
||||
!
|
||||
real(kind=8), intent(in) :: dtnext
|
||||
|
||||
! local variables
|
||||
!
|
||||
integer :: status
|
||||
!
|
||||
!-------------------------------------------------------------------------------
|
||||
!
|
||||
@ -452,7 +456,7 @@ module evolution
|
||||
|
||||
! check refinement and refine
|
||||
!
|
||||
call update_mesh()
|
||||
call update_mesh(status)
|
||||
|
||||
! update primitive variables
|
||||
!
|
||||
|
@ -758,25 +758,28 @@ module mesh
|
||||
! In the MPI version the data blocks are redistributed among all processes
|
||||
! 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
|
||||
!
|
||||
use blocks , only : build_leaf_list
|
||||
use blocks, only : build_leaf_list
|
||||
#ifdef DEBUG
|
||||
use blocks , only : check_neighbors
|
||||
use blocks, only : check_neighbors
|
||||
#endif /* DEBUG */
|
||||
|
||||
! local variables are not implicit by default
|
||||
!
|
||||
implicit none
|
||||
|
||||
! local variables
|
||||
! subroutine arguments
|
||||
!
|
||||
integer :: status
|
||||
integer, intent(out) :: status
|
||||
|
||||
!-------------------------------------------------------------------------------
|
||||
!
|
||||
@ -809,6 +812,7 @@ module mesh
|
||||
! update the list of leafs
|
||||
!
|
||||
call build_leaf_list(status)
|
||||
if (status /= 0) go to 100
|
||||
|
||||
#ifdef MPI
|
||||
! redistribute blocks equally among all processors
|
||||
@ -822,6 +826,10 @@ module mesh
|
||||
call check_neighbors()
|
||||
#endif /* DEBUG */
|
||||
|
||||
! error entry point
|
||||
!
|
||||
100 continue
|
||||
|
||||
#ifdef PROFILE
|
||||
! stop accounting time for the adaptive mesh refinement update
|
||||
!
|
||||
|
Loading…
x
Reference in New Issue
Block a user