Skip to content

Commit 443c33c

Browse files
XZTian64Xuzheng Tiansbryngelson
authored
Cody tidying - Remove unused dummy variables (#854)
Co-authored-by: Xuzheng Tian <[email protected]> Co-authored-by: Spencer Bryngelson <[email protected]> Co-authored-by: Spencer Bryngelson <[email protected]>
1 parent efa1dd1 commit 443c33c

27 files changed

+126
-238
lines changed

src/common/m_boundary_common.fpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ contains
142142
case (BC_CHAR_SUP_OUTFLOW:BC_GHOST_EXTRAP)
143143
call s_ghost_cell_extrapolation(q_prim_vf, pb, mv, 2, -1, k, l)
144144
case (BC_AXIS)
145-
call s_axis(q_prim_vf, pb, mv, 2, -1, k, l)
145+
call s_axis(q_prim_vf, pb, mv, k, l)
146146
case (BC_REFLECTIVE)
147147
call s_symmetry(q_prim_vf, pb, mv, 2, -1, k, l)
148148
case (BC_PERIODIC)
@@ -713,15 +713,14 @@ contains
713713

714714
end subroutine s_periodic
715715

716-
pure subroutine s_axis(q_prim_vf, pb, mv, bc_dir, bc_loc, k, l)
716+
pure subroutine s_axis(q_prim_vf, pb, mv, k, l)
717717
#ifdef _CRAYFTN
718718
!DIR$ INLINEALWAYS s_axis
719719
#else
720720
!$acc routine seq
721721
#endif
722722
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
723723
real(wp), dimension(idwbuff(1)%beg:, idwbuff(2)%beg:, idwbuff(3)%beg:, 1:, 1:), intent(inout) :: pb, mv
724-
integer, intent(in) :: bc_dir, bc_loc
725724
integer, intent(in) :: k, l
726725

727726
integer :: j, q, i

src/common/m_mpi_common.fpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -375,21 +375,17 @@ contains
375375
!! @param Rc_min_glb Global minimum Rc stability criterion
376376
impure subroutine s_mpi_reduce_stability_criteria_extrema(icfl_max_loc, &
377377
vcfl_max_loc, &
378-
ccfl_max_loc, &
379378
Rc_min_loc, &
380379
icfl_max_glb, &
381380
vcfl_max_glb, &
382-
ccfl_max_glb, &
383381
Rc_min_glb)
384382
385383
real(wp), intent(in) :: icfl_max_loc
386384
real(wp), intent(in) :: vcfl_max_loc
387-
real(wp), intent(in) :: ccfl_max_loc
388385
real(wp), intent(in) :: Rc_min_loc
389386
390387
real(wp), intent(out) :: icfl_max_glb
391388
real(wp), intent(out) :: vcfl_max_glb
392-
real(wp), intent(out) :: ccfl_max_glb
393389
real(wp), intent(out) :: Rc_min_glb
394390
395391
#ifdef MFC_SIMULATION
@@ -1178,7 +1174,8 @@ contains
11781174
#:endif
11791175
end if
11801176
#:endfor
1181-
1177+
p_send => buff_send(0)
1178+
p_recv => buff_recv(0)
11821179
! Send/Recv
11831180
#ifdef MFC_SIMULATION
11841181
#:for rdma_mpi in [False, True]

src/common/m_phase_change.fpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ contains
143143

144144
! Calling pT-equilibrium for either finishing phase-change module, or as an IC for the pTg-equilibrium
145145
! for this case, MFL cannot be either 0 or 1, so I chose it to be 2
146-
call s_infinite_pt_relaxation_k(j, k, l, 2, pS, p_infpT, rM, q_cons_vf, rhoe, TS)
146+
call s_infinite_pt_relaxation_k(j, k, l, 2, pS, p_infpT, q_cons_vf, rhoe, TS)
147147

148148
! check if pTg-equilibrium is required
149149
! NOTE that NOTHING else needs to be updated OTHER than the individual partial densities
@@ -164,7 +164,7 @@ contains
164164
q_cons_vf(vp + contxb - 1)%sf(j, k, l) = (1.0_wp - mixM)*rM
165165

166166
! calling pT-equilibrium for overheated vapor, which is MFL = 0
167-
call s_infinite_pt_relaxation_k(j, k, l, 0, pSOV, p_infOV, rM, q_cons_vf, rhoe, TSOV)
167+
call s_infinite_pt_relaxation_k(j, k, l, 0, pSOV, p_infOV, q_cons_vf, rhoe, TSOV)
168168

169169
! calculating Saturation temperature
170170
call s_TSat(pSOV, TSatOV, TSOV)
@@ -177,7 +177,7 @@ contains
177177
q_cons_vf(vp + contxb - 1)%sf(j, k, l) = mixM*rM
178178

179179
! calling pT-equilibrium for subcooled liquid, which is MFL = 1
180-
call s_infinite_pt_relaxation_k(j, k, l, 1, pSSL, p_infSL, rM, q_cons_vf, rhoe, TSSL)
180+
call s_infinite_pt_relaxation_k(j, k, l, 1, pSSL, p_infSL, q_cons_vf, rhoe, TSSL)
181181

182182
! calculating Saturation temperature
183183
call s_TSat(pSSL, TSatSL, TSSL)
@@ -281,7 +281,7 @@ contains
281281
!! @param q_cons_vf Cell-average conservative variables
282282
!! @param rhoe mixture energy
283283
!! @param TS equilibrium temperature at the interface
284-
pure subroutine s_infinite_pt_relaxation_k(j, k, l, MFL, pS, p_infpT, rM, q_cons_vf, rhoe, TS)
284+
pure subroutine s_infinite_pt_relaxation_k(j, k, l, MFL, pS, p_infpT, q_cons_vf, rhoe, TS)
285285

286286
#ifdef _CRAYFTN
287287
!DIR$ INLINEALWAYS s_infinite_pt_relaxation_k
@@ -293,7 +293,6 @@ contains
293293
integer, intent(in) :: j, k, l, MFL
294294
real(wp), intent(out) :: pS
295295
real(wp), dimension(num_fluids), intent(out) :: p_infpT
296-
real(wp), intent(in) :: rM
297296
type(scalar_field), dimension(sys_size), intent(in) :: q_cons_vf
298297
real(wp), intent(in) :: rhoe
299298
real(wp), intent(out) :: TS

src/common/m_variables_conversion.fpp

Lines changed: 13 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,11 @@ contains
9191

9292
if (model_eqns == 1) then ! Gamma/pi_inf model
9393
call s_convert_mixture_to_mixture_variables(q_vf, i, j, k, &
94-
rho, gamma, pi_inf, qv, Re_K, G_K, G)
94+
rho, gamma, pi_inf, qv)
9595

9696
else if (bubbles_euler) then
9797
call s_convert_species_to_mixture_variables_bubbles(q_vf, i, j, k, &
98-
rho, gamma, pi_inf, qv, Re_K, G_K, G)
98+
rho, gamma, pi_inf, qv, Re_K)
9999
else
100100
! Volume fraction model
101101
call s_convert_species_to_mixture_variables(q_vf, i, j, k, &
@@ -206,7 +206,7 @@ contains
206206
!! @param pi_inf liquid stiffness
207207
!! @param qv fluid reference energy
208208
subroutine s_convert_mixture_to_mixture_variables(q_vf, i, j, k, &
209-
rho, gamma, pi_inf, qv, Re_K, G_K, G)
209+
rho, gamma, pi_inf, qv)
210210

211211
type(scalar_field), dimension(sys_size), intent(in) :: q_vf
212212
integer, intent(in) :: i, j, k
@@ -216,11 +216,6 @@ contains
216216
real(wp), intent(out), target :: pi_inf
217217
real(wp), intent(out), target :: qv
218218

219-
real(wp), optional, dimension(2), intent(out) :: Re_K
220-
221-
real(wp), optional, intent(out) :: G_K
222-
real(wp), optional, dimension(num_fluids), intent(in) :: G
223-
224219
! Transferring the density, the specific heat ratio function and the
225220
! liquid stiffness function, respectively
226221
rho = q_vf(1)%sf(i, j, k)
@@ -253,7 +248,7 @@ contains
253248
!! @param pi_inf liquid stiffness
254249
!! @param qv fluid reference energy
255250
subroutine s_convert_species_to_mixture_variables_bubbles(q_vf, j, k, l, &
256-
rho, gamma, pi_inf, qv, Re_K, G_K, G)
251+
rho, gamma, pi_inf, qv, Re_K)
257252

258253
type(scalar_field), dimension(sys_size), intent(in) :: q_vf
259254

@@ -265,8 +260,6 @@ contains
265260
real(wp), intent(out), target :: qv
266261

267262
real(wp), optional, dimension(2), intent(out) :: Re_K
268-
real(wp), optional, intent(out) :: G_K
269-
real(wp), optional, dimension(num_fluids), intent(in) :: G
270263

271264
integer :: i, q
272265
real(wp), dimension(num_fluids) :: alpha_rho_K, alpha_K
@@ -463,7 +456,7 @@ contains
463456

464457
pure subroutine s_convert_species_to_mixture_variables_acc(rho_K, &
465458
gamma_K, pi_inf_K, qv_K, &
466-
alpha_K, alpha_rho_K, Re_K, k, l, r, &
459+
alpha_K, alpha_rho_K, Re_K, &
467460
G_K, G)
468461
#ifdef _CRAYFTN
469462
!DIR$ INLINEALWAYS s_convert_species_to_mixture_variables_acc
@@ -480,8 +473,6 @@ contains
480473
real(wp), optional, intent(out) :: G_K
481474
real(wp), optional, dimension(num_fluids), intent(in) :: G
482475

483-
integer, intent(in) :: k, l, r
484-
485476
integer :: i, j !< Generic loop iterators
486477
real(wp) :: alpha_K_sum
487478

@@ -547,7 +538,7 @@ contains
547538

548539
pure subroutine s_convert_species_to_mixture_variables_bubbles_acc(rho_K, &
549540
gamma_K, pi_inf_K, qv_K, &
550-
alpha_K, alpha_rho_K, Re_K, k, l, r)
541+
alpha_K, alpha_rho_K, Re_K)
551542
#ifdef _CRAYFTN
552543
!DIR$ INLINEALWAYS s_convert_species_to_mixture_variables_bubbles_acc
553544
#else
@@ -560,7 +551,6 @@ contains
560551
!! Partial densities and volume fractions
561552

562553
real(wp), dimension(2), intent(out) :: Re_K
563-
integer, intent(in) :: k, l, r
564554

565555
integer :: i, j !< Generic loop iterators
566556

@@ -819,16 +809,12 @@ contains
819809
subroutine s_convert_conservative_to_primitive_variables(qK_cons_vf, &
820810
q_T_sf, &
821811
qK_prim_vf, &
822-
ibounds, &
823-
gm_alphaK_vf)
812+
ibounds)
824813

825814
type(scalar_field), dimension(sys_size), intent(in) :: qK_cons_vf
826815
type(scalar_field), intent(inout) :: q_T_sf
827816
type(scalar_field), dimension(sys_size), intent(inout) :: qK_prim_vf
828817
type(int_bounds_info), dimension(1:3), intent(in) :: ibounds
829-
type(scalar_field), &
830-
allocatable, optional, dimension(:), &
831-
intent(in) :: gm_alphaK_vf
832818

833819
real(wp), dimension(num_fluids) :: alpha_K, alpha_rho_K
834820
real(wp), dimension(2) :: Re_K
@@ -902,13 +888,13 @@ contains
902888
! If in simulation, use acc mixture subroutines
903889
if (elasticity) then
904890
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, alpha_K, &
905-
alpha_rho_K, Re_K, j, k, l, G_K, Gs)
891+
alpha_rho_K, Re_K, G_K, Gs)
906892
else if (bubbles_euler) then
907893
call s_convert_species_to_mixture_variables_bubbles_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
908-
alpha_K, alpha_rho_K, Re_K, j, k, l)
894+
alpha_K, alpha_rho_K, Re_K)
909895
else
910896
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
911-
alpha_K, alpha_rho_K, Re_K, j, k, l)
897+
alpha_K, alpha_rho_K, Re_K)
912898
end if
913899
#else
914900
! If pre-processing, use non acc mixture subroutines
@@ -1509,13 +1495,13 @@ contains
15091495
if (elasticity) then
15101496
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
15111497
alpha_K, alpha_rho_K, Re_K, &
1512-
j, k, l, G_K, Gs)
1498+
G_K, Gs)
15131499
else if (bubbles_euler) then
15141500
call s_convert_species_to_mixture_variables_bubbles_acc(rho_K, gamma_K, &
1515-
pi_inf_K, qv_K, alpha_K, alpha_rho_K, Re_K, j, k, l)
1501+
pi_inf_K, qv_K, alpha_K, alpha_rho_K, Re_K)
15161502
else
15171503
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
1518-
alpha_K, alpha_rho_K, Re_K, j, k, l)
1504+
alpha_K, alpha_rho_K, Re_K)
15191505
end if
15201506

15211507
! Computing the energy from the pressure

src/pre_process/m_boundary_conditions.fpp

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@ module m_boundary_conditions
2929
s_write_parallel_boundary_condition_files
3030

3131
contains
32-
impure subroutine s_line_segment_bc(patch_id, q_prim_vf, bc_type)
32+
impure subroutine s_line_segment_bc(patch_id, bc_type)
3333

34-
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
3534
type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type
3635
integer, intent(in) :: patch_id
3736

@@ -79,9 +78,8 @@ contains
7978

8079
end subroutine s_line_segment_bc
8180

82-
impure subroutine s_circle_bc(patch_id, q_prim_vf, bc_type)
81+
impure subroutine s_circle_bc(patch_id, bc_type)
8382

84-
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
8583
type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type
8684

8785
integer, intent(in) :: patch_id
@@ -143,9 +141,8 @@ contains
143141

144142
end subroutine s_circle_bc
145143

146-
impure subroutine s_rectangle_bc(patch_id, q_prim_vf, bc_type)
144+
impure subroutine s_rectangle_bc(patch_id, bc_type)
147145

148-
type(scalar_field), dimension(sys_size), intent(inout) :: q_prim_vf
149146
type(integer_field), dimension(1:num_dims, -1:1), intent(inout) :: bc_type
150147

151148
integer, intent(in) :: patch_id
@@ -247,9 +244,9 @@ contains
247244
end if
248245

249246
if (patch_bc(i)%geometry == 2) then
250-
call s_circle_bc(i, q_prim_vf, bc_type)
247+
call s_circle_bc(i, bc_type)
251248
elseif (patch_bc(i)%geometry == 3) then
252-
call s_rectangle_bc(i, q_prim_vf, bc_type)
249+
call s_rectangle_bc(i, bc_type)
253250
end if
254251
end do
255252
!< Apply 1D patches to 2D domain
@@ -260,7 +257,7 @@ contains
260257
end if
261258

262259
if (patch_bc(i)%geometry == 1) then
263-
call s_line_segment_bc(i, q_prim_vf, bc_type)
260+
call s_line_segment_bc(i, bc_type)
264261
end if
265262
end do
266263
end if

src/pre_process/m_model.fpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,11 +1104,10 @@ contains
11041104
!! @param point The cell centers of the current levelset cell
11051105
!! @param spacing Dimensions of the current levelset cell
11061106
!! @return Distance which the levelset distance without interpolation
1107-
pure function f_distance(boundary_v, boundary_vertex_count, boundary_edge_count, point, spacing) result(distance)
1108-
integer, intent(in) :: boundary_vertex_count, boundary_edge_count
1107+
pure function f_distance(boundary_v, boundary_edge_count, point) result(distance)
1108+
integer, intent(in) :: boundary_edge_count
11091109
real(wp), intent(in), dimension(1:boundary_edge_count, 1:3, 1:2) :: boundary_v
11101110
t_vec3, intent(in) :: point
1111-
t_vec3, intent(in) :: spacing
11121111

11131112
integer :: i
11141113
real(wp) :: dist_buffer1, dist_buffer2
@@ -1132,16 +1131,13 @@ contains
11321131

11331132
!> This procedure determines the levelset normals of 2D models without interpolation.
11341133
!! @param boundary_v Group of all the boundary vertices of the 2D model without interpolation
1135-
!! @param boundary_vertex_count Output the total number of boundary vertices
11361134
!! @param boundary_edge_count Output the total number of boundary edges
11371135
!! @param point The cell centers of the current levelset cell
1138-
!! @param spacing Dimensions of the current levelset cell
11391136
!! @param normals Output levelset normals without interpolation
1140-
pure subroutine f_normals(boundary_v, boundary_vertex_count, boundary_edge_count, point, spacing, normals)
1141-
integer, intent(in) :: boundary_vertex_count, boundary_edge_count
1137+
pure subroutine f_normals(boundary_v, boundary_edge_count, point, normals)
1138+
integer, intent(in) :: boundary_edge_count
11421139
real(wp), intent(in), dimension(1:boundary_edge_count, 1:3, 1:2) :: boundary_v
11431140
t_vec3, intent(in) :: point
1144-
t_vec3, intent(in) :: spacing
11451141
t_vec3, intent(out) :: normals
11461142

11471143
integer :: i, idx_buffer
@@ -1176,13 +1172,11 @@ contains
11761172
!! @param interpolated_boundary_v Group of all the boundary vertices of the interpolated 2D model
11771173
!! @param total_vertices Total number of vertices after interpolation
11781174
!! @param point The cell centers of the current levelset cell
1179-
!! @param spacing Dimensions of the current levelset cell
11801175
!! @return Distance which the levelset distance without interpolation
1181-
pure function f_interpolated_distance(interpolated_boundary_v, total_vertices, point, spacing) result(distance)
1176+
pure function f_interpolated_distance(interpolated_boundary_v, total_vertices, point) result(distance)
11821177
integer, intent(in) :: total_vertices
11831178
real(wp), intent(in), dimension(1:total_vertices, 1:3) :: interpolated_boundary_v
11841179
t_vec3, intent(in) :: point
1185-
t_vec3, intent(in) :: spacing
11861180

11871181
integer :: i !< Loop iterator
11881182
real(wp) :: dist_buffer, min_dist

0 commit comments

Comments
 (0)