Skip to content

Commit 7087491

Browse files
committed
[no ci] smh cray
1 parent e037203 commit 7087491

File tree

6 files changed

+26
-29
lines changed

6 files changed

+26
-29
lines changed

src/common/m_variables_conversion.fpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ contains
13981398
end subroutine s_finalize_variables_conversion_module
13991399

14001400
#ifndef MFC_PRE_PROCESS
1401-
subroutine s_compute_speed_of_sound(pres, rho, gamma, pi_inf, H, adv, vel_sum, c, c_avggg)
1401+
subroutine s_compute_speed_of_sound(pres, rho, gamma, pi_inf, H, adv, vel_sum, c_avggg, c)
14021402
#ifdef CRAY_ACC_WAR
14031403
!DIR$ INLINEALWAYS s_compute_speed_of_sound
14041404
#else
@@ -1409,18 +1409,15 @@ contains
14091409
real(kind(0d0)), intent(in) :: H
14101410
real(kind(0d0)), dimension(num_fluids), intent(in) :: adv
14111411
real(kind(0d0)), intent(in) :: vel_sum
1412+
real(kind(0d0)), intent(in) :: c_avggg
14121413
real(kind(0d0)), intent(out) :: c
14131414

14141415
real(kind(0d0)) :: blkmod1, blkmod2
14151416
real(kind(0d0)) :: Tolerance, c_c
1416-
real(kind(0d0)), optional, intent(in) :: c_avggg
14171417
integer :: q
1418+
14181419
if (chemistry) then
1419-
if (present(c_avggg)) then
1420-
c_c = c_avggg
1421-
else
1422-
c_c = 0.0d0 ! Default value if 'b' is absent
1423-
end if
1420+
c_c = c_avggg
14241421

14251422
if (avg_state == 1 .and. abs(c_c) > Tolerance) then
14261423
c = sqrt(c_c - (gamma - 1.0d0)*(vel_sum - H))

src/post_process/m_start_up.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ subroutine s_save_data(t_step, varname, pres, c, H)
500500

501501
call s_compute_speed_of_sound(pres, rho_sf(i, j, k), &
502502
gamma_sf(i, j, k), pi_inf_sf(i, j, k), &
503-
H, adv, 0d0, c)
503+
H, adv, 0d0, 0d0, c)
504504

505505
q_sf(i, j, k) = c
506506
end do

src/simulation/m_cbc.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ contains
807807
H = (E + pres)/rho
808808

809809
! Compute mixture sound speed
810-
call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, H, adv, vel_K_sum, c)
810+
call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, H, adv, vel_K_sum, 0d0, c)
811811
! ============================================================
812812

813813
! First-Order Spatial Derivatives of Primitive Variables =====

src/simulation/m_data_output.fpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ contains
264264
call s_compute_enthalpy(q_prim_vf, pres, rho, gamma, pi_inf, Re, H, alpha, vel, vel_sum, j, k, l)
265265

266266
! Compute mixture sound speed
267-
call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, H, alpha, vel_sum, c)
267+
call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, H, alpha, vel_sum, 0d0, c)
268268

269269
if (any(Re_size > 0)) then
270270
call s_compute_stability_from_dt(vel, c, rho, Re, j, k, l, icfl_sf, vcfl_sf, Rc_sf)
@@ -1116,7 +1116,7 @@ contains
11161116

11171117
! Compute mixture sound Speed
11181118
call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, &
1119-
((gamma + 1d0)*pres + pi_inf)/rho, alpha, 0d0, c)
1119+
((gamma + 1d0)*pres + pi_inf)/rho, alpha, 0d0, 0d0, c)
11201120

11211121
accel = accel_mag(j - 2, k, l)
11221122
end if
@@ -1202,7 +1202,7 @@ contains
12021202

12031203
! Compute mixture sound speed
12041204
call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, &
1205-
((gamma + 1d0)*pres + pi_inf)/rho, alpha, 0d0, c)
1205+
((gamma + 1d0)*pres + pi_inf)/rho, alpha, 0d0, 0d0, c)
12061206

12071207
accel = accel_mag(j - 2, k - 2, l)
12081208
end if
@@ -1263,7 +1263,7 @@ contains
12631263

12641264
! Compute mixture sound speed
12651265
call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, &
1266-
((gamma + 1d0)*pres + pi_inf)/rho, alpha, 0d0, c)
1266+
((gamma + 1d0)*pres + pi_inf)/rho, alpha, 0d0, 0d0, c)
12671267

12681268
accel = accel_mag(j - 2, k - 2, l - 2)
12691269
end if

src/simulation/m_riemann_solvers.fpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -571,16 +571,16 @@ contains
571571
@:compute_average_state()
572572

573573
call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
574-
vel_L_rms, c_L)
574+
vel_L_rms, 0d0, c_L)
575575

576576
call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
577-
vel_R_rms, c_R)
577+
vel_R_rms, 0d0, c_R)
578578

579579
!> The computation of c_avg does not require all the variables, and therefore the non '_avg'
580580
! variables are placeholders to call the subroutine.
581581

582582
call s_compute_speed_of_sound(pres_R, rho_avg, gamma_avg, pi_inf_R, H_avg, alpha_R, &
583-
vel_avg_rms, c_avg, c_avggg)
583+
vel_avg_rms, c_avggg, c_avg)
584584

585585
if (any(Re_size > 0)) then
586586
!$acc loop seq
@@ -1118,16 +1118,16 @@ contains
11181118
@:compute_average_state()
11191119
11201120
call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
1121-
vel_L_rms, c_L)
1121+
vel_L_rms, 0d0, c_L)
11221122
11231123
call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
1124-
vel_R_rms, c_R)
1124+
vel_R_rms, 0d0, c_R)
11251125
11261126
!> The computation of c_avg does not require all the variables, and therefore the non '_avg'
11271127
! variables are placeholders to call the subroutine.
11281128
11291129
call s_compute_speed_of_sound(pres_R, rho_avg, gamma_avg, pi_inf_R, H_avg, alpha_R, &
1130-
vel_avg_rms, c_avg)
1130+
vel_avg_rms, 0d0, c_avg)
11311131
11321132
if (any(Re_size > 0)) then
11331133
!$acc loop seq
@@ -1417,16 +1417,16 @@ contains
14171417
@:compute_average_state()
14181418
14191419
call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
1420-
vel_L_rms, c_L)
1420+
vel_L_rms, 0d0, c_L)
14211421
14221422
call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
1423-
vel_R_rms, c_R)
1423+
vel_R_rms, 0d0, c_R)
14241424
14251425
!> The computation of c_avg does not require all the variables, and therefore the non '_avg'
14261426
! variables are placeholders to call the subroutine.
14271427
14281428
call s_compute_speed_of_sound(pres_R, rho_avg, gamma_avg, pi_inf_R, H_avg, alpha_R, &
1429-
vel_avg_rms, c_avg)
1429+
vel_avg_rms, 0d0, c_avg)
14301430
14311431
if (wave_speeds == 1) then
14321432
s_L = min(vel_L(dir_idx(1)) - c_L, vel_R(dir_idx(1)) - c_R)
@@ -1833,16 +1833,16 @@ contains
18331833
end if
18341834
18351835
call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
1836-
vel_L_rms, c_L)
1836+
vel_L_rms, 0d0, c_L)
18371837
18381838
call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
1839-
vel_R_rms, c_R)
1839+
vel_R_rms, 0d0, c_R)
18401840
18411841
!> The computation of c_avg does not require all the variables, and therefore the non '_avg'
18421842
! variables are placeholders to call the subroutine.
18431843
18441844
call s_compute_speed_of_sound(pres_R, rho_avg, gamma_avg, pi_inf_R, H_avg, alpha_R, &
1845-
vel_avg_rms, c_avg)
1845+
vel_avg_rms, 0d0, c_avg)
18461846
18471847
if (any(Re_size > 0)) then
18481848
!$acc loop seq
@@ -2241,16 +2241,16 @@ contains
22412241
!print *, c_avggg
22422242
22432243
call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
2244-
vel_L_rms, c_L)
2244+
vel_L_rms, 0d0, c_L)
22452245
22462246
call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
2247-
vel_R_rms, c_R)
2247+
vel_R_rms, 0d0, c_R)
22482248
22492249
!> The computation of c_avg does not require all the variables, and therefore the non '_avg'
22502250
! variables are placeholders to call the subroutine.
22512251
22522252
call s_compute_speed_of_sound(pres_R, rho_avg, gamma_avg, pi_inf_R, H_avg, alpha_R, &
2253-
vel_avg_rms, c_avg, c_avggg)
2253+
vel_avg_rms, c_avggg, c_avg)
22542254
22552255
if (any(Re_size > 0)) then
22562256
!$acc loop seq

src/simulation/m_time_steppers.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ contains
939939
call s_compute_enthalpy(q_prim_vf, pres, rho, gamma, pi_inf, Re, H, alpha, vel, vel_sum, j, k, l)
940940

941941
! Compute mixture sound speed
942-
call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, H, alpha, vel_sum, c)
942+
call s_compute_speed_of_sound(pres, rho, gamma, pi_inf, H, alpha, vel_sum, 0d0, c)
943943

944944
call s_compute_dt_from_cfl(vel, c, max_dt, rho, Re, j, k, l)
945945
end do

0 commit comments

Comments
 (0)