FORCING: Remove unused variables for 2D case.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2020-08-15 01:25:31 -03:00
parent 02b2d5d1bd
commit d05e3062fc

View File

@ -171,7 +171,9 @@ module forcing
! import external procedures and variables ! import external procedures and variables
! !
#if NDIMS == 3
use constants , only : pi2 use constants , only : pi2
#endif /* NDIMS == 3 */
use iso_fortran_env, only : error_unit use iso_fortran_env, only : error_unit
use parameters , only : get_parameter use parameters , only : get_parameter
use random , only : randuni, randnorz use random , only : randuni, randnorz
@ -191,9 +193,15 @@ module forcing
character(len=64) :: injection = "none" character(len=64) :: injection = "none"
character(len=64) :: profile_type = "gauss" character(len=64) :: profile_type = "gauss"
character(len=64) :: profile_energy = "off" character(len=64) :: profile_energy = "off"
integer :: i, j, k = 0, l, k2 integer :: i, j, l, k2
#if NDIMS == 3
integer :: k = 0
#endif /* NDIMS == 3 */
real(kind=8) :: kl2, ku2, kv2, kv real(kind=8) :: kl2, ku2, kv2, kv
real(kind=8) :: fa, fi, uu, phi real(kind=8) :: fa, fi, uu
#if NDIMS == 3
real(kind=8) :: phi
#endif /* NDIMS == 3 */
! local vectors ! local vectors
! !
@ -913,7 +921,9 @@ module forcing
! local variables ! local variables
! !
integer :: ni, n integer :: ni, n
#if NDIMS == 3
real(kind=8) :: tmp real(kind=8) :: tmp
#endif /* NDIMS == 3 */
real(kind=8), dimension(3) :: xp, ap real(kind=8), dimension(3) :: xp, ap
! !
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
@ -993,7 +1003,9 @@ module forcing
! import external procedures and variables ! import external procedures and variables
! !
#if NDIMS == 3
use constants, only : pi2 use constants, only : pi2
#endif /* NDIMS == 3 */
use random , only : randuni, randnorz use random , only : randuni, randnorz
! local variables are not implicit by default ! local variables are not implicit by default
@ -1007,7 +1019,10 @@ module forcing
! local variables ! local variables
! !
integer :: l integer :: l
real(kind=8) :: acoeff, dcoeff, phi real(kind=8) :: acoeff, dcoeff
#if NDIMS == 3
real(kind=8) :: phi
#endif /* NDIMS == 3 */
real(kind=8) :: dinj real(kind=8) :: dinj
! local vectors ! local vectors
@ -1108,8 +1123,15 @@ module forcing
! local variables ! local variables
! !
integer :: l integer :: l
real(kind=8) :: th1, th2, phi, psi, ga, gb, dinj, sqdt real(kind=8) :: th1, dinj, sqdt
complex(kind=8) :: aran, bran, xi1, xi2 #if NDIMS == 3
real(kind=8) :: th2, phi, psi, ga, gb
#endif /* NDIMS == 3 */
complex(kind=8) :: aran
#if NDIMS == 3
complex(kind=8) :: bran
complex(kind=8) :: xi1, xi2
#endif /* NDIMS == 3 */
! !
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !
@ -1284,8 +1306,10 @@ module forcing
! !
use blocks , only : block_data use blocks , only : block_data
use coordinates, only : nm => bcells use coordinates, only : nm => bcells
use coordinates, only : ax, ay, az use coordinates, only : ax, ay, xlen, ylen
use coordinates, only : xlen, ylen, zlen #if NDIMS == 3
use coordinates, only : az, zlen
#endif /* NDIMS == 3 */
use coordinates, only : periodic use coordinates, only : periodic
use equations , only : idn, imx, imy, imz, ien use equations , only : idn, imx, imy, imz, ien
@ -1301,7 +1325,10 @@ module forcing
! local variables ! local variables
! !
integer :: i, j, k = 1 integer :: i, j, k = 1
real(kind=8) :: x2, y2, z2, r2 real(kind=8) :: x2, y2, r2
#if NDIMS == 3
real(kind=8) :: z2
#endif /* NDIMS == 3 */
real(kind=8) :: fx, fy, fz, fp, e1, e2 real(kind=8) :: fx, fy, fz, fp, e1, e2
! local arrays ! local arrays
@ -1503,7 +1530,10 @@ module forcing
use blocks , only : block_data use blocks , only : block_data
use constants , only : pi2 use constants , only : pi2
use coordinates, only : nm => bcells, nb, ne use coordinates, only : nm => bcells, nb, ne
use coordinates, only : ax, ay, az, advol use coordinates, only : ax, ay, advol
#if NDIMS == 3
use coordinates, only : az
#endif /* NDIMS == 3 */
use equations , only : idn, imx, imy, imz, ien use equations , only : idn, imx, imy, imz, ien
! local variables are not implicit by default ! local variables are not implicit by default
@ -1518,14 +1548,19 @@ module forcing
! local variables ! local variables
! !
integer :: i, j, k = 1, l, n integer :: i, j, k = 1, l, n
real(kind=8) :: cs, sn, tt real(kind=8) :: cs, sn
#if NDIMS == 3
real(kind=8) :: tt
#endif /* NDIMS == 3 */
real(kind=8) :: dvol real(kind=8) :: dvol
! local arrays ! local arrays
! !
real(kind=8), dimension(nm):: x, y, z, kx, ky, kz real(kind=8), dimension(nm):: x, y, z
real(kind=8), dimension(nm):: snkx, snky, snkz real(kind=8), dimension(nm):: kx, ky, snkx, snky, cskx, csky
real(kind=8), dimension(nm):: cskx, csky, cskz #if NDIMS == 3
real(kind=8), dimension(nm):: kz, snkz, cskz
#endif /* NDIMS == 3 */
#if NDIMS == 3 #if NDIMS == 3
real(kind=8), dimension(3,nm,nm,nm) :: acc real(kind=8), dimension(3,nm,nm,nm) :: acc
real(kind=8), dimension( nm,nm,nm) :: den real(kind=8), dimension( nm,nm,nm) :: den
@ -1719,8 +1754,14 @@ module forcing
use blocks , only : block_data use blocks , only : block_data
use constants , only : pi2 use constants , only : pi2
use coordinates, only : nm => bcells, nb, ne use coordinates, only : nm => bcells, nb, ne
use coordinates, only : ax, ay, az, advol use coordinates, only : ax, ay, advol
use equations , only : ivx, ivy, ivz #if NDIMS == 3
use coordinates, only : az
#endif /* NDIMS == 3 */
use equations , only : ivx, ivy
#if NDIMS == 3
use equations , only : ivz
#endif /* NDIMS == 3 */
! local variables are not implicit by default ! local variables are not implicit by default
! !
@ -1733,14 +1774,19 @@ module forcing
! local variables ! local variables
! !
integer :: i, j, k = 1, l integer :: i, j, k = 1, l
real(kind=8) :: cs, sn, tt, dvol real(kind=8) :: cs, sn, dvol
#if NDIMS == 3
real(kind=8) :: tt
#endif /* NDIMS == 3 */
complex(kind=8) :: cf complex(kind=8) :: cf
! local arrays ! local arrays
! !
real(kind=8), dimension(nm):: x, y, z, kx, ky, kz real(kind=8), dimension(nm):: x, y, z
real(kind=8), dimension(nm):: snkx, snky, snkz real(kind=8), dimension(nm):: kx, ky, snkx, snky, cskx, csky
real(kind=8), dimension(nm):: cskx, csky, cskz #if NDIMS == 3
real(kind=8), dimension(nm):: kz, snkz, cskz
#endif /* NDIMS == 3 */
! !
!------------------------------------------------------------------------------- !-------------------------------------------------------------------------------
! !