@@ -624,7 +624,7 @@ contains
624624 real (wp), intent (inout ) :: time_avg
625625
626626 real (wp), dimension (0 :m, 0 :n, 0 :p) :: nbub
627- real (wp) :: t_start, t_finish
627+ real (wp) :: t_start, t_finish, multip
628628 integer :: i, j, k, l, id !< Generic loop iterators
629629
630630 call nvtxStartRange(" COMPUTE-RHS" )
@@ -644,7 +644,14 @@ contains
644644 end do
645645 end do
646646
647- ! Converting Conservative to Primitive Variables
647+ ! determining what the multiplying factor will be for the source terms in the cylindrical/ spherical coordinates
648+ if (cyl_coord) then
649+ multip = 5e-1_wp
650+ else if (sph_coord) then
651+ multip = 1.0_wp
652+ else
653+ multip = 0.0_wp
654+ end if
648655
649656 if (mpp_lim .and. bubbles_euler) then
650657 !$acc parallel loop collapse(3 ) gang vector default(present)
@@ -817,7 +824,8 @@ contains
817824 iden_cons_qp, &
818825 iden_prim_qp, &
819826 nill_cons_qp, &
820- nill_prim_qp)
827+ nill_prim_qp, &
828+ multip)
821829 call nvtxEndRange
822830
823831 ! RHS additions for hypoelasticity
@@ -836,7 +844,8 @@ contains
836844 flux_src_n(id)%vf, &
837845 dq_prim_dx_qp(1 )%vf, &
838846 dq_prim_dy_qp(1 )%vf, &
839- dq_prim_dz_qp(1 )%vf)
847+ dq_prim_dz_qp(1 )%vf, &
848+ multip)
840849 call nvtxEndRange
841850 end if
842851
@@ -937,29 +946,20 @@ contains
937946
938947 end subroutine s_compute_rhs
939948
940- subroutine s_compute_advection_source_term (idir , rhs_vf , q_cons_vf , q_prim_vf , flux_src_n_vf , iden_cons_vf , iden_prim_vf , nill_cons_vf , nill_prim_vf )
949+ subroutine s_compute_advection_source_term (idir , rhs_vf , q_cons_vf , q_prim_vf , flux_src_n_vf , iden_cons_vf , iden_prim_vf , nill_cons_vf , nill_prim_vf , multip )
941950
942951 integer , intent (in ) :: idir
943952 type(scalar_field), dimension (sys_size), intent (inout ) :: rhs_vf
944953 type(vector_field), intent (inout ) :: q_cons_vf
945954 type(vector_field), intent (inout ) :: q_prim_vf
946955 type(vector_field), intent (inout ) :: flux_src_n_vf
947956 type(vector_field), intent (in ) :: iden_cons_vf, iden_prim_vf, nill_cons_vf, nill_prim_vf
948- real (wp) :: multip
957+ real (wp), intent ( in ) :: multip
949958
950959 real (wp), dimension (0 :m, 0 :n, 0 :p) :: KNeg, KNill
951960
952961 integer :: i, j, k, l, q
953962
954- ! determining what the multiplying factor will be for the source terms in the cylindrical/ spherical coordinates
955- if (cyl_coord) then
956- multip = 5e-1_wp
957- else if (sph_coord) then
958- multip = 1.0_wp
959- else
960- multip = 0.0_wp
961- end if
962-
963963 if (alt_soundspeed) then
964964 !$acc parallel loop collapse(3 ) gang vector default(present)
965965 do l = 0 , p
@@ -979,15 +979,14 @@ contains
979979
980980 Kterm(j, k, l) = alpha1(j, k, l)* alpha2(j, k, l)* (blkmod2(j, k, l) - blkmod1(j, k, l))/ &
981981 (alpha1(j, k, l)* blkmod2(j, k, l) + alpha2(j, k, l)* blkmod1(j, k, l))
982-
983- KNill(j, k, l) = 0.0_wp
984-
985- KNeg(j, k, l) = - 1.0_wp * Kterm(j, k, l)
986982 end do
987983 end do
988984 end do
985+ KNeg(0 :m, 0 :n, 0 :p) = - 1.0_wp * Kterm(0 :m, 0 :n, 0 :p)
989986 end if
990-
987+
988+ KNill(0 :m, 0 :n, 0 :p) = 0.0_wp
989+
991990 if (idir == 1 ) then
992991
993992 if (bc_x%beg <= - 5 .and. bc_x%beg >= - 13 ) then
@@ -1034,7 +1033,6 @@ contains
10341033 end if
10351034
10361035 elseif (idir == 2 ) then
1037-
10381036 ! RHS Contribution in y- direction
10391037 ! Applying the Riemann fluxes
10401038
@@ -1084,7 +1082,6 @@ contains
10841082 end if
10851083
10861084 if (grid_geometry == 3 ) then ! Cylindrical Coordinates
1087-
10881085 !$acc parallel loop collapse(4 ) gang vector default(present)
10891086 do j = 1 , sys_size
10901087 do k = 0 , p
@@ -1150,6 +1147,7 @@ contains
11501147 ! call s_calculate_rhs_operator(idir, 1 , sys_size, 0 , m, 0 , n, 0 , p, multip, rhs_vf, flux_n, flux_gsrc_n, &
11511148 ! KNill, iden_cons_vf, iden_prim_vf, 0 , 1 , KNill, iden_cons_vf, iden_prim_vf, 0 , 1 , ' L' )
11521149 else
1150+
11531151 if (alt_soundspeed) then
11541152 do j = advxb, advxe
11551153 if ((j == advxe) .and. (bubbles_euler .neqv. .true. )) then
@@ -1244,24 +1242,17 @@ contains
12441242 end subroutine s_compute_advection_source_term
12451243
12461244 subroutine s_compute_additional_physics_rhs (idir , q_prim_vf , rhs_vf , flux_src_n , &
1247- dq_prim_dx_vf , dq_prim_dy_vf , dq_prim_dz_vf )
1245+ dq_prim_dx_vf , dq_prim_dy_vf , dq_prim_dz_vf , multip )
12481246
12491247 integer , intent (in ) :: idir
12501248 type(scalar_field), dimension (sys_size), intent (in ) :: q_prim_vf
12511249 type(scalar_field), dimension (sys_size), intent (inout ) :: rhs_vf
12521250 type(scalar_field), dimension (sys_size), intent (in ) :: flux_src_n
12531251 type(scalar_field), dimension (sys_size), intent (in ) :: dq_prim_dx_vf, dq_prim_dy_vf, dq_prim_dz_vf
1254- real (wp) :: multip
1252+ real (wp), intent ( in ) :: multip
12551253
12561254 integer :: i, j, k, l
12571255
1258- ! determining what the multiplying factor will be for the source terms in the cylindrical/ spherical coordinates
1259- if (cyl_coord) then
1260- multip = 5e-1_wp
1261- else if (sph_coord) then
1262- multip = 1.0_wp
1263- end if
1264-
12651256 if (idir == 1 ) then ! x- direction
12661257
12671258 if (surface_tension) then
0 commit comments