Skip to content

Commit 33d829e

Browse files
committed
weno7z works
1 parent e9da442 commit 33d829e

File tree

10 files changed

+353
-15
lines changed

10 files changed

+353
-15
lines changed

case/weno7_test/case.py

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#!/usr/bin/env python3
2+
3+
import json
4+
5+
# Configuring case dictionary
6+
print(json.dumps({
7+
# Logistics ================================================================
8+
'run_time_info' : 'T',
9+
# ==========================================================================
10+
11+
# Computational Domain Parameters ==========================================
12+
'x_domain%beg' : 0.E+00,
13+
'x_domain%end' : 1.E+00,
14+
'm' : 36,
15+
'n' : 0,
16+
'p' : 0,
17+
'dt' : 0.003,
18+
't_step_start' : 0,
19+
't_step_stop' : 50,
20+
't_step_save' : 1,
21+
# ==========================================================================
22+
23+
# Simulation Algorithm Parameters ==========================================
24+
'num_patches' : 2,
25+
'model_eqns' : 2,
26+
'alt_soundspeed' : 'F',
27+
'num_fluids' : 1,
28+
'mpp_lim' : 'F',
29+
'mixture_err' : 'F',
30+
'time_stepper' : 1,
31+
'weno_order' : 7,
32+
'weno_eps' : 1.E-40,
33+
'wenoz' : 'T',
34+
'null_weights' : 'F',
35+
'mp_weno' : 'F',
36+
'riemann_solver' : 2,
37+
'wave_speeds' : 1,
38+
'avg_state' : 2,
39+
'bc_x%beg' : -3,
40+
'bc_x%end' : -3,
41+
# ==========================================================================
42+
43+
# Formatted Database Files Structure Parameters ============================
44+
'format' : 2,
45+
'precision' : 2,
46+
'prim_vars_wrt' :'T',
47+
'rho_wrt' :'T',
48+
'parallel_io' :'F',
49+
# ==========================================================================
50+
51+
# Patch 1 L ================================================================
52+
'patch_icpp(1)%geometry' : 1,
53+
'patch_icpp(1)%x_centroid' : 0.25,
54+
'patch_icpp(1)%length_x' : 0.5,
55+
'patch_icpp(1)%vel(1)' : 0.698,
56+
'patch_icpp(1)%pres' : 3.528,
57+
'patch_icpp(1)%alpha_rho(1)' : 0.445E+00,
58+
'patch_icpp(1)%alpha(1)' : 1.,
59+
# ==========================================================================
60+
61+
# Patch 2 R ================================================================
62+
'patch_icpp(2)%geometry' : 1,
63+
'patch_icpp(2)%x_centroid' : 0.75,
64+
'patch_icpp(2)%length_x' : 0.5,
65+
'patch_icpp(2)%vel(1)' : 0.0,
66+
'patch_icpp(2)%pres' : 0.571,
67+
'patch_icpp(2)%alpha_rho(1)' : 0.5E+00,
68+
'patch_icpp(2)%alpha(1)' : 1.,
69+
# ==========================================================================
70+
71+
# Fluids Physical Parameters ===============================================
72+
'fluid_pp(1)%gamma' : 1.E+00/(1.4-1.E+00),
73+
'fluid_pp(1)%pi_inf' : 0.0,
74+
# ==========================================================================
75+
}))
76+
77+
# ==============================================================================

src/common/m_checker_common.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ contains
194194
!> Checks constraints regarding WENO order.
195195
!! Called by s_check_inputs_common for all three stages
196196
subroutine s_check_inputs_weno
197-
@:PROHIBIT(all(weno_order /= (/1, 3, 5/)), "weno_order must be 1, 3, or 5")
197+
@:PROHIBIT(all(weno_order /= (/1, 3, 5, 7/)), "weno_order must be 1, 3, or 5")
198198
@:PROHIBIT(m + 1 < weno_order, "m must be at least weno_order - 1")
199199
@:PROHIBIT(n > 0 .and. n + 1 < weno_order, "n must be at least weno_order - 1")
200200
@:PROHIBIT(p > 0 .and. p + 1 < weno_order, "p must be at least weno_order - 1")

src/simulation/m_cbc.fpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,8 @@ contains
713713
! ==================================================================
714714

715715
! PI4 of flux_rs_vf and flux_src_rs_vf at j = 1/2, 3/2 =============
716-
elseif (weno_order == 5) then
716+
! elseif (weno_order == 5) then
717+
else
717718
call s_convert_primitive_to_flux_variables(q_prim_rs${XYZ}$_vf, &
718719
F_rs${XYZ}$_vf, &
719720
F_src_rs${XYZ}$_vf, &

src/simulation/m_global_parameters.fpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ module m_global_parameters
137137
#:else
138138
integer :: weno_polyn !< Degree of the WENO polynomials (polyn)
139139
integer :: weno_order !< Order of the WENO reconstruction
140+
integer :: weno_num_stencils !< Number of stencils for WENO reconstruction (only different weno_polyn for TENO(>5))
141+
integer :: weno_dvd_ubound !< Upper limit for dvd used in s_compute_weno_coefficients
142+
140143
integer :: num_fluids !< number of fluids in the simulation
141144
logical :: wenojs !< WENO-JS (default)
142145
logical :: mapped_weno !< WENO-M (WENO with mapping of nonlinear weights)
@@ -708,6 +711,13 @@ contains
708711
#:if not MFC_CASE_OPTIMIZATION
709712
! Determining the degree of the WENO polynomials
710713
weno_polyn = (weno_order - 1)/2
714+
if (teno) then
715+
weno_num_stencils = weno_order - 3
716+
weno_dvd_ubound = weno_order
717+
else
718+
weno_num_stencils = weno_polyn
719+
weno_dvd_ubound = weno_polyn - 1
720+
end if
711721
!$acc update device(weno_polyn)
712722
!$acc update device(nb)
713723
!$acc update device(num_dims, num_fluids)

src/simulation/m_rhs.fpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,7 @@ contains
942942
flux_src_n(id)%vf, &
943943
flux_gsrc_n(id)%vf, &
944944
id, ix, iy, iz)
945+
print *, 'DEBUG riemann_solver completed'
945946
call nvtxEndRange
946947

947948
! Additional physics and source terms ==============================
@@ -2154,8 +2155,12 @@ contains
21542155
integer :: weno_dir !< Coordinate direction of the WENO reconstruction
21552156

21562157
integer :: i, j, k, l
2158+
2159+
integer :: ii
21572160
! Reconstruction in s1-direction ===================================
21582161

2162+
print *, 'DEBUG m_rhs s_reconstruct_cell_boundary_values started'
2163+
21592164
if (norm_dir == 1) then
21602165
is1 = ix; is2 = iy; is3 = iz
21612166
weno_dir = 1; is1%beg = is1%beg + weno_polyn
@@ -2194,6 +2199,8 @@ contains
21942199
is1, is2, is3)
21952200
end if
21962201

2202+
print *, 'DEBUG m_rhs s_reconstruct_cell_boundary_values ended'
2203+
21972204
! ==================================================================
21982205
end subroutine s_reconstruct_cell_boundary_values
21992206

src/simulation/m_riemann_solvers.fpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ module m_riemann_solvers
266266

267267
contains
268268

269+
! DEBUG: 1D_test_WENO7 is using this
269270
subroutine s_hll_riemann_solver(qL_prim_rsx_vf, qL_prim_rsy_vf, qL_prim_rsz_vf, dqL_prim_dx_vf, & ! -------
270271
dqL_prim_dy_vf, &
271272
dqL_prim_dz_vf, &

src/simulation/m_start_up.fpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,6 +1156,8 @@ contains
11561156
call s_2nd_order_tvd_rk(t_step, time_avg)
11571157
elseif (time_stepper == 3 .and. (.not. adap_dt)) then
11581158
call s_3rd_order_tvd_rk(t_step, time_avg)
1159+
! print *, 'DEBUG RK3 completed'
1160+
! call exit(33)
11591161
elseif (time_stepper == 3 .and. adap_dt) then
11601162
call s_strang_splitting(t_step, time_avg)
11611163
end if

src/simulation/m_time_steppers.fpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,10 +630,14 @@ contains
630630
end if
631631

632632
call s_compute_rhs(q_cons_ts(1)%vf, q_prim_vf, rhs_vf, pb_ts(1)%sf, rhs_pb, mv_ts(1)%sf, rhs_mv, t_step, time_avg)
633+
print *, 'DEBUG RK3 step 1 compute_rhs completed'
633634

634-
if (run_time_info) then
635+
! if (run_time_info) then
636+
if (.true.) then ! DEBUG ALWAYS WRITE RUN_TIME INFO
635637
call s_write_run_time_information(q_prim_vf, t_step)
636638
end if
639+
print *, 'DEBUG RK3 step 1 write run_time_information completed'
640+
! call exit(66)
637641

638642
if (probe_wrt) then
639643
call s_time_step_cycling(t_step)

src/simulation/m_viscous.fpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -997,6 +997,8 @@ contains
997997

998998
! Reconstruction in s1-direction ===================================
999999

1000+
print *, 'DEBUG m_rhs s_reconstruct_cell_boundary_values_visc started'
1001+
10001002
if (norm_dir == 1) then
10011003
is1_viscous = ix; is2_viscous = iy; is3_viscous = iz
10021004
weno_dir = 1; is1_viscous%beg = is1_viscous%beg + weno_polyn

0 commit comments

Comments
 (0)