Skip to content

Commit ffb479a

Browse files
prathi-windXuzheng Tiansbryngelson
committed
Cody tidying - Remove unused dummy variables (MFlowCode#854)
Co-authored-by: Xuzheng Tian <[email protected]> Co-authored-by: Spencer Bryngelson <[email protected]> Co-authored-by: Spencer Bryngelson <[email protected]>
1 parent b443875 commit ffb479a

27 files changed

+124
-236
lines changed

src/common/m_boundary_common.fpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ contains
143143
case (BC_CHAR_SUP_OUTFLOW:BC_GHOST_EXTRAP)
144144
call s_ghost_cell_extrapolation(q_prim_vf, pb, mv, 2, -1, k, l)
145145
case (BC_AXIS)
146-
call s_axis(q_prim_vf, pb, mv, 2, -1, k, l)
146+
call s_axis(q_prim_vf, pb, mv, k, l)
147147
case (BC_REFLECTIVE)
148148
call s_symmetry(q_prim_vf, pb, mv, 2, -1, k, l)
149149
case (BC_PERIODIC)
@@ -714,15 +714,14 @@ contains
714714

715715
end subroutine s_periodic
716716

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

728727
integer :: j, q, i

src/common/m_mpi_common.fpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -376,21 +376,17 @@ contains
376376
!! @param Rc_min_glb Global minimum Rc stability criterion
377377
impure subroutine s_mpi_reduce_stability_criteria_extrema(icfl_max_loc, &
378378
vcfl_max_loc, &
379-
ccfl_max_loc, &
380379
Rc_min_loc, &
381380
icfl_max_glb, &
382381
vcfl_max_glb, &
383-
ccfl_max_glb, &
384382
Rc_min_glb)
385383
386384
real(wp), intent(in) :: icfl_max_loc
387385
real(wp), intent(in) :: vcfl_max_loc
388-
real(wp), intent(in) :: ccfl_max_loc
389386
real(wp), intent(in) :: Rc_min_loc
390387
391388
real(wp), intent(out) :: icfl_max_glb
392389
real(wp), intent(out) :: vcfl_max_glb
393-
real(wp), intent(out) :: ccfl_max_glb
394390
real(wp), intent(out) :: Rc_min_glb
395391
396392
#ifdef MFC_SIMULATION
@@ -1179,7 +1175,8 @@ contains
11791175
#:endif
11801176
end if
11811177
#:endfor
1182-
1178+
p_send => buff_send(0)
1179+
p_recv => buff_recv(0)
11831180
! Send/Recv
11841181
#ifdef MFC_SIMULATION
11851182
#: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
@@ -147,7 +147,7 @@ contains
147147

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

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

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

173173
! calculating Saturation temperature
174174
call s_TSat(pSOV, TSatOV, TSOV)
@@ -181,7 +181,7 @@ contains
181181
q_cons_vf(vp + contxb - 1)%sf(j, k, l) = mixM*rM
182182

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

186186
! calculating Saturation temperature
187187
call s_TSat(pSSL, TSatSL, TSSL)
@@ -285,7 +285,7 @@ contains
285285
!! @param q_cons_vf Cell-average conservative variables
286286
!! @param rhoe mixture energy
287287
!! @param TS equilibrium temperature at the interface
288-
pure subroutine s_infinite_pt_relaxation_k(j, k, l, MFL, pS, p_infpT, rM, q_cons_vf, rhoe, TS)
288+
pure subroutine s_infinite_pt_relaxation_k(j, k, l, MFL, pS, p_infpT, q_cons_vf, rhoe, TS)
289289

290290
#ifdef _CRAYFTN
291291
!DIR$ INLINEALWAYS s_infinite_pt_relaxation_k
@@ -297,7 +297,6 @@ contains
297297
integer, intent(in) :: j, k, l, MFL
298298
real(wp), intent(out) :: pS
299299
real(wp), dimension(num_fluids), intent(out) :: p_infpT
300-
real(wp), intent(in) :: rM
301300
type(scalar_field), dimension(sys_size), intent(in) :: q_cons_vf
302301
real(wp), intent(in) :: rhoe
303302
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
@@ -92,11 +92,11 @@ contains
9292

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

9797
else if (bubbles_euler) then
9898
call s_convert_species_to_mixture_variables_bubbles(q_vf, i, j, k, &
99-
rho, gamma, pi_inf, qv, Re_K, G_K, G)
99+
rho, gamma, pi_inf, qv, Re_K)
100100
else
101101
! Volume fraction model
102102
call s_convert_species_to_mixture_variables(q_vf, i, j, k, &
@@ -207,7 +207,7 @@ contains
207207
!! @param pi_inf liquid stiffness
208208
!! @param qv fluid reference energy
209209
subroutine s_convert_mixture_to_mixture_variables(q_vf, i, j, k, &
210-
rho, gamma, pi_inf, qv, Re_K, G_K, G)
210+
rho, gamma, pi_inf, qv)
211211

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

220-
real(wp), optional, dimension(2), intent(out) :: Re_K
221-
222-
real(wp), optional, intent(out) :: G_K
223-
real(wp), optional, dimension(num_fluids), intent(in) :: G
224-
225220
! Transferring the density, the specific heat ratio function and the
226221
! liquid stiffness function, respectively
227222
rho = q_vf(1)%sf(i, j, k)
@@ -254,7 +249,7 @@ contains
254249
!! @param pi_inf liquid stiffness
255250
!! @param qv fluid reference energy
256251
subroutine s_convert_species_to_mixture_variables_bubbles(q_vf, j, k, l, &
257-
rho, gamma, pi_inf, qv, Re_K, G_K, G)
252+
rho, gamma, pi_inf, qv, Re_K)
258253

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

@@ -266,8 +261,6 @@ contains
266261
real(wp), intent(out), target :: qv
267262

268263
real(wp), optional, dimension(2), intent(out) :: Re_K
269-
real(wp), optional, intent(out) :: G_K
270-
real(wp), optional, dimension(num_fluids), intent(in) :: G
271264

272265
integer :: i, q
273266
real(wp), dimension(num_fluids) :: alpha_rho_K, alpha_K
@@ -464,7 +457,7 @@ contains
464457

465458
pure subroutine s_convert_species_to_mixture_variables_acc(rho_K, &
466459
gamma_K, pi_inf_K, qv_K, &
467-
alpha_K, alpha_rho_K, Re_K, k, l, r, &
460+
alpha_K, alpha_rho_K, Re_K, &
468461
G_K, G)
469462
#ifdef _CRAYFTN
470463
!DIR$ INLINEALWAYS s_convert_species_to_mixture_variables_acc
@@ -481,8 +474,6 @@ contains
481474
real(wp), optional, intent(out) :: G_K
482475
real(wp), optional, dimension(num_fluids), intent(in) :: G
483476

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

@@ -548,7 +539,7 @@ contains
548539

549540
pure subroutine s_convert_species_to_mixture_variables_bubbles_acc(rho_K, &
550541
gamma_K, pi_inf_K, qv_K, &
551-
alpha_K, alpha_rho_K, Re_K, k, l, r)
542+
alpha_K, alpha_rho_K, Re_K)
552543
#ifdef _CRAYFTN
553544
!DIR$ INLINEALWAYS s_convert_species_to_mixture_variables_bubbles_acc
554545
#else
@@ -561,7 +552,6 @@ contains
561552
!! Partial densities and volume fractions
562553

563554
real(wp), dimension(2), intent(out) :: Re_K
564-
integer, intent(in) :: k, l, r
565555

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

@@ -820,16 +810,12 @@ contains
820810
subroutine s_convert_conservative_to_primitive_variables(qK_cons_vf, &
821811
q_T_sf, &
822812
qK_prim_vf, &
823-
ibounds, &
824-
gm_alphaK_vf)
813+
ibounds)
825814

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

834820
real(wp), dimension(num_fluids) :: alpha_K, alpha_rho_K
835821
real(wp), dimension(2) :: Re_K
@@ -903,13 +889,13 @@ contains
903889
! If in simulation, use acc mixture subroutines
904890
if (elasticity) then
905891
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, alpha_K, &
906-
alpha_rho_K, Re_K, j, k, l, G_K, Gs)
892+
alpha_rho_K, Re_K, G_K, Gs)
907893
else if (bubbles_euler) then
908894
call s_convert_species_to_mixture_variables_bubbles_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
909-
alpha_K, alpha_rho_K, Re_K, j, k, l)
895+
alpha_K, alpha_rho_K, Re_K)
910896
else
911897
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
912-
alpha_K, alpha_rho_K, Re_K, j, k, l)
898+
alpha_K, alpha_rho_K, Re_K)
913899
end if
914900
#else
915901
! If pre-processing, use non acc mixture subroutines
@@ -1511,13 +1497,13 @@ contains
15111497
if (elasticity) then
15121498
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
15131499
alpha_K, alpha_rho_K, Re_K, &
1514-
j, k, l, G_K, Gs)
1500+
G_K, Gs)
15151501
else if (bubbles_euler) then
15161502
call s_convert_species_to_mixture_variables_bubbles_acc(rho_K, gamma_K, &
1517-
pi_inf_K, qv_K, alpha_K, alpha_rho_K, Re_K, j, k, l)
1503+
pi_inf_K, qv_K, alpha_K, alpha_rho_K, Re_K)
15181504
else
15191505
call s_convert_species_to_mixture_variables_acc(rho_K, gamma_K, pi_inf_K, qv_K, &
1520-
alpha_K, alpha_rho_K, Re_K, j, k, l)
1506+
alpha_K, alpha_rho_K, Re_K)
15211507
end if
15221508

15231509
! 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)