Skip to content

Commit e8a47a9

Browse files
DimAdam-01Dimitrios Adam
andauthored
Reduce multiple Weno Recon. (#1005)
Co-authored-by: Dimitrios Adam <[email protected]>
1 parent eb61616 commit e8a47a9

File tree

1 file changed

+68
-27
lines changed

1 file changed

+68
-27
lines changed

src/simulation/m_rhs.fpp

Lines changed: 68 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -762,34 +762,75 @@ contains
762762
call nvtxStartRange("RHS-WENO")
763763

764764
if (.not. surface_tension) then
765-
! Reconstruct densitiess
766-
iv%beg = 1; iv%end = sys_size
767-
call s_reconstruct_cell_boundary_values( &
768-
q_prim_qp%vf(1:sys_size), &
769-
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
770-
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
771-
id)
765+
if (all(Re_size == 0)) then
766+
! Reconstruct densitiess
767+
iv%beg = 1; iv%end = sys_size
768+
call s_reconstruct_cell_boundary_values( &
769+
q_prim_qp%vf(1:sys_size), &
770+
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
771+
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
772+
id)
773+
else
774+
iv%beg = 1; iv%end = contxe
775+
call s_reconstruct_cell_boundary_values( &
776+
q_prim_qp%vf(iv%beg:iv%end), &
777+
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
778+
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
779+
id)
780+
781+
iv%beg = E_idx; iv%end = sys_size
782+
call s_reconstruct_cell_boundary_values( &
783+
q_prim_qp%vf(iv%beg:iv%end), &
784+
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
785+
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
786+
id)
787+
end if
788+
772789
else
773-
iv%beg = 1; iv%end = E_idx - 1
774-
call s_reconstruct_cell_boundary_values( &
775-
q_prim_qp%vf(iv%beg:iv%end), &
776-
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
777-
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
778-
id)
779-
780-
iv%beg = E_idx; iv%end = E_idx
781-
call s_reconstruct_cell_boundary_values_first_order( &
782-
q_prim_qp%vf(E_idx), &
783-
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
784-
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
785-
id)
786-
787-
iv%beg = E_idx + 1; iv%end = sys_size
788-
call s_reconstruct_cell_boundary_values( &
789-
q_prim_qp%vf(iv%beg:iv%end), &
790-
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
791-
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
792-
id)
790+
if (all(Re_size == 0)) then
791+
iv%beg = 1; iv%end = E_idx - 1
792+
call s_reconstruct_cell_boundary_values( &
793+
q_prim_qp%vf(iv%beg:iv%end), &
794+
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
795+
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
796+
id)
797+
798+
iv%beg = E_idx; iv%end = E_idx
799+
call s_reconstruct_cell_boundary_values_first_order( &
800+
q_prim_qp%vf(E_idx), &
801+
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
802+
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
803+
id)
804+
805+
iv%beg = E_idx + 1; iv%end = sys_size
806+
call s_reconstruct_cell_boundary_values( &
807+
q_prim_qp%vf(iv%beg:iv%end), &
808+
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
809+
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
810+
id)
811+
else
812+
iv%beg = 1; iv%end = contxe
813+
call s_reconstruct_cell_boundary_values( &
814+
q_prim_qp%vf(iv%beg:iv%end), &
815+
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
816+
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
817+
id)
818+
819+
iv%beg = E_idx; iv%end = E_idx
820+
call s_reconstruct_cell_boundary_values_first_order( &
821+
q_prim_qp%vf(E_idx), &
822+
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
823+
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
824+
id)
825+
826+
iv%beg = E_idx + 1; iv%end = sys_size
827+
call s_reconstruct_cell_boundary_values( &
828+
q_prim_qp%vf(iv%beg:iv%end), &
829+
qL_rsx_vf, qL_rsy_vf, qL_rsz_vf, &
830+
qR_rsx_vf, qR_rsy_vf, qR_rsz_vf, &
831+
id)
832+
end if
833+
793834
end if
794835

795836
! Reconstruct viscous derivatives for viscosity

0 commit comments

Comments
 (0)