Merge branch 'master' into reconnection
This commit is contained in:
commit
84d04a3249
@ -331,7 +331,7 @@ module evolution
|
|||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(time + dt, 0.0d+00)
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
! check variables for NaNs
|
! check variables for NaNs
|
||||||
@ -527,6 +527,10 @@ module evolution
|
|||||||
!
|
!
|
||||||
type(block_data), pointer :: pdata
|
type(block_data), pointer :: pdata
|
||||||
|
|
||||||
|
! local variables
|
||||||
|
!
|
||||||
|
real(kind=8) :: tm, dtm
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
!
|
!
|
||||||
real(kind=8), dimension(nv,im,jm,km) :: du
|
real(kind=8), dimension(nv,im,jm,km) :: du
|
||||||
@ -579,9 +583,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + dt
|
||||||
|
dtm = dt
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for one step update
|
! stop accounting time for one step update
|
||||||
@ -629,6 +638,10 @@ module evolution
|
|||||||
!
|
!
|
||||||
type(block_data), pointer :: pdata
|
type(block_data), pointer :: pdata
|
||||||
|
|
||||||
|
! local variables
|
||||||
|
!
|
||||||
|
real(kind=8) :: tm, dtm
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
!
|
!
|
||||||
real(kind=8), dimension(nv,im,jm,km) :: du
|
real(kind=8), dimension(nv,im,jm,km) :: du
|
||||||
@ -641,6 +654,8 @@ module evolution
|
|||||||
call start_timer(imu)
|
call start_timer(imu)
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
|
!= 1st step: U(1) = U(n) + dt * F[U(n)]
|
||||||
|
!
|
||||||
! update fluxes
|
! update fluxes
|
||||||
!
|
!
|
||||||
call update_fluxes()
|
call update_fluxes()
|
||||||
@ -676,10 +691,17 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + dt
|
||||||
|
dtm = dt
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_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)]
|
||||||
|
!
|
||||||
! update fluxes from the intermediate stage
|
! update fluxes from the intermediate stage
|
||||||
!
|
!
|
||||||
call update_fluxes()
|
call update_fluxes()
|
||||||
@ -721,9 +743,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + dt
|
||||||
|
dtm = 0.5d+00 * dt
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for one step update
|
! stop accounting time for one step update
|
||||||
@ -778,6 +805,7 @@ module evolution
|
|||||||
!
|
!
|
||||||
integer :: n
|
integer :: n
|
||||||
real(kind=8) :: ds
|
real(kind=8) :: ds
|
||||||
|
real(kind=8) :: tm, dtm
|
||||||
|
|
||||||
! local saved variables
|
! local saved variables
|
||||||
!
|
!
|
||||||
@ -877,9 +905,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + n * ds
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
end do ! n = 1, stages - 1
|
end do ! n = 1, stages - 1
|
||||||
|
|
||||||
@ -926,9 +959,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + dt
|
||||||
|
dtm = fl * dt
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for one step update
|
! stop accounting time for one step update
|
||||||
@ -980,6 +1018,7 @@ module evolution
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
real(kind=8) :: ds
|
real(kind=8) :: ds
|
||||||
|
real(kind=8) :: tm, dtm
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
!
|
!
|
||||||
@ -998,8 +1037,8 @@ module evolution
|
|||||||
call start_timer(imu)
|
call start_timer(imu)
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
!! 1st substep of integration
|
!= 1st substep: U(1) = U(n) + dt F[U(n)]
|
||||||
!!
|
!
|
||||||
! prepare the fractional time step
|
! prepare the fractional time step
|
||||||
!
|
!
|
||||||
ds = dt
|
ds = dt
|
||||||
@ -1039,12 +1078,17 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + ds
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
!! 2nd substep of integration
|
!= 2nd step: U(2) = 3/4 U(n) + 1/4 U(1) + 1/4 dt F[U(1)]
|
||||||
!!
|
!
|
||||||
! prepare the fractional time step
|
! prepare the fractional time step
|
||||||
!
|
!
|
||||||
ds = f22 * dt
|
ds = f22 * dt
|
||||||
@ -1081,12 +1125,17 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + 0.5d+00 * dt
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
!! 3rd substep of integration
|
!= 3rd step: U(n+1) = 1/3 U(n) + 2/3 U(2) + 2/3 dt F[U(2)]
|
||||||
!!
|
!
|
||||||
! prepare the fractional time step
|
! prepare the fractional time step
|
||||||
!
|
!
|
||||||
ds = f32 * dt
|
ds = f32 * dt
|
||||||
@ -1132,9 +1181,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + dt
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for one step update
|
! stop accounting time for one step update
|
||||||
@ -1187,6 +1241,7 @@ module evolution
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
real(kind=8) :: ds
|
real(kind=8) :: ds
|
||||||
|
real(kind=8) :: tm, dtm
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
!
|
!
|
||||||
@ -1246,9 +1301,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + ds
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
!= 2nd step: U(2) = U(1) + 1/2 dt F[U(1)]
|
!= 2nd step: U(2) = U(1) + 1/2 dt F[U(1)]
|
||||||
!
|
!
|
||||||
@ -1283,9 +1343,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + dt
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
!= 3rd step: U(3) = 2/3 U(n) + 1/3 U(2) + 1/6 dt F[U(2)]
|
!= 3rd step: U(3) = 2/3 U(n) + 1/3 U(2) + 1/6 dt F[U(2)]
|
||||||
!
|
!
|
||||||
@ -1325,9 +1390,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + 0.5d+00 * dt
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
!= the final step: U(n+1) = U(3) + 1/2 dt F[U(3)]
|
!= the final step: U(n+1) = U(3) + 1/2 dt F[U(3)]
|
||||||
!
|
!
|
||||||
@ -1375,9 +1445,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + dt
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for one step update
|
! stop accounting time for one step update
|
||||||
@ -1430,6 +1505,7 @@ module evolution
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
real(kind=8) :: ds
|
real(kind=8) :: ds
|
||||||
|
real(kind=8) :: tm, dtm
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
!
|
!
|
||||||
@ -1442,7 +1518,7 @@ module evolution
|
|||||||
real(kind=8), parameter :: b4 = 2.38458932846290d-01
|
real(kind=8), parameter :: b4 = 2.38458932846290d-01
|
||||||
real(kind=8), parameter :: b5 = 2.87632146308408d-01
|
real(kind=8), parameter :: b5 = 2.87632146308408d-01
|
||||||
real(kind=8), parameter :: a31 = 3.55909775063327d-01
|
real(kind=8), parameter :: a31 = 3.55909775063327d-01
|
||||||
real(kind=8), parameter :: a33 = 6.44090224936674d-01
|
real(kind=8), parameter :: a33 = 6.44090224936673d-01
|
||||||
real(kind=8), parameter :: a41 = 3.67933791638137d-01
|
real(kind=8), parameter :: a41 = 3.67933791638137d-01
|
||||||
real(kind=8), parameter :: a44 = 6.32066208361863d-01
|
real(kind=8), parameter :: a44 = 6.32066208361863d-01
|
||||||
real(kind=8), parameter :: a53 = 2.37593836598569d-01
|
real(kind=8), parameter :: a53 = 2.37593836598569d-01
|
||||||
@ -1497,9 +1573,14 @@ module evolution
|
|||||||
|
|
||||||
end do
|
end do
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + ds
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
!= 2nd step: U(2) = U(1) + b1 dt F[U(1)]
|
!= 2nd step: U(2) = U(1) + b1 dt F[U(1)]
|
||||||
!
|
!
|
||||||
@ -1534,9 +1615,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + 2.0d+00 * ds
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
!= 3rd step: U(3) = a31 U(n) + a33 U(2) + b3 dt F[U(2)]
|
!= 3rd step: U(3) = a31 U(n) + a33 U(2) + b3 dt F[U(2)]
|
||||||
!
|
!
|
||||||
@ -1576,9 +1662,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + (2.0d+00 * a33 * b1 + b3) * dt
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
!= 4th step: U(4) = a41 U(n) + a44 U(3) + b4 dt F[U(3)]
|
!= 4th step: U(4) = a41 U(n) + a44 U(3) + b4 dt F[U(3)]
|
||||||
!
|
!
|
||||||
@ -1622,9 +1713,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + ((2.0d+00 * b1 * a33 + b3) * a44 + b4) * dt
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
!= the final step: U(n+1) = a53 U(2) + a55 U(4) + b5 dt F[U(4)]
|
!= the final step: U(n+1) = a53 U(2) + a55 U(4) + b5 dt F[U(4)]
|
||||||
!
|
!
|
||||||
@ -1669,9 +1765,14 @@ module evolution
|
|||||||
|
|
||||||
end do ! over data blocks
|
end do ! over data blocks
|
||||||
|
|
||||||
|
! prepare times
|
||||||
|
!
|
||||||
|
tm = time + dt
|
||||||
|
dtm = ds
|
||||||
|
|
||||||
! update primitive variables
|
! update primitive variables
|
||||||
!
|
!
|
||||||
call update_variables()
|
call update_variables(tm, dtm)
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for one step update
|
! stop accounting time for one step update
|
||||||
@ -1875,10 +1976,14 @@ module evolution
|
|||||||
! Subroutine iterates over all data blocks and converts the conservative
|
! Subroutine iterates over all data blocks and converts the conservative
|
||||||
! variables to their primitive representation.
|
! variables to their primitive representation.
|
||||||
!
|
!
|
||||||
|
! Arguments:
|
||||||
|
!
|
||||||
|
! tm - time at the moment of update;
|
||||||
|
! dtm - time step since the last update;
|
||||||
!
|
!
|
||||||
!===============================================================================
|
!===============================================================================
|
||||||
!
|
!
|
||||||
subroutine update_variables()
|
subroutine update_variables(tm, dtm)
|
||||||
|
|
||||||
! include external procedures
|
! include external procedures
|
||||||
!
|
!
|
||||||
@ -1895,6 +2000,10 @@ module evolution
|
|||||||
!
|
!
|
||||||
implicit none
|
implicit none
|
||||||
|
|
||||||
|
! subroutine arguments
|
||||||
|
!
|
||||||
|
real(kind=8), intent(in) :: tm, dtm
|
||||||
|
|
||||||
! local pointers
|
! local pointers
|
||||||
!
|
!
|
||||||
type(block_meta), pointer :: pmeta
|
type(block_meta), pointer :: pmeta
|
||||||
@ -1908,16 +2017,13 @@ module evolution
|
|||||||
call start_timer(imv)
|
call start_timer(imv)
|
||||||
#endif /* PROFILE */
|
#endif /* PROFILE */
|
||||||
|
|
||||||
! update primitive variables and shapes if necessary
|
! update primitive variables in the changed blocks
|
||||||
!
|
!
|
||||||
pdata => list_data
|
pdata => list_data
|
||||||
do while (associated(pdata))
|
do while (associated(pdata))
|
||||||
pmeta => pdata%meta
|
pmeta => pdata%meta
|
||||||
|
|
||||||
if (pmeta%update) then
|
if (pmeta%update) call update_primitive_variables(pdata%u, pdata%q)
|
||||||
call update_primitive_variables(pdata%u, pdata%q)
|
|
||||||
call update_shapes(pdata)
|
|
||||||
end if
|
|
||||||
|
|
||||||
pdata => pdata%next
|
pdata => pdata%next
|
||||||
end do
|
end do
|
||||||
@ -1926,6 +2032,17 @@ module evolution
|
|||||||
!
|
!
|
||||||
call boundary_variables()
|
call boundary_variables()
|
||||||
|
|
||||||
|
! apply shapes in blocks which need it
|
||||||
|
!
|
||||||
|
pdata => list_data
|
||||||
|
do while (associated(pdata))
|
||||||
|
pmeta => pdata%meta
|
||||||
|
|
||||||
|
if (pmeta%update) call update_shapes(pdata, tm, dtm)
|
||||||
|
|
||||||
|
pdata => pdata%next
|
||||||
|
end do
|
||||||
|
|
||||||
#ifdef PROFILE
|
#ifdef PROFILE
|
||||||
! stop accounting time for variable update
|
! stop accounting time for variable update
|
||||||
!
|
!
|
||||||
|
@ -235,10 +235,12 @@ module shapes
|
|||||||
!
|
!
|
||||||
! pdata - pointer to the data block structure of the currently initialized
|
! pdata - pointer to the data block structure of the currently initialized
|
||||||
! block;
|
! block;
|
||||||
|
! time - time at the moment of update;
|
||||||
|
! dt - time step since the last update;
|
||||||
!
|
!
|
||||||
!===============================================================================
|
!===============================================================================
|
||||||
!
|
!
|
||||||
subroutine update_shapes_none(pdata)
|
subroutine update_shapes_none(pdata, time, dt)
|
||||||
|
|
||||||
! include external procedures and variables
|
! include external procedures and variables
|
||||||
!
|
!
|
||||||
@ -251,6 +253,7 @@ module shapes
|
|||||||
! subroutine arguments
|
! subroutine arguments
|
||||||
!
|
!
|
||||||
type(block_data), pointer, intent(inout) :: pdata
|
type(block_data), pointer, intent(inout) :: pdata
|
||||||
|
real(kind=8) , intent(in) :: time, dt
|
||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
@ -282,10 +285,12 @@ module shapes
|
|||||||
!
|
!
|
||||||
! pdata - pointer to the data block structure of the currently initialized
|
! pdata - pointer to the data block structure of the currently initialized
|
||||||
! block;
|
! block;
|
||||||
|
! time - time at the moment of update;
|
||||||
|
! dt - time step since the last update;
|
||||||
!
|
!
|
||||||
!===============================================================================
|
!===============================================================================
|
||||||
!
|
!
|
||||||
subroutine update_shapes_blast(pdata)
|
subroutine update_shapes_blast(pdata, time, dt)
|
||||||
|
|
||||||
! include external procedures and variables
|
! include external procedures and variables
|
||||||
!
|
!
|
||||||
@ -306,6 +311,7 @@ module shapes
|
|||||||
! subroutine arguments
|
! subroutine arguments
|
||||||
!
|
!
|
||||||
type(block_data), pointer, intent(inout) :: pdata
|
type(block_data), pointer, intent(inout) :: pdata
|
||||||
|
real(kind=8) , intent(in) :: time, dt
|
||||||
|
|
||||||
! default parameter values
|
! default parameter values
|
||||||
!
|
!
|
||||||
@ -556,10 +562,12 @@ module shapes
|
|||||||
!
|
!
|
||||||
! pdata - pointer to the data block structure of the currently initialized
|
! pdata - pointer to the data block structure of the currently initialized
|
||||||
! block;
|
! block;
|
||||||
|
! time - time at the moment of update;
|
||||||
|
! dt - time step since the last update;
|
||||||
!
|
!
|
||||||
!===============================================================================
|
!===============================================================================
|
||||||
!
|
!
|
||||||
subroutine update_shapes_jet(pdata)
|
subroutine update_shapes_jet(pdata, time, dt)
|
||||||
|
|
||||||
! include external procedures and variables
|
! include external procedures and variables
|
||||||
!
|
!
|
||||||
@ -578,6 +586,7 @@ module shapes
|
|||||||
! subroutine arguments
|
! subroutine arguments
|
||||||
!
|
!
|
||||||
type(block_data), pointer, intent(inout) :: pdata
|
type(block_data), pointer, intent(inout) :: pdata
|
||||||
|
real(kind=8) , intent(in) :: time, dt
|
||||||
|
|
||||||
! default parameter values
|
! default parameter values
|
||||||
!
|
!
|
||||||
|
Loading…
x
Reference in New Issue
Block a user