diff --git a/sources/equations.F90 b/sources/equations.F90 index e8f1723..da50da6 100644 --- a/sources/equations.F90 +++ b/sources/equations.F90 @@ -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 diff --git a/sources/evolution.F90 b/sources/evolution.F90 index 8136418..878f117 100644 --- a/sources/evolution.F90 +++ b/sources/evolution.F90 @@ -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 */