USER_PROBLEM: Remove unused variables.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2020-08-13 17:49:32 -03:00
parent 46184e96d0
commit 96aa0591bc

View File

@ -159,8 +159,9 @@ module user_problem
if (verbose) then
write(*,*)
write(*,"(1x,a)") "ERROR!"
write(*,"(1x,a)") "The RECONNECTION problem requires magnetized " // &
"set of equations: 'MHD', or 'SR-MHD'."
write(*,"(1x,a)") "The problem " // trim(problem) // &
" requires magnetized set of equations:" // &
" 'MHD', or 'SR-MHD'."
write(*,*)
end if
status = 1
@ -307,7 +308,7 @@ module user_problem
ky(n) = pi2 * kper * uy(n)
kz(n) = pi2 * kper * uz(n)
tt = 0.0d+00
do while(tt == 0.0d+00)
do while(tt < 1.0d-08)
thh = pi2 * randuni()
thv = pi * randsym()
tx = cos(thh) * cos(thv)
@ -475,20 +476,20 @@ module user_problem
!
integer :: i, j, k = 1, n
real(kind=8) :: xpl, xpu, ypl, ypu
real(kind=8) :: xp, yp, yt
real(kind=8) :: yrat, itanh
real(kind=8) :: xp, yp
real(kind=8) :: yrat
real(kind=8) :: kv, fv
real(kind=8) :: va, vx, vy, vz, vv
real(kind=8) :: ba, px, py, pz, pp
real(kind=8) :: va, vx = 0.0d+00, vy = 0.0d+00, vz = 0.0d+00, vv
real(kind=8) :: ba, px = 0.0d+00, py = 0.0d+00, pz = 0.0d+00, pp
! local arrays
!
#if NDIMS == 3
real(kind=8), dimension(nv,nn,nn,nn) :: qpert
real(kind=8), dimension(3 ,nn,nn,nn) :: pot, per, tmp
real(kind=8), dimension(3 ,nn,nn,nn) :: pot
#else /* NDIMS == 3 */
real(kind=8), dimension(nv,nn,nn, 1) :: qpert
real(kind=8), dimension(3 ,nn,nn, 1) :: pot, per, tmp
real(kind=8), dimension(3 ,nn,nn, 1) :: pot
#endif /* NDIMS == 3 */
real(kind=8), dimension(nv,nn) :: q, u, qprof
real(kind=8), dimension(nn) :: xl, xu, xc, fx
@ -496,7 +497,6 @@ module user_problem
#if NDIMS == 3
real(kind=8), dimension(nn) :: zc
#endif /* NDIMS == 3 */
real(kind=8), dimension(nn) :: pm
real(kind=8), dimension(3) :: dh
!
!-------------------------------------------------------------------------------
@ -577,7 +577,7 @@ module user_problem
! of velocity
!
if (vper /= 0.0d+00) then
if (abs(vper) > 0.0d+00) then
! initiate the random velocity components
!
@ -596,7 +596,7 @@ module user_problem
! get the random direction
!
vv = 0.0d+00
do while(vv == 0.0d+00)
do while(vv < 1.0d-08)
vx = randsym()
vy = randsym()
#if NDIMS == 3
@ -628,7 +628,7 @@ module user_problem
! of magnetic field
!
if (bper /= 0.0d+00) then
if (abs(bper) > 0.0d+00) then
! reset the potential
!
@ -651,7 +651,7 @@ module user_problem
! get the random direction
!
pp = 0.0d+00
do while(pp == 0.0d+00)
do while(pp < 1.0d-08)
#if NDIMS == 3
px = randsym()
py = randsym()
@ -693,7 +693,7 @@ module user_problem
! of velocity
!
if (vper /= 0.0d+00) then
if (abs(vper) > 0.0d+00) then
! reset the potential
!
@ -736,7 +736,7 @@ module user_problem
! of magnetic field
!
if (bper /= 0.0d+00) then
if (abs(bper) > 0.0d+00) then
! reset the potential
!
@ -783,7 +783,7 @@ module user_problem
!
if (pert == 2) then
if (vper /= 0.0d+00) then
if (abs(vper) > 0.0d+00) then
! iterate over the block position and initiate the velocity perturbation
!
@ -1086,7 +1086,7 @@ module user_problem
!
use coordinates , only : nn => bcells, nb, ne, nbl, neu
use equations , only : nv
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp
use equations , only : ivx, ibx, iby, ibz, ibp
! local variables are not implicit by default
!
@ -1293,7 +1293,7 @@ module user_problem
!
use coordinates , only : nn => bcells, nb, ne, nbl, neu
use equations , only : nv
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp
use equations , only : idn, ivy, ipr, ibx, iby, ibz, ibp
! local variables are not implicit by default
!
@ -1312,9 +1312,9 @@ module user_problem
! local variables
!
integer :: im2, im1, i , ip1, ip2
integer :: im1, i , ip1
integer :: jm2, jm1, j , jp1, jp2
integer :: km2, km1, k = 1, kp1, kp2
integer :: km1, k = 1, kp1
real(kind=8) :: dx, dy, dz, dyx, dyz
real(kind=8) :: fl, fr
!