@@ -317,6 +317,7 @@ contains
317317
318318 real (wp) :: rho_avg
319319 real (wp) :: H_avg
320+ real (wp) :: qv_avg
320321 real (wp) :: gamma_avg
321322 real (wp) :: c_avg
322323
@@ -629,16 +630,16 @@ contains
629630 @:compute_average_state()
630631
631632 call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
632- vel_L_rms, 0._wp , c_L)
633+ vel_L_rms, 0._wp , c_L, qv_L )
633634
634635 call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
635- vel_R_rms, 0._wp , c_R)
636+ vel_R_rms, 0._wp , c_R, qv_R )
636637
637638 !> The computation of c_avg does not require all the variables, and therefore the non ' _avg'
638639 ! variables are placeholders to call the subroutine.
639640
640641 call s_compute_speed_of_sound(pres_R, rho_avg, gamma_avg, pi_inf_R, H_avg, alpha_R, &
641- vel_avg_rms, c_sum_Yi_Phi, c_avg)
642+ vel_avg_rms, c_sum_Yi_Phi, c_avg, qv_avg )
642643
643644 if (mhd) then
644645 call s_compute_fast_magnetosonic_speed(rho_L, c_L, B%L, norm_dir, c_fast%L, H_L)
@@ -1356,10 +1357,10 @@ contains
13561357 end if
13571358
13581359 call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
1359- vel_L_rms, 0._wp , c_L)
1360+ vel_L_rms, 0._wp , c_L, qv_L )
13601361
13611362 call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
1362- vel_R_rms, 0._wp , c_R)
1363+ vel_R_rms, 0._wp , c_R, qv_R )
13631364
13641365 if (mhd) then
13651366 call s_compute_fast_magnetosonic_speed(rho_L, c_L, B%L, norm_dir, c_fast%L, H_L)
@@ -1937,6 +1938,7 @@ contains
19371938 real (wp) :: rho_avg
19381939 real (wp) :: H_avg
19391940 real (wp) :: gamma_avg
1941+ real (wp) :: qv_avg
19401942 real (wp) :: c_avg
19411943
19421944 real (wp) :: s_L, s_R, s_M, s_P, s_S
@@ -2156,15 +2158,15 @@ contains
21562158 @:compute_average_state()
21572159
21582160 call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
2159- vel_L_rms, 0._wp , c_L)
2161+ vel_L_rms, 0._wp , c_L, qv_L )
21602162
21612163 call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
2162- vel_R_rms, 0._wp , c_R)
2164+ vel_R_rms, 0._wp , c_R, qv_R )
21632165
21642166 !> The computation of c_avg does not require all the variables, and therefore the non ' _avg'
21652167 ! variables are placeholders to call the subroutine.
21662168 call s_compute_speed_of_sound(pres_R, rho_avg, gamma_avg, pi_inf_R, H_avg, alpha_R, &
2167- vel_avg_rms, 0._wp , c_avg)
2169+ vel_avg_rms, 0._wp , c_avg, qv_avg )
21682170
21692171 if (viscous) then
21702172 $:GPU_LOOP(parallelism= ' [seq]' )
@@ -2472,16 +2474,16 @@ contains
24722474 @:compute_average_state()
24732475
24742476 call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
2475- vel_L_rms, 0._wp , c_L)
2477+ vel_L_rms, 0._wp , c_L, qv_L )
24762478
24772479 call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
2478- vel_R_rms, 0._wp , c_R)
2480+ vel_R_rms, 0._wp , c_R, qv_R )
24792481
24802482 !> The computation of c_avg does not require all the variables, and therefore the non ' _avg'
24812483 ! variables are placeholders to call the subroutine.
24822484
24832485 call s_compute_speed_of_sound(pres_R, rho_avg, gamma_avg, pi_inf_R, H_avg, alpha_R, &
2484- vel_avg_rms, 0._wp , c_avg)
2486+ vel_avg_rms, 0._wp , c_avg, qv_avg )
24852487
24862488 if (wave_speeds == 1 ) then
24872489 s_L = min (vel_L(dir_idx(1 )) - c_L, vel_R(dir_idx(1 )) - c_R)
@@ -2858,15 +2860,15 @@ contains
28582860 end if
28592861
28602862 call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
2861- vel_L_rms, 0._wp , c_L)
2863+ vel_L_rms, 0._wp , c_L, qv_L )
28622864
28632865 call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
2864- vel_R_rms, 0._wp , c_R)
2866+ vel_R_rms, 0._wp , c_R, qv_R )
28652867
28662868 !> The computation of c_avg does not require all the variables, and therefore the non ' _avg'
28672869 ! variables are placeholders to call the subroutine.
28682870 call s_compute_speed_of_sound(pres_R, rho_avg, gamma_avg, pi_inf_R, H_avg, alpha_R, &
2869- vel_avg_rms, 0._wp , c_avg)
2871+ vel_avg_rms, 0._wp , c_avg, qv_avg )
28702872
28712873 if (viscous) then
28722874 $:GPU_LOOP(parallelism= ' [seq]' )
@@ -3295,15 +3297,15 @@ contains
32953297 @:compute_average_state()
32963298
32973299 call s_compute_speed_of_sound(pres_L, rho_L, gamma_L, pi_inf_L, H_L, alpha_L, &
3298- vel_L_rms, 0._wp , c_L)
3300+ vel_L_rms, 0._wp , c_L, qv_L )
32993301
33003302 call s_compute_speed_of_sound(pres_R, rho_R, gamma_R, pi_inf_R, H_R, alpha_R, &
3301- vel_R_rms, 0._wp , c_R)
3303+ vel_R_rms, 0._wp , c_R, qv_R )
33023304
33033305 !> The computation of c_avg does not require all the variables, and therefore the non ' _avg'
33043306 ! variables are placeholders to call the subroutine.
33053307 call s_compute_speed_of_sound(pres_R, rho_avg, gamma_avg, pi_inf_R, H_avg, alpha_R, &
3306- vel_avg_rms, c_sum_Yi_Phi, c_avg)
3308+ vel_avg_rms, c_sum_Yi_Phi, c_avg, qv_avg )
33073309
33083310 if (viscous) then
33093311 if (chemistry) then
@@ -3750,8 +3752,8 @@ contains
37503752 H_no_mag%R = (E%R + pres%R - pres_mag%R)/ rho%R ! stagnation enthalpy here excludes magnetic energy (only used to find speed of sound)
37513753
37523754 ! (2 ) Compute fast wave speeds
3753- call s_compute_speed_of_sound(pres%L, rho%L, gamma%L, pi_inf%L, H_no_mag%L, alpha_L, vel_rms%L, 0._wp , c%L)
3754- call s_compute_speed_of_sound(pres%R, rho%R, gamma%R, pi_inf%R, H_no_mag%R, alpha_R, vel_rms%R, 0._wp , c%R)
3755+ call s_compute_speed_of_sound(pres%L, rho%L, gamma%L, pi_inf%L, H_no_mag%L, alpha_L, vel_rms%L, 0._wp , c%L, qv%L )
3756+ call s_compute_speed_of_sound(pres%R, rho%R, gamma%R, pi_inf%R, H_no_mag%R, alpha_R, vel_rms%R, 0._wp , c%R, qv%R )
37553757 call s_compute_fast_magnetosonic_speed(rho%L, c%L, B%L, norm_dir, c_fast%L, H_no_mag%L)
37563758 call s_compute_fast_magnetosonic_speed(rho%R, c%R, B%R, norm_dir, c_fast%R, H_no_mag%R)
37573759
0 commit comments