EQUATIONS: Add status flag to update_primitive_variables().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2021-11-09 12:51:23 -03:00
parent 86cf55e836
commit 17f867cb08
2 changed files with 10 additions and 2 deletions

View File

@ -1412,7 +1412,7 @@ module equations
!
!===============================================================================
!
subroutine update_primitive_variables(uu, qq)
subroutine update_primitive_variables(uu, qq, status)
! include external procedures and variables
!
@ -1427,6 +1427,7 @@ module equations
!
real(kind=8), dimension(:,:,:,:), intent(inout) :: uu
real(kind=8), dimension(:,:,:,:), intent(inout) :: qq
integer , intent(out) :: status
! temporary variables
!
@ -1434,6 +1435,8 @@ module equations
!
!-------------------------------------------------------------------------------
!
status = 0
! update primitive variables
!
#if NDIMS == 3

View File

@ -3627,7 +3627,10 @@ module evolution
do while (associated(pdata))
pmeta => pdata%meta
if (pmeta%update) call update_primitive_variables(pdata%u, pdata%q)
if (pmeta%update) then
call update_primitive_variables(pdata%u, pdata%q, status)
if (status /= 0) go to 100
end if
pdata => pdata%next
end do
@ -3671,6 +3674,8 @@ module evolution
end do
end if
100 continue
#ifdef PROFILE
call stop_timer(imv)
#endif /* PROFILE */