Skip to content

Commit 8775a61

Browse files
authored
Remove [[some!]] unused variables (#699)
1 parent 73782f5 commit 8775a61

File tree

13 files changed

+26
-138
lines changed

13 files changed

+26
-138
lines changed

src/common/m_phase_change.fpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,8 +313,6 @@ contains
313313
real(kind(0.0d0)), intent(in) :: rhoe
314314
real(kind(0.0d0)), intent(out) :: TS
315315

316-
integer, dimension(num_fluids) :: ig !< flags to toggle the inclusion of fluids for the pT-equilibrium
317-
real(kind(0.0d0)), dimension(num_fluids) :: pk !< individual initial pressures
318316
real(kind(0.0d0)) :: gp, gpp, hp, pO, mCP, mQ !< variables for the Newton Solver
319317

320318
integer :: i, ns !< generic loop iterators

src/simulation/m_bubbles.fpp

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ contains
5757

5858
subroutine s_initialize_bubbles_module
5959

60-
integer :: i, j, k, l, q
60+
integer :: l
6161

6262
@:ALLOCATE_GLOBAL(rs(1:nb))
6363
@:ALLOCATE_GLOBAL(vs(1:nb))
@@ -119,7 +119,7 @@ contains
119119
integer, intent(in) :: idir
120120
type(scalar_field), dimension(sys_size), intent(in) :: q_prim_vf
121121

122-
integer :: i, j, k, l, q
122+
integer :: j, k, l
123123

124124
if (idir == 1) then
125125

@@ -183,18 +183,11 @@ contains
183183
real(kind(0d0)) :: rddot
184184
real(kind(0d0)) :: pb, mv, vflux, pbdot
185185
real(kind(0d0)) :: n_tait, B_tait
186-
187186
real(kind(0d0)), dimension(nb) :: Rtmp, Vtmp
188187
real(kind(0d0)) :: myR, myV, alf, myP, myRho, R2Vav, R3
189188
real(kind(0d0)), dimension(num_fluids) :: myalpha, myalpha_rho
190-
real(kind(0d0)) :: start, finish
191-
192189
real(kind(0d0)) :: nbub !< Bubble number density
193-
194-
real(kind(0d0)), dimension(2) :: Re !< Reynolds number
195-
196190
integer :: i, j, k, l, q, ii !< Loop variables
197-
integer :: ndirs !< Number of coordinate directions
198191

199192
real(kind(0d0)) :: err1, err2, err3, err4, err5 !< Error estimates for adaptive time stepping
200193
real(kind(0d0)) :: t_new !< Updated time step size
@@ -452,7 +445,7 @@ contains
452445
real(kind(0d0)), intent(IN) :: fntait, fBtait, f_bub_adv_src, f_divu
453446
real(kind(0d0)), intent(out) :: h
454447

455-
real(kind(0d0)) :: h0, h1, h_min !< Time step size
448+
real(kind(0d0)) :: h0, h1 !< Time step size
456449
real(kind(0d0)) :: d0, d1, d2 !< norms
457450
real(kind(0d0)), dimension(2) :: myR_tmp, myV_tmp, myA_tmp !< Bubble radius, radial velocity, and radial acceleration
458451

@@ -912,7 +905,6 @@ contains
912905

913906
real(kind(0.d0)) :: T_bar
914907
real(kind(0.d0)) :: grad_T
915-
real(kind(0.d0)) :: tmp1, tmp2
916908
real(kind(0.d0)) :: f_bpres_dot
917909

918910
if (thermal == 3) then

src/simulation/m_chemistry.fpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ contains
5555

5656
type(vector_field), dimension(:), intent(IN) :: flux_n
5757
type(scalar_field), dimension(sys_size), intent(INOUT) :: rhs_vf
58-
type(int_bounds_info) :: ix, iy, iz
59-
6058
integer :: x, y, z
6159
integer :: eqn
6260

@@ -103,21 +101,12 @@ contains
103101
subroutine s_compute_chemistry_reaction_flux(rhs_vf, q_cons_qp, q_prim_qp)
104102

105103
type(scalar_field), dimension(sys_size), intent(INOUT) :: rhs_vf, q_cons_qp, q_prim_qp
106-
107-
integer :: i
108-
109104
integer :: x, y, z
110105
integer :: eqn
111-
112106
real(kind(0d0)) :: T
113-
integer :: o
114-
real(kind(0d0)) :: dyn_pres
115-
real(kind(0d0)) :: E
116-
117107
real(kind(0d0)) :: rho, omega_m
118108
real(kind(0d0)), dimension(num_species) :: Ys
119109
real(kind(0d0)), dimension(num_species) :: omega
120-
real(kind(0d0)) :: cp_mix
121110

122111
if (chemistry) then
123112
!$acc parallel loop collapse(3) gang vector default(present) &

src/simulation/m_data_output.fpp

Lines changed: 5 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -224,42 +224,24 @@ contains
224224
type(scalar_field), dimension(sys_size), intent(IN) :: q_prim_vf
225225
integer, intent(IN) :: t_step
226226

227-
real(kind(0d0)), dimension(num_fluids) :: alpha_rho !< Cell-avg. partial density
228227
real(kind(0d0)) :: rho !< Cell-avg. density
229228
real(kind(0d0)), dimension(num_dims) :: vel !< Cell-avg. velocity
230229
real(kind(0d0)) :: vel_sum !< Cell-avg. velocity sum
231230
real(kind(0d0)) :: pres !< Cell-avg. pressure
232231
real(kind(0d0)), dimension(num_fluids) :: alpha !< Cell-avg. volume fraction
233232
real(kind(0d0)) :: gamma !< Cell-avg. sp. heat ratio
234233
real(kind(0d0)) :: pi_inf !< Cell-avg. liquid stiffness function
235-
real(kind(0d0)) :: qv !< Cell-avg. fluid reference energy
236234
real(kind(0d0)) :: c !< Cell-avg. sound speed
237-
real(kind(0d0)) :: E !< Cell-avg. energy
238235
real(kind(0d0)) :: H !< Cell-avg. enthalpy
239236
real(kind(0d0)), dimension(2) :: Re !< Cell-avg. Reynolds numbers
240-
241-
! ICFL, VCFL, CCFL and Rc stability criteria extrema for the current
242-
! time-step and located on both the local (loc) and the global (glb)
243-
! computational domains
244-
245-
real(kind(0d0)) :: blkmod1, blkmod2 !<
246-
!! Fluid bulk modulus for Woods mixture sound speed
247-
248-
integer :: i, j, k, l, q !< Generic loop iterators
249-
250-
integer :: Nfq
251-
real(kind(0d0)) :: fltr_dtheta !<
252-
!! Modified dtheta accounting for Fourier filtering in azimuthal direction.
237+
integer :: j, k, l
253238

254239
! Computing Stability Criteria at Current Time-step ================
255-
!$acc parallel loop collapse(3) gang vector default(present) private(alpha_rho, vel, alpha, Re, fltr_dtheta, Nfq)
240+
!$acc parallel loop collapse(3) gang vector default(present) private(vel, alpha, Re)
256241
do l = 0, p
257242
do k = 0, n
258243
do j = 0, m
259-
260244
call s_compute_enthalpy(q_prim_vf, pres, rho, gamma, pi_inf, Re, H, alpha, vel, vel_sum, j, k, l)
261-
262-
! Compute mixture sound speed
263245
call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, H, alpha, vel_sum, 0d0, c)
264246

265247
if (viscous) then
@@ -380,14 +362,9 @@ contains
380362

381363
character(LEN=15) :: FMT
382364

383-
integer :: i, j, k, l, ii, r!< Generic loop iterators
365+
integer :: i, j, k, l, r
384366

385-
real(kind(0d0)), dimension(nb) :: nRtmp !< Temporary bubble concentration
386-
real(kind(0d0)) :: nbub, nR3, vftmp !< Temporary bubble number density
387367
real(kind(0d0)) :: gamma, lit_gamma, pi_inf, qv !< Temporary EOS params
388-
real(kind(0d0)) :: rho !< Temporary density
389-
real(kind(0d0)), dimension(2) :: Re !< Temporary Reynolds number
390-
real(kind(0d0)) :: E_e !< Temp. elastic energy contribution
391368

392369
! Creating or overwriting the time-step root directory
393370
write (t_step_dir, '(A,I0,A,I0)') trim(case_dir)//'/p_all'
@@ -950,21 +927,17 @@ contains
950927
real(kind(0d0)) :: int_pres
951928
real(kind(0d0)) :: max_pres
952929
real(kind(0d0)), dimension(2) :: Re
953-
real(kind(0d0)) :: E_e
954930
real(kind(0d0)), dimension(6) :: tau_e
955931
real(kind(0d0)) :: G
956932
real(kind(0d0)) :: dyn_p, Temp
957933

958-
integer :: i, j, k, l, s, q, d !< Generic loop iterator
934+
integer :: i, j, k, l, s, d !< Generic loop iterator
959935

960936
real(kind(0d0)) :: nondim_time !< Non-dimensional time
961937

962938
real(kind(0d0)) :: tmp !<
963939
!! Temporary variable to store quantity for mpi_allreduce
964940

965-
real(kind(0d0)) :: blkmod1, blkmod2 !<
966-
!! Fluid bulk modulus for Woods mixture sound speed
967-
968941
integer :: npts !< Number of included integral points
969942
real(kind(0d0)) :: rad, thickness !< For integral quantities
970943
logical :: trigger !< For integral quantities
@@ -978,7 +951,7 @@ contains
978951
if (t_step_old /= dflt_int) then
979952
nondim_time = real(t_step + t_step_old, kind(0d0))*dt
980953
else
981-
nondim_time = real(t_step, kind(0d0))*dt !*1.d-5/10.0761131451d0
954+
nondim_time = real(t_step, kind(0d0))*dt
982955
end if
983956
end if
984957

@@ -1603,10 +1576,6 @@ contains
16031576
!! other procedures that are necessary to setup the module.
16041577
subroutine s_initialize_data_output_module
16051578

1606-
type(int_bounds_info) :: ix, iy, iz
1607-
1608-
integer :: i !< Generic loop iterator
1609-
16101579
! Allocating/initializing ICFL, VCFL, CCFL and Rc stability criteria
16111580
@:ALLOCATE_GLOBAL(icfl_sf(0:m, 0:n, 0:p))
16121581
icfl_max = 0d0
@@ -1644,8 +1613,6 @@ contains
16441613
!> Module deallocation and/or disassociation procedures
16451614
subroutine s_finalize_data_output_module
16461615

1647-
integer :: i !< Generic loop iterator
1648-
16491616
! Deallocating the ICFL, VCFL, CCFL, and Rc stability criteria
16501617
@:DEALLOCATE_GLOBAL(icfl_sf)
16511618
if (viscous) then

src/simulation/m_mpi_proxy.fpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -871,10 +871,8 @@ contains
871871
872872
logical :: beg_end_geq_0
873873
874-
integer :: pack_offsets(1:3), unpack_offsets(1:3)
875874
integer :: pack_offset, unpack_offset
876875
real(kind(0d0)), pointer :: p_send, p_recv
877-
integer, pointer, dimension(:) :: p_i_send, p_i_recv
878876
879877
#ifdef MFC_MPI
880878
@@ -2136,7 +2134,6 @@ contains
21362134
21372135
logical :: beg_end_geq_0
21382136
2139-
integer :: pack_offsets(1:3), unpack_offsets(1:3)
21402137
integer :: pack_offset, unpack_offset
21412138
real(kind(0d0)), pointer :: p_send, p_recv
21422139

src/simulation/m_qbmm.fpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ contains
702702
real(kind(0.d0)), intent(in) :: pres, rho, c
703703
real(kind(0.d0)), dimension(nterms, 0:2, 0:2), intent(out) :: coeffs
704704

705-
integer :: i1, i2, q
705+
integer :: i1, i2
706706

707707
coeffs = 0d0
708708

@@ -776,7 +776,7 @@ contains
776776
real(kind(0.d0)), intent(inout) :: pres, rho, c
777777
real(kind(0.d0)), dimension(nterms, 0:2, 0:2), intent(out) :: coeffs
778778

779-
integer :: i1, i2, q
779+
integer :: i1, i2
780780

781781
coeffs = 0d0
782782

@@ -841,20 +841,19 @@ contains
841841

842842
real(kind(0d0)), dimension(nmom) :: moms, msum
843843
real(kind(0d0)), dimension(nnode, nb) :: wght, abscX, abscY, wght_pb, wght_mv, wght_ht, ht
844-
real(kind(0d0)), dimension(nterms, 0:2, 0:2) :: mom3d_terms, coeff
845-
real(kind(0d0)) :: pres, rho, nbub, c, alf, R3, momsum, drdt, drdt2, chi_vw, x_vw, rho_mw, k_mw, T_bar, grad_T
846-
real(kind(0d0)) :: start, finish
844+
real(kind(0d0)), dimension(nterms, 0:2, 0:2) :: coeff
845+
real(kind(0d0)) :: pres, rho, nbub, c, alf, momsum, drdt, drdt2, chi_vw, x_vw, rho_mw, k_mw, T_bar, grad_T
847846
real(kind(0d0)) :: n_tait, B_tait
848847

849-
integer :: j, k, l, q, r, s !< Loop variables
850848
integer :: id1, id2, id3
851849
integer :: i1, i2
850+
integer :: j, q, r
852851

853852
is1_qbmm = ix; is2_qbmm = iy; is3_qbmm = iz
854853

855854
!$acc update device(is1_qbmm, is2_qbmm, is3_qbmm)
856855

857-
!$acc parallel loop collapse(3) gang vector default(present) private(moms, msum, wght, abscX, abscY, wght_pb, wght_mv, wght_ht, coeff, ht, r, q, n_tait, B_tait, pres, rho, nbub, c, alf, R3, momsum, drdt, drdt2, chi_vw, x_vw, rho_mw, k_mw, T_bar, grad_T)
856+
!$acc parallel loop collapse(3) gang vector default(present) private(moms, msum, wght, abscX, abscY, wght_pb, wght_mv, wght_ht, coeff, ht, r, q, n_tait, B_tait, pres, rho, nbub, c, alf, momsum, drdt, drdt2, chi_vw, x_vw, rho_mw, k_mw, T_bar, grad_T)
858857
do id3 = is3_qbmm%beg, is3_qbmm%end
859858
do id2 = is2_qbmm%beg, is2_qbmm%end
860859
do id1 = is1_qbmm%beg, is1_qbmm%end

src/simulation/m_rhs.fpp

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -699,30 +699,9 @@ contains
699699
integer, intent(in) :: t_step
700700
real(kind(0d0)), intent(inout) :: time_avg
701701

702-
real(kind(0d0)) :: t_start, t_finish
703-
real(kind(0d0)) :: gp_sum
704-
705-
real(kind(0d0)) :: top, bottom !< Numerator and denominator when evaluating flux limiter function
706-
real(kind(0d0)), dimension(num_fluids) :: myalpha_rho, myalpha
707-
708-
real(kind(0d0)) :: tmp1, tmp2, tmp3, tmp4, &
709-
c_gas, c_liquid, &
710-
Cpbw, Cpinf, Cpinf_dot, &
711-
myH, myHdot, rddot, alf_gas
712-
713-
real(kind(0d0)) :: n_tait, B_tait, angle, angle_z
714-
715-
real(kind(0d0)), dimension(nb) :: Rtmp, Vtmp
716-
real(kind(0d0)) :: myR, myV, alf, myP, myRho, R2Vav
717702
real(kind(0d0)), dimension(0:m, 0:n, 0:p) :: nbub
718-
integer :: ndirs
719-
720-
real(kind(0d0)) :: sound
721-
real(kind(0d0)) :: start, finish
722-
real(kind(0d0)) :: s2, const_sos, s1
723-
724-
integer :: i, c, j, k, l, q, ii, id !< Generic loop iterators
725-
integer :: term_index
703+
real(kind(0d0)) :: t_start, t_finish
704+
integer :: i, j, k, l, id !< Generic loop iterators
726705

727706
call nvtxStartRange("Compute_RHS")
728707

@@ -1593,7 +1572,7 @@ contains
15931572
type(scalar_field), dimension(sys_size), intent(in) :: flux_src_n
15941573
type(scalar_field), dimension(sys_size), intent(in) :: dq_prim_dx_vf, dq_prim_dy_vf, dq_prim_dz_vf
15951574

1596-
integer :: i, j, k, l, q
1575+
integer :: i, j, k, l
15971576

15981577
if (idir == 1) then ! x-direction
15991578

@@ -2089,7 +2068,6 @@ contains
20892068

20902069
integer :: weno_dir !< Coordinate direction of the WENO reconstruction
20912070

2092-
integer :: i, j, k, l
20932071
! Reconstruction in s1-direction ===================================
20942072

20952073
if (norm_dir == 1) then
@@ -2213,7 +2191,7 @@ contains
22132191
!> Module deallocation and/or disassociation procedures
22142192
subroutine s_finalize_rhs_module
22152193

2216-
integer :: i, j, k, l !< Generic loop iterators
2194+
integer :: i, j, l
22172195

22182196
do j = cont_idx%beg, cont_idx%end
22192197
!$acc exit data detach(q_prim_qp%vf(j)%sf)

0 commit comments

Comments
 (0)