Merge branch 'master' into reconnection

This commit is contained in:
Grzegorz Kowal 2014-01-06 16:24:11 -02:00
commit 03039d6692
3 changed files with 87 additions and 112 deletions

View File

@ -280,63 +280,41 @@ module boundaries
call start_timer(imv)
#endif /* PROFILE */
! 1. FIRST FILL OUT THE CORNERS WITH THE EXTRAPOLATED VARIABLES
!
call update_corners()
! step down from the top level
!
do ilev = toplev, 1, -1
! iterate over all directions
! first, restrict the boundaries from higher to lower levels along each
! direction
!
do idir = 1, ndims
! update boundaries which don't have neighbors and which are not periodic
!
if (.not. periodic(idir)) call specific_boundaries(ilev, idir)
! copy boundaries between blocks at the same levels
!
call copy_boundaries(ilev, idir)
do ilev = toplev, 1, -1
call restrict_boundaries(ilev, idir)
end do ! levels
end do ! directions
! restrict blocks from higher level neighbours
! then, copy the boundaries between blocks at the same level
!
do idir = 1, ndims
call restrict_boundaries(ilev - 1, idir)
end do
end do ! levels
! step up from the first level
!
do ilev = 1, toplev
! prolong boundaries from lower level neighbours
!
do idir = 1, ndims
call prolong_boundaries(ilev, idir)
end do
do idir = 1, ndims
! update boundaries which don't have neighbors and which are not periodic
!
if (.not. periodic(idir)) call specific_boundaries(ilev, idir)
! copy boundaries between blocks at the same levels
!
call copy_boundaries(ilev, idir)
end do
end do ! levels
end do ! directions
! finally, prolong boundaries from blocks at lower level to their higher level
! neighbors
!
do idir = 1, ndims
do ilev = 1, toplev
call prolong_boundaries(ilev, idir)
end do ! levels
end do ! directions
! additionally, if specific boundary conditions are used, apply them too
!
do idir = 1, ndims
if (.not. periodic(idir)) then
do ilev = 1, toplev
call specific_boundaries(ilev, idir)
end do ! levels
end if
end do ! directions
#ifdef PROFILE
! stop accounting time for variable boundary update

View File

@ -636,10 +636,6 @@ program amun
!
tm_conv = 1.0d+02 / tm(1)
! get the execution time
!
tm_exec = get_timer_total()
! print one empty line
!
write (*,'(a)') ''
@ -663,10 +659,14 @@ program amun
write (*,tmp) 'TIME PER CPU ', tm(1) / nprocs, 1.0d+02 / nprocs
#endif /* MPI */
! get the execution time
!
tm_exec = get_timer_total()
! convert the execution time to days, hours, minutes, and seconds and print it
!
tm(1) = tm_exec / 8.64d+04
tm(2) = mod(tm_exec / 3.6d+02, 2.4d+01)
tm(2) = mod(tm_exec / 3.6d+03, 2.4d+01)
tm(3) = mod(tm_exec / 6.0d+01, 6.0d+01)
tm(4) = mod(tm_exec, 6.0d+01)
tm(5) = nint((tm_exec - floor(tm_exec)) * 1.0d+03)

View File

@ -386,7 +386,7 @@ module schemes
! include external variables
!
use coordinates, only : im, jm, km
use coordinates, only : im, jm, km, ibl, jbl, kbl, ieu, jeu, keu
use equations , only : nv
! local variables are not implicit by default
@ -417,25 +417,22 @@ module schemes
! perform update along the X direction
!
do i = 2, im
do i = ibl, ieu
du(:,i,:,:) = du(:,i,:,:) - dh(1) * (f(1,:,i,:,:) - f(1,:,i-1,:,:))
end do
du(:,1,:,:) = du(:,1,:,:) - dh(1) * f(1,:,1,:,:)
! perform update along the Y direction
!
do j = 2, jm
do j = jbl, jeu
du(:,:,j,:) = du(:,:,j,:) - dh(2) * (f(2,:,:,j,:) - f(2,:,:,j-1,:))
end do
du(:,:,1,:) = du(:,:,1,:) - dh(2) * f(2,:,:,1,:)
#if NDIMS == 3
! perform update along the Z direction
!
do k = 2, km
do k = kbl, keu
du(:,:,:,k) = du(:,:,:,k) - dh(3) * (f(3,:,:,:,k) - f(3,:,:,:,k-1))
end do
du(:,:,:,1) = du(:,:,:,1) - dh(3) * f(3,:,:,:,1)
#endif /* NDIMS == 3 */
#ifdef PROFILE
@ -477,7 +474,7 @@ module schemes
! include external variables
!
use coordinates, only : im, jm, km
use coordinates, only : im, jm, km, ibl, jbl, kbl, ieu, jeu, keu
use equations , only : nv
use equations , only : idn, ivx, ivy, ivz, imx, imy, imz
@ -523,8 +520,8 @@ module schemes
! calculate the flux along the X-direction
!
do k = 1, km
do j = 1, jm
do k = kbl, keu
do j = jbl, jeu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -544,15 +541,15 @@ module schemes
f(imy,1:im,j,k) = fx(imy,1:im)
f(imz,1:im,j,k) = fx(imz,1:im)
end do ! j = 1, jm
end do ! k = 1, km
end do ! j = jbl, jeu
end do ! k = kbl, keu
case(2)
! calculate the flux along the Y direction
!
do k = 1, km
do i = 1, im
do k = kbl, keu
do i = ibl, ieu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -572,16 +569,16 @@ module schemes
f(imy,i,1:jm,k) = fy(imx,1:jm)
f(imz,i,1:jm,k) = fy(imy,1:jm)
end do ! i = 1, im
end do ! k = 1, km
end do ! i = ibl, ieu
end do ! k = kbl, keu
#if NDIMS == 3
case(3)
! calculate the flux along the Z direction
!
do j = 1, jm
do i = 1, im
do j = jbl, jeu
do i = ibl, ieu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -601,8 +598,8 @@ module schemes
f(imy,i,j,1:km) = fz(imz,1:km)
f(imz,i,j,1:km) = fz(imx,1:km)
end do ! i = 1, im
end do ! j = 1, jm
end do ! i = ibl, ieu
end do ! j = jbl, jeu
#endif /* NDIMS == 3 */
end select
@ -640,7 +637,7 @@ module schemes
! include external variables
!
use coordinates, only : im, jm, km
use coordinates, only : im, jm, km, ibl, jbl, kbl, ieu, jeu, keu
use equations , only : nv
use equations , only : idn, ivx, ivy, ivz, imx, imy, imz, ipr, ien
@ -686,8 +683,8 @@ module schemes
! calculate the flux along the X-direction
!
do k = 1, km
do j = 1, jm
do k = kbl, keu
do j = jbl, jeu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -709,15 +706,15 @@ module schemes
f(imz,1:im,j,k) = fx(imz,1:im)
f(ien,1:im,j,k) = fx(ien,1:im)
end do ! j = 1, jm
end do ! k = 1, km
end do ! j = jbl, jeu
end do ! k = kbl, keu
case(2)
! calculate the flux along the Y direction
!
do k = 1, km
do i = 1, im
do k = kbl, keu
do i = ibl, ieu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -739,16 +736,16 @@ module schemes
f(imz,i,1:jm,k) = fy(imy,1:jm)
f(ien,i,1:jm,k) = fy(ien,1:jm)
end do ! i = 1, im
end do ! k = 1, km
end do ! i = ibl, ieu
end do ! k = kbl, keu
#if NDIMS == 3
case(3)
! calculate the flux along the Z direction
!
do j = 1, jm
do i = 1, im
do j = jbl, jeu
do i = ibl, ieu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -770,8 +767,8 @@ module schemes
f(imz,i,j,1:km) = fz(imx,1:km)
f(ien,i,j,1:km) = fz(ien,1:km)
end do ! i = 1, im
end do ! j = 1, jm
end do ! i = ibl, ieu
end do ! j = jbl, jeu
#endif /* NDIMS == 3 */
end select
@ -809,7 +806,7 @@ module schemes
! include external variables
!
use coordinates, only : im, jm, km
use coordinates, only : im, jm, km, ibl, jbl, kbl, ieu, jeu, keu
use equations , only : nv
use equations , only : idn, ivx, ivy, ivz, imx, imy, imz
use equations , only : ibx, iby, ibz, ibp
@ -856,8 +853,8 @@ module schemes
! calculate the flux along the X-direction
!
do k = 1, km
do j = 1, jm
do k = kbl, keu
do j = jbl, jeu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -885,15 +882,15 @@ module schemes
f(ibz,1:im,j,k) = fx(ibz,1:im)
f(ibp,1:im,j,k) = fx(ibp,1:im)
end do ! j = 1, jm
end do ! k = 1, km
end do ! j = jbl, jeu
end do ! k = kbl, keu
case(2)
! calculate the flux along the Y direction
!
do k = 1, km
do i = 1, im
do k = kbl, keu
do i = ibl, ieu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -921,16 +918,16 @@ module schemes
f(ibz,i,1:jm,k) = fy(iby,1:jm)
f(ibp,i,1:jm,k) = fy(ibp,1:jm)
end do ! i = 1, im
end do ! k = 1, km
end do ! i = ibl, ieu
end do ! k = kbl, keu
#if NDIMS == 3
case(3)
! calculate the flux along the Z direction
!
do j = 1, jm
do i = 1, im
do j = jbl, jeu
do i = ibl, ieu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -958,8 +955,8 @@ module schemes
f(ibz,i,j,1:km) = fz(ibx,1:km)
f(ibp,i,j,1:km) = fz(ibp,1:km)
end do ! i = 1, im
end do ! j = 1, jm
end do ! i = ibl, ieu
end do ! j = jbl, jeu
#endif /* NDIMS == 3 */
end select
@ -997,7 +994,7 @@ module schemes
! include external variables
!
use coordinates, only : im, jm, km
use coordinates, only : im, jm, km, ibl, jbl, kbl, ieu, jeu, keu
use equations , only : nv
use equations , only : idn, ivx, ivy, ivz, imx, imy, imz, ipr, ien
use equations , only : ibx, iby, ibz, ibp
@ -1044,8 +1041,8 @@ module schemes
! calculate the flux along the X-direction
!
do k = 1, km
do j = 1, jm
do k = kbl, keu
do j = jbl, jeu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -1075,15 +1072,15 @@ module schemes
f(ibp,1:im,j,k) = fx(ibp,1:im)
f(ien,1:im,j,k) = fx(ien,1:im)
end do
end do
end do ! j = jbl, jeu
end do ! k = kbl, keu
case(2)
! calculate the flux along the Y direction
!
do k = 1, km
do i = 1, im
do k = kbl, keu
do i = ibl, ieu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -1113,16 +1110,16 @@ module schemes
f(ibp,i,1:jm,k) = fy(ibp,1:jm)
f(ien,i,1:jm,k) = fy(ien,1:jm)
end do
end do
end do ! i = ibl, ieu
end do ! k = kbl, keu
#if NDIMS == 3
case(3)
! calculate the flux along the Z direction
!
do j = 1, jm
do i = 1, im
do j = jbl, ieu
do i = ibl, ieu
! copy directional variable vectors to pass to the one dimensional solver
!
@ -1152,8 +1149,8 @@ module schemes
f(ibp,i,j,1:km) = fz(ibp,1:km)
f(ien,i,j,1:km) = fz(ien,1:km)
end do
end do
end do ! i = ibl, ieu
end do ! j = jbl, jeu
#endif /* NDIMS == 3 */
end select