EVOLUTION: Move tm and dtm calculation befor applying source terms.

If we have time dependent source terms, we should pass tm and dtm to
subroutine update_sources().

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2017-03-07 15:36:51 -03:00
parent 270cc68414
commit 5786b7f457

View File

@ -543,6 +543,11 @@ module evolution
call start_timer(imu)
#endif /* PROFILE */
! prepare times
!
tm = time + dt
dtm = dt
! update fluxes
!
call update_fluxes()
@ -583,11 +588,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + dt
dtm = dt
! update primitive variables
!
call update_variables(tm, dtm)
@ -656,6 +656,11 @@ module evolution
!= 1st step: U(1) = U(n) + dt * F[U(n)]
!
! prepare times
!
tm = time + dt
dtm = dt
! update fluxes
!
call update_fluxes()
@ -691,17 +696,17 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + dt
dtm = dt
! update primitive variables
!
call update_variables(tm, dtm)
!= 2nd step: U(n+1) = 1/2 U(n) + 1/2 U(1) + 1/2 dt * F[U(1)]
!
! prepare times
!
tm = time + dt
dtm = 0.5d+00 * dt
! update fluxes from the intermediate stage
!
call update_fluxes()
@ -743,11 +748,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + dt
dtm = 0.5d+00 * dt
! update primitive variables
!
call update_variables(tm, dtm)
@ -874,6 +874,11 @@ module evolution
!
do n = 1, stages - 1
! prepare times
!
tm = time + n * ds
dtm = ds
! update fluxes
!
call update_fluxes()
@ -905,11 +910,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + n * ds
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)
@ -918,6 +918,11 @@ module evolution
!= the final step: U(n+1) = 1/m U(0) + (m-1)/m [1 + dt/(m-1) L] U(m-1)
!
! prepare times
!
tm = time + dt
dtm = fl * dt
! update fluxes
!
call update_fluxes()
@ -959,11 +964,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + dt
dtm = fl * dt
! update primitive variables
!
call update_variables(tm, dtm)
@ -1043,6 +1043,11 @@ module evolution
!
ds = dt
! prepare times
!
tm = time + ds
dtm = ds
! update fluxes
!
call update_fluxes()
@ -1078,11 +1083,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + ds
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)
@ -1093,6 +1093,11 @@ module evolution
!
ds = f22 * dt
! prepare times
!
tm = time + 0.5d+00 * dt
dtm = ds
! update fluxes
!
call update_fluxes()
@ -1125,11 +1130,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + 0.5d+00 * dt
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)
@ -1140,6 +1140,11 @@ module evolution
!
ds = f32 * dt
! prepare times
!
tm = time + dt
dtm = ds
! update fluxes
!
call update_fluxes()
@ -1181,11 +1186,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + dt
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)
@ -1266,6 +1266,11 @@ module evolution
!
ds = b1 * dt
! prepare times
!
tm = time + ds
dtm = ds
! update fluxes
!
call update_fluxes()
@ -1301,11 +1306,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + ds
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)
@ -1358,6 +1358,11 @@ module evolution
!
ds = b3 * dt
! prepare times
!
tm = time + 0.5d+00 * dt
dtm = ds
! update fluxes
!
call update_fluxes()
@ -1390,11 +1395,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + 0.5d+00 * dt
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)
@ -1405,6 +1405,11 @@ module evolution
!
ds = b1 * dt
! prepare times
!
tm = time + dt
dtm = ds
! update fluxes
!
call update_fluxes()
@ -1445,11 +1450,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + dt
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)
@ -1538,6 +1538,11 @@ module evolution
!
ds = b1 * dt
! prepare times
!
tm = time + ds
dtm = ds
! update fluxes
!
call update_fluxes()
@ -1573,17 +1578,17 @@ module evolution
end do
! prepare times
!
tm = time + ds
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)
!= 2nd step: U(2) = U(1) + b1 dt F[U(1)]
!
! prepare times
!
tm = time + 2.0d+00 * ds
dtm = ds
! update fluxes
!
call update_fluxes()
@ -1615,11 +1620,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + 2.0d+00 * ds
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)
@ -1630,6 +1630,11 @@ module evolution
!
ds = b3 * dt
! prepare times
!
tm = time + (2.0d+00 * a33 * b1 + b3) * dt
dtm = ds
! update fluxes
!
call update_fluxes()
@ -1662,11 +1667,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + (2.0d+00 * a33 * b1 + b3) * dt
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)
@ -1677,6 +1677,11 @@ module evolution
!
ds = b4 * dt
! prepare times
!
tm = time + ((2.0d+00 * b1 * a33 + b3) * a44 + b4) * dt
dtm = ds
! update fluxes
!
call update_fluxes()
@ -1713,11 +1718,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + ((2.0d+00 * b1 * a33 + b3) * a44 + b4) * dt
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)
@ -1728,6 +1728,12 @@ module evolution
!
ds = b5 * dt
! prepare times
!
tm = time + dt
dtm = ds
! update fluxes
!
call update_fluxes()
@ -1765,11 +1771,6 @@ module evolution
end do ! over data blocks
! prepare times
!
tm = time + dt
dtm = ds
! update primitive variables
!
call update_variables(tm, dtm)