Skip to content

Commit a27ef39

Browse files
authored
Merge pull request #148 from anandrdbz/master
2 parents 222bb90 + d9dd348 commit a27ef39

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

src/simulation/m_cbc.fpp

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -638,6 +638,7 @@ contains
638638
if (cbc_dir == ${CBC_DIR}$) then
639639

640640
! PI2 of flux_rs_vf and flux_src_rs_vf at j = 1/2 ==================
641+
641642
if (weno_order == 3) then
642643

643644
call s_convert_primitive_to_flux_variables(q_prim_rs${XYZ}$_vf, &
@@ -720,6 +721,7 @@ contains
720721
end if
721722
! ==================================================================
722723

724+
723725
! FD2 or FD4 of RHS at j = 0 =======================================
724726
!$acc parallel loop collapse(2) gang vector default(present) private(alpha_rho, vel, adv, mf, dvel_ds, dadv_ds, Re_cbc, dalpha_rho_ds,dvel_dt, dadv_dt, dalpha_rho_dt,L, lambda)
725727
do r = is3%beg, is3%end
@@ -952,6 +954,7 @@ contains
952954

953955
end do
954956
end do
957+
955958
end if
956959
#:endfor
957960

@@ -1063,7 +1066,7 @@ contains
10631066

10641067
if(riemann_solver == 1) then
10651068
!$acc parallel loop collapse(4) gang vector default(present)
1066-
do i = 1, advxe
1069+
do i = advxb, advxe
10671070
do r = is3%beg, is3%end
10681071
do k = is2%beg, is2%end
10691072
do j = -1, buff_size
@@ -1087,7 +1090,6 @@ contains
10871090
end if
10881091

10891092

1090-
10911093
! END: Reshaping Inputted Data in x-direction ======================
10921094

10931095
! Reshaping Inputted Data in y-direction ===========================
@@ -1141,7 +1143,7 @@ contains
11411143

11421144
if(riemann_solver == 1) then
11431145
!$acc parallel loop collapse(4) gang vector default(present)
1144-
do i = 1, advxe
1146+
do i = advxb, advxe
11451147
do r = is3%beg, is3%end
11461148
do k = is2%beg, is2%end
11471149
do j = -1, buff_size
@@ -1162,7 +1164,7 @@ contains
11621164
end do
11631165
end do
11641166
end do
1165-
end if
1167+
end if
11661168

11671169

11681170
! END: Reshaping Inputted Data in y-direction ======================
@@ -1218,7 +1220,7 @@ contains
12181220

12191221
if(riemann_solver == 1) then
12201222
!$acc parallel loop collapse(4) gang vector default(present)
1221-
do i = 1, advxe
1223+
do i = advxb, advxe
12221224
do r = is3%beg, is3%end
12231225
do k = is2%beg, is2%end
12241226
do j = -1, buff_size
@@ -1241,7 +1243,6 @@ contains
12411243
end do
12421244
end if
12431245

1244-
12451246
end if
12461247
! END: Reshaping Inputted Data in z-direction ======================
12471248

@@ -1303,7 +1304,7 @@ contains
13031304

13041305
if(riemann_solver == 1) then
13051306
!$acc parallel loop collapse(4) gang vector default(present)
1306-
do i = 1, advxe
1307+
do i = advxb, advxe
13071308
do r = is3%beg, is3%end
13081309
do k = is2%beg, is2%end
13091310
do j = -1, buff_size
@@ -1355,7 +1356,7 @@ contains
13551356

13561357
if(riemann_solver == 1) then
13571358
!$acc parallel loop collapse(4) gang vector default(present)
1358-
do i = 1, advxe
1359+
do i = advxb, advxe
13591360
do r = is3%beg, is3%end
13601361
do k = is2%beg, is2%end
13611362
do j = -1, buff_size
@@ -1408,7 +1409,7 @@ contains
14081409

14091410
if(riemann_solver == 1) then
14101411
!$acc parallel loop collapse(4) gang vector default(present)
1411-
do i = 1, advxe
1412+
do i = advxb, advxe
14121413
do r = is3%beg, is3%end
14131414
do k = is2%beg, is2%end
14141415
do j = -1, buff_size

src/simulation/m_rhs.fpp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ contains
540540
flux_src_n(i)%vf(l)%sf => &
541541
flux_src_n(1)%vf(l)%sf
542542

543-
!$acc enter data attach(flux_n(i)%vf(l)%sf,flux_src_n(i)%vf(l)%sf)
543+
!$acc enter data attach(flux_n(i)%vf(l)%sf, flux_src_n(i)%vf(l)%sf)
544544
end do
545545

546546
end if
@@ -666,6 +666,7 @@ contains
666666
end do
667667
end do
668668

669+
669670
call nvtxStartRange("RHS-MPI")
670671
call s_populate_conservative_variables_buffers()
671672
call nvtxEndRange
@@ -735,7 +736,7 @@ contains
735736
ix%end = m - ix%beg; iy%end = n - iy%beg; iz%end = p - iz%beg
736737
! ===============================================================
737738
! Reconstructing Primitive/Conservative Variables ===============
738-
739+
739740
if (all(Re_size == 0)) then
740741
iv%beg = 1; iv%end = sys_size
741742
!call nvtxStartRange("RHS-WENO")
@@ -830,7 +831,6 @@ contains
830831

831832
! ===============================================================
832833

833-
834834
if (alt_soundspeed) then
835835
!$acc parallel loop collapse(3) gang vector default(present)
836836
do l = 0, p
@@ -856,13 +856,16 @@ contains
856856
end if
857857

858858
call nvtxStartRange("RHS_Flux_Add")
859-
if (id == 1) then
860859

860+
861+
if (id == 1) then
862+
861863
if (bc_x%beg <= -5) then
862864
call s_cbc(q_prim_qp%vf, flux_n(id)%vf, &
863865
flux_src_n(id)%vf, id, -1, ix, iy, iz)
864866
end if
865867

868+
866869
if (bc_x%end <= -5) then
867870
call s_cbc(q_prim_qp%vf, flux_n(id)%vf, &
868871
flux_src_n(id)%vf, id, 1, ix, iy, iz)
@@ -1648,12 +1651,14 @@ contains
16481651
! RHS additions for hypoelasticity
16491652
call nvtxStartRange("RHS_Hypoelasticity")
16501653

1654+
16511655
if (hypoelasticity) then
16521656

16531657
call s_compute_hypoelastic_rhs(id, q_prim_qp%vf, rhs_vf)
16541658

16551659
end if
16561660
call nvtxEndRange
1661+
16571662
end do
16581663
! END: Dimensional Splitting Loop =================================
16591664

0 commit comments

Comments
 (0)