Evolve new list of data blocks.
TIME INTEGRATION - now update the solution using new list of data blocks belonging to the current process only
This commit is contained in:
parent
7aff1ecd90
commit
bf5e332ce1
@ -42,7 +42,7 @@ module evolution
|
||||
!
|
||||
subroutine evolve
|
||||
|
||||
use blocks , only : block, plist
|
||||
use blocks , only : block_data, list_data
|
||||
use boundaries, only : boundary
|
||||
use mesh , only : dx_min, update_mesh
|
||||
#ifdef MPI
|
||||
@ -55,24 +55,23 @@ module evolution
|
||||
|
||||
! local variables
|
||||
!
|
||||
type(block), pointer :: pblock
|
||||
type(block_data), pointer :: pblock
|
||||
real :: cmax, cm
|
||||
!
|
||||
!-------------------------------------------------------------------------------
|
||||
!
|
||||
! iterate over all blocks and perform one step of time evolution
|
||||
! iterate over all data blocks and perform one step of time evolution
|
||||
!
|
||||
pblock => plist
|
||||
pblock => list_data
|
||||
do while (associated(pblock))
|
||||
|
||||
! check if this block is a leaf
|
||||
!
|
||||
if (pblock%meta%leaf) &
|
||||
#ifdef EULER
|
||||
if (pblock%leaf) &
|
||||
call evolve_euler(pblock)
|
||||
#endif /* EULER */
|
||||
#ifdef RK2
|
||||
if (pblock%leaf) &
|
||||
call evolve_rk2(pblock)
|
||||
#endif /* RK2 */
|
||||
|
||||
@ -85,7 +84,7 @@ module evolution
|
||||
! update boundaries
|
||||
!
|
||||
call start_timer(4)
|
||||
call boundary
|
||||
! call boundary
|
||||
call stop_timer(4)
|
||||
|
||||
! reset maximum speed
|
||||
@ -94,12 +93,12 @@ module evolution
|
||||
|
||||
! iterate over all blocks in order to find the maximum speed
|
||||
!
|
||||
pblock => plist
|
||||
pblock => list_data
|
||||
do while (associated(pblock))
|
||||
|
||||
! check if this block is a leaf
|
||||
!
|
||||
if (pblock%leaf) &
|
||||
if (pblock%meta%leaf) &
|
||||
cm = maxspeed(pblock%u)
|
||||
|
||||
! compare global and local maximum speeds
|
||||
@ -125,13 +124,13 @@ module evolution
|
||||
! check refinement and refine
|
||||
!
|
||||
call start_timer(5)
|
||||
call update_mesh(0)
|
||||
! call update_mesh(0)
|
||||
call stop_timer(5)
|
||||
|
||||
! update boundaries
|
||||
!
|
||||
call start_timer(4)
|
||||
call boundary
|
||||
! call boundary
|
||||
call stop_timer(4)
|
||||
|
||||
!-------------------------------------------------------------------------------
|
||||
@ -147,7 +146,7 @@ module evolution
|
||||
!
|
||||
subroutine evolve_euler(pblock)
|
||||
|
||||
use blocks , only : block, nv => nvars
|
||||
use blocks , only : block_data, nv => nvars
|
||||
use config , only : im, jm, km
|
||||
use mesh , only : adxi, adyi, adzi
|
||||
#ifdef SHAPE
|
||||
@ -159,7 +158,7 @@ module evolution
|
||||
|
||||
! input arguments
|
||||
!
|
||||
type(block), pointer, intent(inout) :: pblock
|
||||
type(block_data), pointer, intent(inout) :: pblock
|
||||
|
||||
! local variables
|
||||
!
|
||||
@ -172,7 +171,7 @@ module evolution
|
||||
|
||||
! local pointers
|
||||
!
|
||||
type(block), pointer :: pb
|
||||
type(block_data), pointer :: pb
|
||||
!
|
||||
!-------------------------------------------------------------------------------
|
||||
!
|
||||
@ -180,9 +179,9 @@ module evolution
|
||||
|
||||
! prepare dxi, dyi, and dzi
|
||||
!
|
||||
dxi = adxi(pb%level)
|
||||
dyi = adyi(pb%level)
|
||||
dzi = adzi(pb%level)
|
||||
dxi = adxi(pb%meta%level)
|
||||
dyi = adyi(pb%meta%level)
|
||||
dzi = adzi(pb%meta%level)
|
||||
|
||||
! 1st step of integration
|
||||
!
|
||||
@ -191,7 +190,7 @@ module evolution
|
||||
#ifdef SHAPE
|
||||
! restrict update in a defined shape
|
||||
!
|
||||
! call update_shapes(pb, du)
|
||||
call update_shapes(pb, du)
|
||||
#endif /* SHAPE */
|
||||
|
||||
! update solution
|
||||
@ -222,7 +221,7 @@ module evolution
|
||||
!
|
||||
subroutine evolve_rk2(pblock)
|
||||
|
||||
use blocks , only : block, nv => nvars
|
||||
use blocks , only : block_data, nv => nvars
|
||||
use config , only : im, jm, km
|
||||
use mesh , only : adxi, adyi, adzi
|
||||
#ifdef SHAPE
|
||||
@ -234,7 +233,7 @@ module evolution
|
||||
|
||||
! input arguments
|
||||
!
|
||||
type(block), pointer, intent(inout) :: pblock
|
||||
type(block_data), pointer, intent(inout) :: pblock
|
||||
|
||||
! local variables
|
||||
!
|
||||
@ -255,9 +254,9 @@ module evolution
|
||||
|
||||
! prepare dxi, dyi, and dzi
|
||||
!
|
||||
dxi = adxi(pb%level)
|
||||
dyi = adyi(pb%level)
|
||||
dzi = adzi(pb%level)
|
||||
dxi = adxi(pb%meta%level)
|
||||
dyi = adyi(pb%meta%level)
|
||||
dzi = adzi(pb%meta%level)
|
||||
|
||||
! 1st step of integration
|
||||
!
|
||||
|
Loading…
x
Reference in New Issue
Block a user