Merge branch 'master' into reconnection

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2021-11-26 17:20:32 -03:00
commit 9a5223acb0
2 changed files with 23 additions and 37 deletions

View File

@ -79,7 +79,7 @@ module boundaries
public :: initialize_boundaries, finalize_boundaries, print_boundaries
public :: boundary_variables, boundary_fluxes
public :: custom_boundary_x,custom_boundary_y, custom_boundary_z
public :: custom_boundary_x, custom_boundary_y, custom_boundary_z
public :: bnd_type, bnd_periodic
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -5272,7 +5272,7 @@ module boundaries
!
case(bnd_user)
if (associated(custom_boundary_z)) then
if (associated(custom_boundary_x)) then
call custom_boundary_x(side(1), jl, ju, kl, ku, &
t, dt, x(:), y(:), z(:), qn(:,:,:,:))
else
@ -5455,7 +5455,7 @@ module boundaries
!
case(bnd_user)
if (associated(custom_boundary_z)) then
if (associated(custom_boundary_y)) then
call custom_boundary_y(side(2), il, iu, kl, ku, &
t, dt, x(:), y(:), z(:), qn(:,:,:,:))
else

View File

@ -76,8 +76,6 @@ module user_problem
private
public :: initialize_user_problem, finalize_user_problem
public :: setup_user_problem
public :: user_boundary_x, user_boundary_y, user_boundary_z
public :: user_statistics
!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@ -1078,7 +1076,7 @@ module user_problem
!
! Arguments:
!
! ic - the block side along the X direction for the ghost zone update;
! is - the block side along the X direction for the ghost zone update;
! jl, ju - the cell index limits for the Y direction;
! kl, ku - the cell index limits for the Z direction;
! t, dt - time and time increment;
@ -1087,7 +1085,7 @@ module user_problem
!
!===============================================================================
!
subroutine user_boundary_x(ic, jl, ju, kl, ku, t, dt, x, y, z, qn)
subroutine user_boundary_x(is, jl, ju, kl, ku, t, dt, x, y, z, qn)
use coordinates , only : nn => bcells, nb, ne, nbl, neu
use equations , only : magnetized, ivx, ibx, iby, ibp
@ -1097,13 +1095,9 @@ module user_problem
implicit none
integer , intent(in) :: ic
integer , intent(in) :: jl, ju
integer , intent(in) :: kl, ku
integer , intent(in) :: is, jl, ju, kl, ku
real(kind=8) , intent(in) :: t, dt
real(kind=8), dimension(:) , intent(in) :: x
real(kind=8), dimension(:) , intent(in) :: y
real(kind=8), dimension(:) , intent(in) :: z
real(kind=8), dimension(:) , intent(in) :: x, y, z
real(kind=8), dimension(:,:,:,:), intent(inout) :: qn
integer :: im2, im1, i , ip1, ip2
@ -1131,7 +1125,7 @@ module user_problem
dxz = dx / dz
#endif /* NDIMS == 3 */
if (ic == 1) then
if (is == 1) then
! iterate over left-side ghost layers
!
@ -1180,7 +1174,7 @@ module user_problem
#endif /* NDIMS == 3 */
end do ! i = nbl, 1, -1
else ! ic == 1
else ! is == 1
! iterate over right-side ghost layers
!
@ -1228,9 +1222,9 @@ module user_problem
end do ! k = kl, ku
#endif /* NDIMS == 3 */
end do ! i = neu, nn
end if ! ic == 1
end if ! is == 1
else ! ibx > 0
if (ic == 1) then
if (is == 1) then
do i = nbl, 1, -1
#if NDIMS == 3
qn( : ,i,jl:ju,kl:ku) = qn( : ,nb,jl:ju,kl:ku)
@ -1267,7 +1261,7 @@ module user_problem
!
! Arguments:
!
! jc - the block side along the Y direction for the ghost zone update;
! js - the block side along the Y direction for the ghost zone update;
! il, iu - the cell index limits for the X direction;
! kl, ku - the cell index limits for the Z direction;
! t, dt - time and time increment;
@ -1276,7 +1270,7 @@ module user_problem
!
!===============================================================================
!
subroutine user_boundary_y(jc, il, iu, kl, ku, t, dt, x, y, z, qn)
subroutine user_boundary_y(js, il, iu, kl, ku, t, dt, x, y, z, qn)
use coordinates, only : nn => bcells, nb, ne, nbl, neu
use equations , only : magnetized, nv
@ -1284,13 +1278,9 @@ module user_problem
implicit none
integer , intent(in) :: jc
integer , intent(in) :: il, iu
integer , intent(in) :: kl, ku
integer , intent(in) :: js, il, iu, kl, ku
real(kind=8) , intent(in) :: t, dt
real(kind=8), dimension(:) , intent(in) :: x
real(kind=8), dimension(:) , intent(in) :: y
real(kind=8), dimension(:) , intent(in) :: z
real(kind=8), dimension(:) , intent(in) :: x, y, z
real(kind=8), dimension(:,:,:,:), intent(inout) :: qn
integer :: i, im1, ip1
@ -1321,7 +1311,7 @@ module user_problem
! process left and right side boundary separatelly
!
if (jc == 1) then
if (js == 1) then
! iterate over left-side ghost layers
!
@ -1376,7 +1366,7 @@ module user_problem
end do ! k = kl, ku
#endif /* NDIMS == 3 */
end do ! j = nbl, 1, -1
else ! jc = 1
else ! js = 1
! iterate over right-side ghost layers
!
@ -1431,9 +1421,9 @@ module user_problem
end do ! k = kl, ku
#endif /* NDIMS == 3 */
end do ! j = neu, nn
end if ! jc = 1
end if ! js = 1
else ! ibx > 0
if (jc == 1) then
if (js == 1) then
do j = nbl, 1, -1
#if NDIMS == 3
qn(1:nv,il:iu,j,kl:ku) = qn(1:nv,il:iu,nb,kl:ku)
@ -1470,7 +1460,7 @@ module user_problem
!
! Arguments:
!
! kc - the block side along the Z direction for the ghost zone update;
! ks - the block side along the Z direction for the ghost zone update;
! il, iu - the cell index limits for the X direction;
! jl, ju - the cell index limits for the Y direction;
! t, dt - time and time increment;
@ -1479,17 +1469,13 @@ module user_problem
!
!===============================================================================
!
subroutine user_boundary_z(kc, il, iu, jl, ju, t, dt, x, y, z, qn)
subroutine user_boundary_z(ks, il, iu, jl, ju, t, dt, x, y, z, qn)
implicit none
integer , intent(in) :: kc
integer , intent(in) :: il, iu
integer , intent(in) :: jl, ju
integer , intent(in) :: ks, il, iu,jl, ju
real(kind=8) , intent(in) :: t, dt
real(kind=8), dimension(:) , intent(in) :: x
real(kind=8), dimension(:) , intent(in) :: y
real(kind=8), dimension(:) , intent(in) :: z
real(kind=8), dimension(:) , intent(in) :: x, y, z
real(kind=8), dimension(:,:,:,:), intent(inout) :: qn
!-------------------------------------------------------------------------------