PROBLEMS: Clean up unused variables.
Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
parent
4d619e1699
commit
6d518c8327
@ -409,7 +409,7 @@ program amun
|
|||||||
end if
|
end if
|
||||||
go to 3000
|
go to 3000
|
||||||
end if
|
end if
|
||||||
call initialize_problems(problem, master, status)
|
call initialize_problems(problem, status)
|
||||||
if (check_status(status /= 0)) then
|
if (check_status(status /= 0)) then
|
||||||
if (master) then
|
if (master) then
|
||||||
write(error_unit,"('[AMUN::program]: ', a)") &
|
write(error_unit,"('[AMUN::program]: ', a)") &
|
||||||
|
@ -94,12 +94,11 @@ module problems
|
|||||||
! Arguments:
|
! Arguments:
|
||||||
!
|
!
|
||||||
! problem - the problem name
|
! problem - the problem name
|
||||||
! verbose - a logical flag turning the information printing;
|
|
||||||
! status - an integer flag for error return value;
|
! status - an integer flag for error return value;
|
||||||
!
|
!
|
||||||
!===============================================================================
|
!===============================================================================
|
||||||
!
|
!
|
||||||
subroutine initialize_problems(problem, verbose, status)
|
subroutine initialize_problems(problem, status)
|
||||||
|
|
||||||
! include external procedures and variables
|
! include external procedures and variables
|
||||||
!
|
!
|
||||||
@ -113,7 +112,6 @@ module problems
|
|||||||
! subroutine arguments
|
! subroutine arguments
|
||||||
!
|
!
|
||||||
character(len=64), intent(in) :: problem
|
character(len=64), intent(in) :: problem
|
||||||
logical , intent(in) :: verbose
|
|
||||||
integer , intent(out) :: status
|
integer , intent(out) :: status
|
||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
@ -377,7 +375,10 @@ module problems
|
|||||||
use blocks , only : block_data
|
use blocks , only : block_data
|
||||||
use constants , only : d2r
|
use constants , only : d2r
|
||||||
use coordinates, only : nn => bcells
|
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 : prim2cons
|
||||||
use equations , only : gamma
|
use equations , only : gamma
|
||||||
use equations , only : nv
|
use equations , only : nv
|
||||||
@ -414,10 +415,15 @@ module problems
|
|||||||
|
|
||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: i, j, k = 1, ic, jc, kc
|
integer :: i, j, k = 1
|
||||||
real(kind=8) :: xl, yl, zl, xu, yu, zu, rl, ru
|
#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
|
real(kind=8) :: sn
|
||||||
#if NDIMS == 3
|
#if NDIMS == 3
|
||||||
|
real(kind=8) :: zl, zu, dz, dzh
|
||||||
real(kind=8) :: xb, yb, zb
|
real(kind=8) :: xb, yb, zb
|
||||||
real(kind=8) :: xt, yt, zt
|
real(kind=8) :: xt, yt, zt
|
||||||
real(kind=8) :: fc_inc
|
real(kind=8) :: fc_inc
|
||||||
@ -427,7 +433,6 @@ module problems
|
|||||||
real(kind=8) :: xt, yt
|
real(kind=8) :: xt, yt
|
||||||
real(kind=8) :: ph
|
real(kind=8) :: ph
|
||||||
#endif /* NDIMS == 3 */
|
#endif /* NDIMS == 3 */
|
||||||
real(kind=8) :: dx, dy, dz, dxh, dyh, dzh, dvol
|
|
||||||
real(kind=8) :: fc_amb, fc_ovr
|
real(kind=8) :: fc_amb, fc_ovr
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
@ -836,9 +841,17 @@ module problems
|
|||||||
! include external procedures and variables
|
! include external procedures and variables
|
||||||
!
|
!
|
||||||
use blocks , only : block_data
|
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 : 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 : prim2cons
|
||||||
use equations , only : gamma
|
use equations , only : gamma
|
||||||
use equations , only : nv
|
use equations , only : nv
|
||||||
@ -875,10 +888,14 @@ module problems
|
|||||||
|
|
||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: i, j, k = 1, ic, jc, kc
|
integer :: i, j, k = 1
|
||||||
real(kind=8) :: xl, yl, zl, xu, yu, zu, rl, ru
|
#if NDIMS == 3
|
||||||
|
integer :: ic, jc, kc
|
||||||
|
#endif /* NDIMS == 3 */
|
||||||
|
real(kind=8) :: xl, yl, xu, yu, rl, ru
|
||||||
real(kind=8) :: sn
|
real(kind=8) :: sn
|
||||||
#if NDIMS == 3
|
#if NDIMS == 3
|
||||||
|
real(kind=8) :: zl, zu, dz, dzh
|
||||||
real(kind=8) :: xb, yb, zb
|
real(kind=8) :: xb, yb, zb
|
||||||
real(kind=8) :: xt, yt, zt
|
real(kind=8) :: xt, yt, zt
|
||||||
real(kind=8) :: fc_inc
|
real(kind=8) :: fc_inc
|
||||||
@ -888,7 +905,7 @@ module problems
|
|||||||
real(kind=8) :: xt, yt
|
real(kind=8) :: xt, yt
|
||||||
real(kind=8) :: ph
|
real(kind=8) :: ph
|
||||||
#endif /* NDIMS == 3 */
|
#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
|
real(kind=8) :: fc_amb, fc_ovr
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
@ -1281,7 +1298,10 @@ module problems
|
|||||||
use blocks , only : block_data, ndims
|
use blocks , only : block_data, ndims
|
||||||
use constants , only : d2r
|
use constants , only : d2r
|
||||||
use coordinates, only : nn => bcells
|
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 : prim2cons
|
||||||
use equations , only : nv
|
use equations , only : nv
|
||||||
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp
|
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp
|
||||||
@ -1315,7 +1335,10 @@ module problems
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: i, j, k = 1
|
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
|
real(kind=8) :: sn, cs
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
@ -1550,10 +1573,7 @@ module problems
|
|||||||
! local arrays
|
! local arrays
|
||||||
!
|
!
|
||||||
real(kind=8), dimension(nv,nn) :: q, u
|
real(kind=8), dimension(nv,nn) :: q, u
|
||||||
real(kind=8), dimension(nn) :: x, y
|
real(kind=8), dimension(nn) :: y
|
||||||
#if NDIMS == 3
|
|
||||||
real(kind=8), dimension(nn) :: z
|
|
||||||
#endif /* NDIMS == 3 */
|
|
||||||
!
|
!
|
||||||
!-------------------------------------------------------------------------------
|
!-------------------------------------------------------------------------------
|
||||||
!
|
!
|
||||||
@ -1723,7 +1743,7 @@ module problems
|
|||||||
use constants , only : pi2, d2r
|
use constants , only : pi2, d2r
|
||||||
use coordinates, only : xmin, xmax, xlen
|
use coordinates, only : xmin, xmax, xlen
|
||||||
use coordinates, only : nn => bcells
|
use coordinates, only : nn => bcells
|
||||||
use coordinates, only : ax, ay, ady
|
use coordinates, only : ax, ay
|
||||||
use equations , only : prim2cons
|
use equations , only : prim2cons
|
||||||
use equations , only : nv
|
use equations , only : nv
|
||||||
use equations , only : idn, ivx, ivy, ivz, ipr, ibx, iby, ibz, ibp, isl
|
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
|
! add a random seed velocity component
|
||||||
!
|
!
|
||||||
if (vper /= 0.0d+00) then
|
if (abs(vper) > 0.0d+00) then
|
||||||
do i = 1, nn
|
do i = 1, nn
|
||||||
q(ivy,i) = q(ivy,i) + vper * randsym()
|
q(ivy,i) = q(ivy,i) + vper * randsym()
|
||||||
end do
|
end do
|
||||||
@ -2135,7 +2155,7 @@ module problems
|
|||||||
! local variables
|
! local variables
|
||||||
!
|
!
|
||||||
integer :: i, j, k = 1
|
integer :: i, j, k = 1
|
||||||
real(kind=8) :: dx, dy, t, btot2
|
real(kind=8) :: dx, dy, t, btot2 = 0.0d+00
|
||||||
|
|
||||||
! local arrays
|
! local arrays
|
||||||
!
|
!
|
||||||
@ -2167,7 +2187,7 @@ module problems
|
|||||||
|
|
||||||
ss = abs(bamp) / (sqrt(dens) * max(1.0d-16, eta))
|
ss = abs(bamp) / (sqrt(dens) * max(1.0d-16, eta))
|
||||||
delta = ss**(-1.0d+00/3.0d+00)
|
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
|
btot2 = bamp**2 + bnor**2 + bgui**2
|
||||||
|
|
||||||
first = .false.
|
first = .false.
|
||||||
@ -2185,13 +2205,13 @@ module problems
|
|||||||
|
|
||||||
! prepare the vector of velocity perturbation (varying along Y)
|
! 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)
|
xi(:) = xc(:) * sqrt(ss)
|
||||||
vx(:) = vper * tanh(xi(:)) * exp(- xi(:)**2)
|
vx(:) = vper * tanh(xi(:)) * exp(- xi(:)**2)
|
||||||
vy(:) = vper * (2.0d+00 * xi(:) * tanh(xi(:)) - 1.0d+00 / cosh(xi(:))**2)&
|
vy(:) = vper * (2.0d+00 * xi(:) * tanh(xi(:)) - 1.0d+00 / cosh(xi(:))**2)&
|
||||||
* exp(- xi(:)**2) * sqrt(ss) / (pi2 * kper)
|
* exp(- xi(:)**2) * sqrt(ss) / (pi2 * kper)
|
||||||
end if
|
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)
|
bx(:) = bper * (sin(pi2 * xl(:)) - sin(pi2 * xu(:))) / (pi2 * dx)
|
||||||
by(:) = bper * (cos(pi2 * xl(:)) - cos(pi2 * xu(:))) / (pi2 * dx * kper)
|
by(:) = bper * (cos(pi2 * xl(:)) - cos(pi2 * xu(:))) / (pi2 * dx * kper)
|
||||||
end if
|
end if
|
||||||
@ -2239,13 +2259,13 @@ module problems
|
|||||||
|
|
||||||
! set the perturbation
|
! set the perturbation
|
||||||
!
|
!
|
||||||
if (vper /= 0.0d+00) then
|
if (abs(vper) > 0.0d+00) then
|
||||||
q(ivx,:) = vx(:) * (sin(pi2 * kper * yl(j)) &
|
q(ivx,:) = vx(:) * (sin(pi2 * kper * yl(j)) &
|
||||||
- sin(pi2 * kper * yu(j))) / (pi2 * kper * dy)
|
- sin(pi2 * kper * yu(j))) / (pi2 * kper * dy)
|
||||||
q(ivy,:) = vy(:) * (cos(pi2 * kper * yu(j)) &
|
q(ivy,:) = vy(:) * (cos(pi2 * kper * yu(j)) &
|
||||||
- cos(pi2 * kper * yl(j))) / (pi2 * kper * dy)
|
- cos(pi2 * kper * yl(j))) / (pi2 * kper * dy)
|
||||||
end if
|
end if
|
||||||
if (bper /= 0.0d+00) then
|
if (abs(bper) > 0.0d+00) then
|
||||||
q(ibx,:) = bx(:) * (cos(pi2 * kper * yu(j)) &
|
q(ibx,:) = bx(:) * (cos(pi2 * kper * yu(j)) &
|
||||||
- cos(pi2 * kper * yl(j))) / (pi2 * kper * dy) &
|
- cos(pi2 * kper * yl(j))) / (pi2 * kper * dy) &
|
||||||
+ bnor
|
+ bnor
|
||||||
|
Loading…
x
Reference in New Issue
Block a user