Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Anand committed Apr 17, 2024
1 parent a385205 commit 747b3d1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
5 changes: 3 additions & 2 deletions examples/3D_barotropic/case.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import json

# Numerical setup
Nx = 499
Nx = 49
dx = 1./(1.*(Nx+1))

Tend = 0.2
Expand Down Expand Up @@ -40,7 +40,7 @@
'dt' : mydt,
't_step_start' : 0,
't_step_stop' : 4000,
't_step_save' : 50,
't_step_save' : 10,
# ==========================================================================

# Simulation Algorithm Parameters ==========================================
Expand Down Expand Up @@ -76,6 +76,7 @@
'format' : 1,
'precision' : 2,
'prim_vars_wrt' :'T',
'E_wrt' :'T',
'parallel_io' :'T',
# ==========================================================================

Expand Down
18 changes: 9 additions & 9 deletions src/simulation/m_rhs.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,7 @@ contains

bcxb = bc_x%beg; bcxe = bc_x%end; bcyb = bc_y%beg; bcye = bc_y%end; bczb = bc_z%beg; bcze = bc_z%end;

!bcxb = -1; bcxe = -1; bcyb = -1; bcye = -1; bczb = -1; bcze = -1;
bcxb = -1; bcxe = -1; bcyb = -1; bcye = -1; bczb = -1; bcze = -1;

!$acc update device(ix, iy, iz, bcxb, bcxe, bcyb, bcye, bczb, bcze)

Expand Down Expand Up @@ -942,7 +942,7 @@ contains
do l = iz%beg, iz%end
do k = iy%beg, iy%end
do j = ix%beg, ix%end
rho_igr(j,k,l) = q_prim_qp%vf(1)%sf(j,k,l)
rho_igr(j,k,l) = q_prim_qp%vf(contxb)%sf(j,k,l)
end do
end do
end do
Expand Down Expand Up @@ -1011,7 +1011,7 @@ contains
rhs_igr(j, k, l) = alf_igr*((dux_igr(j,k,l)*dux_igr(j,k,l) + dvx_igr(j,k,l) * duy_igr(j,k,l) + dwx_igr(j,k,l) * duz_igr(j,k,l)) + &
(duy_igr(j,k,l)*dvx_igr(j,k,l) + dvy_igr(j,k,l) * dvy_igr(j,k,l) + dwy_igr(j,k,l) * dvz_igr(j,k,l)) + &
(duz_igr(j,k,l)*dwx_igr(j,k,l) + dvz_igr(j,k,l) * dwy_igr(j,k,l) + dwz_igr(j,k,l) * dwz_igr(j,k,l)) + &
(dux_igr(j,k,l)**2d0 + dvy_igr(j,k,l)**2d0 + dwz_igr(j,k,l)**2d0))
(dux_igr(j,k,l) + dvy_igr(j,k,l) + dwz_igr(j,k,l))**2d0 )
end do
end do
end do
Expand All @@ -1024,9 +1024,9 @@ contains
rho_ly = 2d0 * rho_igr(j,k,l) * rho_igr(j,k-1,l) / (rho_igr(j,k,l) + rho_igr(j,k-1,l))
rho_lz = 2d0 * rho_igr(j,k,l) * rho_igr(j,k,l-1) / (rho_igr(j,k,l) + rho_igr(j,k,l-1))

rho_lx = 2d0 * rho_igr(j,k,l) * rho_igr(j+1,k,l) / (rho_igr(j,k,l) + rho_igr(j+1,k,l))
rho_ly = 2d0 * rho_igr(j,k,l) * rho_igr(j,k+1,l) / (rho_igr(j,k,l) + rho_igr(j,k+1,l))
rho_lz = 2d0 * rho_igr(j,k,l) * rho_igr(j,k,l+1) / (rho_igr(j,k,l) + rho_igr(j,k,l+1))
rho_rx = 2d0 * rho_igr(j,k,l) * rho_igr(j+1,k,l) / (rho_igr(j,k,l) + rho_igr(j+1,k,l))
rho_ry = 2d0 * rho_igr(j,k,l) * rho_igr(j,k+1,l) / (rho_igr(j,k,l) + rho_igr(j,k+1,l))
rho_rz = 2d0 * rho_igr(j,k,l) * rho_igr(j,k,l+1) / (rho_igr(j,k,l) + rho_igr(j,k,l+1))

!rho_lx = rho_igr(j-1,k,l)
!rho_ly = rho_igr(j,k-1,l)
Expand Down Expand Up @@ -1080,9 +1080,9 @@ contains
rho_ly = 2d0 * rho_igr(j,k,l) * rho_igr(j,k-1,l) / (rho_igr(j,k,l) + rho_igr(j,k-1,l))
rho_lz = 2d0 * rho_igr(j,k,l) * rho_igr(j,k,l-1) / (rho_igr(j,k,l) + rho_igr(j,k,l-1))

rho_lx = 2d0 * rho_igr(j,k,l) * rho_igr(j+1,k,l) / (rho_igr(j,k,l) + rho_igr(j+1,k,l))
rho_ly = 2d0 * rho_igr(j,k,l) * rho_igr(j,k+1,l) / (rho_igr(j,k,l) + rho_igr(j,k+1,l))
rho_lz = 2d0 * rho_igr(j,k,l) * rho_igr(j,k,l+1) / (rho_igr(j,k,l) + rho_igr(j,k,l+1))
rho_rx = 2d0 * rho_igr(j,k,l) * rho_igr(j+1,k,l) / (rho_igr(j,k,l) + rho_igr(j+1,k,l))
rho_ry = 2d0 * rho_igr(j,k,l) * rho_igr(j,k+1,l) / (rho_igr(j,k,l) + rho_igr(j,k+1,l))
rho_rz = 2d0 * rho_igr(j,k,l) * rho_igr(j,k,l+1) / (rho_igr(j,k,l) + rho_igr(j,k,l+1))

!rho_lx = rho_igr(j-1,k,l)
!rho_ly = rho_igr(j,k-1,l)
Expand Down

0 comments on commit 747b3d1

Please sign in to comment.