PROBLEMS: Clean up unused variables.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2020-08-06 14:28:13 -03:00
parent 4d619e1699
commit 6d518c8327
2 changed files with 47 additions and 27 deletions

View File

@ -409,7 +409,7 @@ program amun
end if
go to 3000
end if
call initialize_problems(problem, master, status)
call initialize_problems(problem, status)
if (check_status(status /= 0)) then
if (master) then
write(error_unit,"('[AMUN::program]: ', a)") &

View File

@ -94,12 +94,11 @@ module problems
! Arguments:
!
! problem - the problem name
! verbose - a logical flag turning the information printing;
! status - an integer flag for error return value;
!
!===============================================================================
!
subroutine initialize_problems(problem, verbose, status)
subroutine initialize_problems(problem, status)
! include external procedures and variables
!
@ -113,7 +112,6 @@ module problems
! subroutine arguments
!
character(len=64), intent(in) :: problem
logical , intent(in) :: verbose
integer , intent(out) :: status
!
!-------------------------------------------------------------------------------
@ -377,7 +375,10 @@ module problems
use blocks , only : block_data
use constants , only : d2r
use coordinates, only : nn => bcells
use coordinates, only : ax, ay, az, adx, ady, adz, advol
use coordinates, only : ax, ay, adx, ady, advol
#if NDIMS == 3
use coordinates, only : az, adz
#endif /* NDIMS == 3 */
use equations , only : prim2cons
use equations , only : gamma
use equations , only : nv
@ -414,10 +415,15 @@ module problems
! local variables
!
integer :: i, j, k = 1, ic, jc, kc
real(kind=8) :: xl, yl, zl, xu, yu, zu, rl, ru
integer :: i, j, k = 1
#if NDIMS == 3
integer :: ic, jc, kc
#endif /* NDIMS == 3 */
real(kind=8) :: xl, yl, xu, yu, rl, ru
real(kind=8) :: dx, dy, dxh, dyh, dvol
real(kind=8) :: sn
#if NDIMS == 3
real(kind=8) :: zl, zu, dz, dzh
real(kind=8) :: xb, yb, zb
real(kind=8) :: xt, yt, zt
real(kind=8) :: fc_inc
@ -427,7 +433,6 @@ module problems
real(kind=8) :: xt, yt
real(kind=8) :: ph
#endif /* NDIMS == 3 */
real(kind=8) :: dx, dy, dz, dxh, dyh, dzh, dvol
real(kind=8) :: fc_amb, fc_ovr
! local arrays
@ -836,9 +841,17 @@ module problems
! include external procedures and variables
!
use blocks , only : block_data
use constants , only : pi, pi4, d2r
use constants , only : d2r
#if NDIMS == 3
use constants , only : pi4
#else /* NDIMS == 3 */
use constants , only : pi
#endif /* NDIMS == 3 */
use coordinates, only : nn => bcells
use coordinates, only : ax, ay, az, adx, ady, adz, advol
use coordinates, only : ax, ay, adx, ady, advol
#if NDIMS == 3
use coordinates, only : az, adz
#endif /* NDIMS == 3 */
use equations , only : prim2cons
use equations , only : gamma
use equations , only : nv
@ -875,10 +888,14 @@ module problems
! local variables
!
integer :: i, j, k = 1, ic, jc, kc
real(kind=8) :: xl, yl, zl, xu, yu, zu, rl, ru
integer :: i, j, k = 1
#if NDIMS == 3
integer :: ic, jc, kc
#endif /* NDIMS == 3 */
real(kind=8) :: xl, yl, xu, yu, rl, ru
real(kind=8) :: sn
#if NDIMS == 3
real(kind=8) :: zl, zu, dz, dzh
real(kind=8) :: xb, yb, zb
real(kind=8) :: xt, yt, zt
real(kind=8) :: fc_inc
@ -888,7 +905,7 @@ module problems
real(kind=8) :: xt, yt
real(kind=8) :: ph
#endif /* NDIMS == 3 */
real(kind=8) :: dx, dy, dz, dxh, dyh, dzh, dvol
real(kind=8) :: dx, dy, dxh, dyh, dvol
real(kind=8) :: fc_amb, fc_ovr
! local arrays
@ -1281,7 +1298,10 @@ module problems
use blocks , only : block_data, ndims
use constants , only : d2r
use coordinates, only : nn => bcells
use coordinates, only : ax, ay, az, adx, ady, adz
use coordinates, only : ax, ay, adx, ady
#if NDIMS == 3
use coordinates, only : az, adz
#endif /* NDIMS == 3 */
use equations , only : prim2cons
use equations , only : nv
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp
@ -1315,7 +1335,10 @@ module problems
! local variables
!
integer :: i, j, k = 1
real(kind=8) :: rl, ru, dx, dy, dz, dxh, dyh, dzh, ds, dl, dr
real(kind=8) :: rl, ru, dx, dy, dxh, dyh, ds, dl, dr
#if NDIMS == 3
real(kind=8) :: dz, dzh
#endif /* NDIMS == 3 */
real(kind=8) :: sn, cs
! local arrays
@ -1550,10 +1573,7 @@ module problems
! local arrays
!
real(kind=8), dimension(nv,nn) :: q, u
real(kind=8), dimension(nn) :: x, y
#if NDIMS == 3
real(kind=8), dimension(nn) :: z
#endif /* NDIMS == 3 */
real(kind=8), dimension(nn) :: y
!
!-------------------------------------------------------------------------------
!
@ -1723,7 +1743,7 @@ module problems
use constants , only : pi2, d2r
use coordinates, only : xmin, xmax, xlen
use coordinates, only : nn => bcells
use coordinates, only : ax, ay, ady
use coordinates, only : ax, ay
use equations , only : prim2cons
use equations , only : nv
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp, isl
@ -1880,7 +1900,7 @@ module problems
! add a random seed velocity component
!
if (vper /= 0.0d+00) then
if (abs(vper) > 0.0d+00) then
do i = 1, nn
q(ivy,i) = q(ivy,i) + vper * randsym()
end do
@ -2135,7 +2155,7 @@ module problems
! local variables
!
integer :: i, j, k = 1
real(kind=8) :: dx, dy, t, btot2
real(kind=8) :: dx, dy, t, btot2 = 0.0d+00
! local arrays
!
@ -2167,7 +2187,7 @@ module problems
ss = abs(bamp) / (sqrt(dens) * max(1.0d-16, eta))
delta = ss**(-1.0d+00/3.0d+00)
if (bper /= 0.0d+00) vper = 0.0d+00
if (abs(bper) > 0.0d+00) vper = 0.0d+00
btot2 = bamp**2 + bnor**2 + bgui**2
first = .false.
@ -2185,13 +2205,13 @@ module problems
! prepare the vector of velocity perturbation (varying along Y)
!
if (vper /= 0.0d+00) then
if (abs(vper) > 0.0d+00) then
xi(:) = xc(:) * sqrt(ss)
vx(:) = vper * tanh(xi(:)) * exp(- xi(:)**2)
vy(:) = vper * (2.0d+00 * xi(:) * tanh(xi(:)) - 1.0d+00 / cosh(xi(:))**2)&
* exp(- xi(:)**2) * sqrt(ss) / (pi2 * kper)
end if
if (bper /= 0.0d+00) then
if (abs(bper) > 0.0d+00) then
bx(:) = bper * (sin(pi2 * xl(:)) - sin(pi2 * xu(:))) / (pi2 * dx)
by(:) = bper * (cos(pi2 * xl(:)) - cos(pi2 * xu(:))) / (pi2 * dx * kper)
end if
@ -2239,13 +2259,13 @@ module problems
! set the perturbation
!
if (vper /= 0.0d+00) then
if (abs(vper) > 0.0d+00) then
q(ivx,:) = vx(:) * (sin(pi2 * kper * yl(j)) &
- sin(pi2 * kper * yu(j))) / (pi2 * kper * dy)
q(ivy,:) = vy(:) * (cos(pi2 * kper * yu(j)) &
- cos(pi2 * kper * yl(j))) / (pi2 * kper * dy)
end if
if (bper /= 0.0d+00) then
if (abs(bper) > 0.0d+00) then
q(ibx,:) = bx(:) * (cos(pi2 * kper * yu(j)) &
- cos(pi2 * kper * yl(j))) / (pi2 * kper * dy) &
+ bnor