Skip to content

Commit b4f6495

Browse files
committed
compiles without errors with m_viscous. Fails a monopole test though...
1 parent 04b0f9e commit b4f6495

File tree

2 files changed

+112
-122
lines changed

2 files changed

+112
-122
lines changed

src/simulation/m_rhs.f90

Lines changed: 13 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module m_rhs
5050
s_compute_rhs, &
5151
s_pressure_relaxation_procedure, &
5252
s_populate_variables_buffers, &
53-
s_finalize_rhs_module, &
53+
s_finalize_rhs_module
5454

5555

5656
type(vector_field) :: q_cons_qp !<
@@ -877,7 +877,15 @@ subroutine s_compute_rhs(q_cons_vf, q_prim_vf, rhs_vf, t_step) ! -------
877877
if (qbmm) call s_mom_inv(q_prim_qp%vf, mom_sp, mom_3d, ix, iy, iz)
878878

879879
call nvtxStartRange("Viscous")
880-
if (any(Re_size > 0)) call s_get_viscous()
880+
if (any(Re_size > 0)) call s_get_viscous(qL_rsx_vf_flat, qL_rsy_vf_flat, qL_rsz_vf_flat, &
881+
dqL_prim_dx_n, dqL_prim_dy_n, dqL_prim_dz_n, &
882+
qL_prim, &
883+
qR_rsx_vf_flat, qR_rsy_vf_flat, qR_rsz_vf_flat, &
884+
dqR_prim_dx_n, dqR_prim_dy_n, dqR_prim_dz_n, &
885+
qR_prim, &
886+
q_prim_qp, &
887+
dq_prim_dx_qp, dq_prim_dy_qp, dq_prim_dz_qp, gm_vel_qp, &
888+
ix, iy, iz)
881889
call nvtxEndRange()
882890

883891
! Dimensional Splitting Loop =======================================
@@ -893,7 +901,7 @@ subroutine s_compute_rhs(q_cons_vf, q_prim_vf, rhs_vf, t_step) ! -------
893901
! Reconstructing Primitive/Conservative Variables ===============
894902

895903
if (all(Re_size == 0)) then
896-
%beg = 1; iv%end = sys_size
904+
iv%beg = 1; iv%end = sys_size
897905
!call nvtxStartRange("RHS-WENO")
898906
call nvtxStartRange("RHS-WENO")
899907
call s_reconstruct_cell_boundary_values_alt( &
@@ -1695,12 +1703,14 @@ subroutine s_compute_rhs(q_cons_vf, q_prim_vf, rhs_vf, t_step) ! -------
16951703
dq_prim_dx_qp%vf(mom_idx%beg:mom_idx%end), &
16961704
dq_prim_dy_qp%vf(mom_idx%beg:mom_idx%end), &
16971705
dq_prim_dz_qp%vf(mom_idx%beg:mom_idx%end), &
1706+
tau_Re_vf, &
16981707
ix, iy, iz)
16991708
else
17001709
call s_compute_viscous_stress_tensor(q_prim_qp%vf, &
17011710
dq_prim_dx_qp%vf(mom_idx%beg:mom_idx%end), &
17021711
dq_prim_dy_qp%vf(mom_idx%beg:mom_idx%end), &
17031712
dq_prim_dy_qp%vf(mom_idx%beg:mom_idx%end), &
1713+
tau_Re_vf, &
17041714
ix, iy, iz)
17051715
end if
17061716
!$acc parallel loop collapse(3) gang vector default(present)
@@ -3325,107 +3335,6 @@ subroutine s_reconstruct_cell_boundary_values_alt(v_vf, vL_x_flat, vL_y_flat, vL
33253335
! ==================================================================
33263336
end subroutine s_reconstruct_cell_boundary_values_alt ! --------------------
33273337

3328-
subroutine s_reconstruct_cell_boundary_values_visc(v_vf, vL_x_flat, vL_y_flat, vL_z_flat, vR_x_flat, vR_y_flat, vR_z_flat, & ! -
3329-
norm_dir, vL_prim_vf, vR_prim_vf)
3330-
3331-
type(scalar_field), dimension(iv%beg:iv%end), intent(IN) :: v_vf
3332-
type(scalar_field), dimension(iv%beg:iv%end), intent(INOUT) :: vL_prim_vf, vR_prim_vf
3333-
3334-
real(kind(0d0)), dimension(startx:, starty:, startz:, 1:), intent(INOUT) :: vL_x_flat, vL_y_flat, vL_z_flat, vR_x_flat, vR_y_flat, vR_z_flat
3335-
3336-
integer, intent(IN) :: norm_dir
3337-
3338-
integer :: weno_dir !< Coordinate direction of the WENO reconstruction
3339-
3340-
integer :: i, j, k, l
3341-
! Reconstruction in s1-direction ===================================
3342-
3343-
if (norm_dir == 1) then
3344-
is1 = ix; is2 = iy; is3 = iz
3345-
weno_dir = 1; is1%beg = is1%beg + weno_polyn
3346-
is1%end = is1%end - weno_polyn
3347-
3348-
elseif (norm_dir == 2) then
3349-
is1 = iy; is2 = ix; is3 = iz
3350-
weno_dir = 2; is1%beg = is1%beg + weno_polyn
3351-
is1%end = is1%end - weno_polyn
3352-
3353-
else
3354-
is1 = iz; is2 = iy; is3 = ix
3355-
weno_dir = 3; is1%beg = is1%beg + weno_polyn
3356-
is1%end = is1%end - weno_polyn
3357-
3358-
end if
3359-
3360-
!$acc update device(is1, is2, is3, iv)
3361-
3362-
if (n > 0) then
3363-
if (p > 0) then
3364-
3365-
call s_weno_alt(v_vf(iv%beg:iv%end), &
3366-
vL_x_flat(:, :, :, iv%beg:iv%end), vL_y_flat(:, :, :, iv%beg:iv%end), vL_z_flat(:, :, :, iv%beg:iv%end), vR_x_flat(:, :, :, iv%beg:iv%end), vR_y_flat(:, :, :, iv%beg:iv%end), vR_z_flat(:, :, :, iv%beg:iv%end), &
3367-
norm_dir, weno_dir, &
3368-
is1, is2, is3)
3369-
else
3370-
call s_weno_alt(v_vf(iv%beg:iv%end), &
3371-
vL_x_flat(:, :, :, iv%beg:iv%end), vL_y_flat(:, :, :, iv%beg:iv%end), vL_z_flat(:, :, :, :), vR_x_flat(:, :, :, iv%beg:iv%end), vR_y_flat(:, :, :, iv%beg:iv%end), vR_z_flat(:, :, :, :), &
3372-
norm_dir, weno_dir, &
3373-
is1, is2, is3)
3374-
end if
3375-
else
3376-
3377-
call s_weno_alt(v_vf(iv%beg:iv%end), &
3378-
vL_x_flat(:, :, :, iv%beg:iv%end), vL_y_flat(:, :, :, :), vL_z_flat(:, :, :, :), vR_x_flat(:, :, :, iv%beg:iv%end), vR_y_flat(:, :, :, :), vR_z_flat(:, :, :, :), &
3379-
norm_dir, weno_dir, &
3380-
is1, is2, is3)
3381-
end if
3382-
3383-
if (any(Re_size > 0)) then
3384-
if (weno_Re_flux) then
3385-
if (norm_dir == 2) then
3386-
!$acc parallel loop collapse(4) gang vector default(present)
3387-
do i = iv%beg, iv%end
3388-
do l = is3%beg, is3%end
3389-
do j = is1%beg, is1%end
3390-
do k = is2%beg, is2%end
3391-
vL_prim_vf(i)%sf(k, j, l) = vL_y_flat(j, k, l, i)
3392-
vR_prim_vf(i)%sf(k, j, l) = vR_y_flat(j, k, l, i)
3393-
end do
3394-
end do
3395-
end do
3396-
end do
3397-
elseif (norm_dir == 3) then
3398-
!$acc parallel loop collapse(4) gang vector default(present)
3399-
do i = iv%beg, iv%end
3400-
do j = is1%beg, is1%end
3401-
do k = is2%beg, is2%end
3402-
do l = is3%beg, is3%end
3403-
vL_prim_vf(i)%sf(l, k, j) = vL_z_flat(j, k, l, i)
3404-
vR_prim_vf(i)%sf(l, k, j) = vR_z_flat(j, k, l, i)
3405-
end do
3406-
end do
3407-
end do
3408-
end do
3409-
elseif (norm_dir == 1) then
3410-
!$acc parallel loop collapse(4) gang vector default(present)
3411-
do i = iv%beg, iv%end
3412-
do l = is3%beg, is3%end
3413-
do k = is2%beg, is2%end
3414-
do j = is1%beg, is1%end
3415-
vL_prim_vf(i)%sf(j, k, l) = vL_x_flat(j, k, l, i)
3416-
vR_prim_vf(i)%sf(j, k, l) = vR_x_flat(j, k, l, i)
3417-
end do
3418-
end do
3419-
end do
3420-
end do
3421-
end if
3422-
end if
3423-
end if
3424-
3425-
! ==================================================================
3426-
3427-
end subroutine s_reconstruct_cell_boundary_values_visc ! --------------------
3428-
34293338
subroutine s_reconstruct_cell_boundary_values_visc_deriv(v_vf, vL_x_flat, vL_y_flat, vL_z_flat, vR_x_flat, vR_y_flat, vR_z_flat, & ! -
34303339
norm_dir, vL_prim_vf, vR_prim_vf)
34313340

0 commit comments

Comments
 (0)