Merge branch 'master' into flux-tubes

This commit is contained in:
Grzegorz Kowal 2023-08-29 17:23:32 -03:00
commit f50ccca3a2

View File

@ -1088,34 +1088,38 @@ module evolution
!
subroutine advance(status)
! references
!
use blocks , only : set_blocks_update
use coordinates, only : toplev
use forcing , only : update_forcing, forcing_enabled
use mesh , only : update_mesh
! local variables are not implicit by default
!
implicit none
! input variables
!
integer, intent(out) :: status
!
!-------------------------------------------------------------------------------
!
! advance the solution using the selected method
!
call evolve()
! add forcing contribution
! add forcing contribution, requires the boundary and primitive variable update
!
if (forcing_enabled) call update_forcing(time, dt)
if (forcing_enabled) then
call update_forcing(time, dt)
call update_variables(time + dt, 0.0d+00, status)
if (status /= 0) go to 100
end if
! check if we need to perform the refinement step
!
if (toplev > 1) then
! set all meta blocks to not be updated
!
call set_blocks_update(.false.)
! check refinement and refine
!
call update_mesh(status)
@ -1126,6 +1130,10 @@ module evolution
call update_variables(time + dt, 0.0d+00, status)
if (status /= 0) go to 100
! set all meta blocks to be updated
!
call set_blocks_update(.true.)
end if ! toplev > 1
! error entry point