Skip to content

Commit 183cab3

Browse files
committed
src: retire legacy WENO_TYPE and MUSCL_TYPE constants
1 parent eab72cf commit 183cab3

7 files changed

Lines changed: 15 additions & 16 deletions

File tree

src/common/m_constants.fpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,7 @@ module m_constants
5050
real(wp), parameter :: broadband_spectral_level_constant = 20._wp
5151
!> The spectral level constant to correct the magnitude at each frequency to ensure the source is overall broadband
5252
real(wp), parameter :: broadband_spectral_level_growth_rate = 10._wp
53-
! Reconstruction Types
54-
integer, parameter :: WENO_TYPE = 1 !< Using WENO for reconstruction type
55-
integer, parameter :: MUSCL_TYPE = 2 !< Using MUSCL for reconstruction type
56-
! Interface Compression
53+
! Reconstruction Types Interface Compression
5754
real(wp), parameter :: dflt_ic_eps = 1e-4_wp !< Ensure compression is only applied to surface cells in THINC
5855
real(wp), parameter :: dflt_ic_beta = 1.6_wp !< Sharpness parameter's default value used in THINC
5956
real(wp), parameter :: moncon_cutoff = 1e-8_wp !< Monotonicity constraint's limiter to prevent extremas in THINC

src/post_process/m_global_parameters.fpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ module m_global_parameters
1414
use m_derived_types
1515
use m_helper_basic
1616
use m_thermochem, only: num_species, species_names
17-
use m_constants, only: model_eqns_gamma_law, model_eqns_5eq, model_eqns_6eq, model_eqns_4eq, format_silo, precision_single
17+
use m_constants, only: model_eqns_gamma_law, model_eqns_5eq, model_eqns_6eq, model_eqns_4eq, format_silo, precision_single, &
18+
& recon_type_weno
1819

1920
implicit none
2021

@@ -186,7 +187,7 @@ contains
186187
! Simulation algorithm parameters
187188
model_eqns = dflt_int
188189
num_fluids = dflt_int
189-
recon_type = WENO_TYPE
190+
recon_type = recon_type_weno
190191
weno_order = dflt_int
191192
muscl_order = dflt_int
192193
mixture_err = .false.

src/pre_process/m_global_parameters.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ contains
161161
palpha_eps = dflt_real
162162
ptgalpha_eps = dflt_real
163163
num_fluids = dflt_int
164-
recon_type = WENO_TYPE
164+
recon_type = recon_type_weno
165165
weno_order = dflt_int
166166
igr = .false.
167167
igr_order = dflt_int

src/simulation/m_cbc.fpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ contains
350350
351351
! Computing CBC1 Coefficients
352352
#:for CBC_DIR, XYZ in [(1, 'x'), (2, 'y'), (3, 'z')]
353-
if (cbc_dir_in == ${CBC_DIR}$ .and. recon_type == WENO_TYPE) then
353+
if (cbc_dir_in == ${CBC_DIR}$ .and. recon_type == recon_type_weno) then
354354
if (weno_order == 1) then
355355
fd_coef_${XYZ}$ (:,cbc_loc_in) = 0._wp
356356
fd_coef_${XYZ}$ (0, cbc_loc_in) = -2._wp/(ds(0) + ds(1))
@@ -524,7 +524,7 @@ contains
524524
call s_associate_cbc_coefficients_pointers(cbc_dir, cbc_loc)
525525
526526
#:for CBC_DIR, XYZ in [(1, 'x'), (2, 'y'), (3, 'z')]
527-
if (cbc_dir == ${CBC_DIR}$ .and. recon_type == WENO_TYPE) then
527+
if (cbc_dir == ${CBC_DIR}$ .and. recon_type == recon_type_weno) then
528528
! PI2 of flux_rs_vf and flux_src_rs_vf at j = 1/2
529529
if (weno_order == 3) then
530530
call s_convert_primitive_to_flux_variables(q_prim_rs${XYZ}$_vf, F_rs${XYZ}$_vf, F_src_rs${XYZ}$_vf, is1, is2, &

src/simulation/m_global_parameters.fpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ contains
485485

486486
#:if not MFC_CASE_OPTIMIZATION
487487
nb = 1
488-
recon_type = WENO_TYPE
488+
recon_type = recon_type_weno
489489
weno_order = dflt_int
490490
muscl_order = dflt_int
491491
muscl_lim = dflt_int

src/simulation/m_rhs.fpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ module m_rhs
1414
use m_mpi_proxy
1515
use m_variables_conversion
1616
use m_weno
17-
use m_constants, only: riemann_solver_hll, riemann_solver_hlld, model_eqns_6eq, int_comp_mthinc
17+
use m_constants, only: riemann_solver_hll, riemann_solver_hlld, model_eqns_6eq, int_comp_mthinc, recon_type_weno, &
18+
& recon_type_muscl
1819
use m_muscl
1920
use m_riemann_solvers
2021
use m_cbc
@@ -1600,7 +1601,7 @@ contains
16001601
integer :: recon_dir !< Coordinate direction of the reconstruction
16011602
integer :: i, j, k, l
16021603
1603-
#:for SCHEME, TYPE in [('weno','WENO_TYPE'), ('muscl','MUSCL_TYPE')]
1604+
#:for SCHEME, TYPE in [('weno','recon_type_weno'), ('muscl','recon_type_muscl')]
16041605
if (recon_type == ${TYPE}$) then
16051606
! Reconstruction in s1-direction
16061607
if (norm_dir == 1) then
@@ -1635,7 +1636,7 @@ contains
16351636
integer :: i, j, k, l
16361637
! Reconstruction in s1-direction
16371638
1638-
#:for SCHEME, TYPE in [('weno','WENO_TYPE'), ('muscl', 'MUSCL_TYPE')]
1639+
#:for SCHEME, TYPE in [('weno','recon_type_weno'), ('muscl', 'recon_type_muscl')]
16391640
if (recon_type == ${TYPE}$) then
16401641
if (norm_dir == 1) then
16411642
is1 = idwbuff(1); is2 = idwbuff(2); is3 = idwbuff(3)

src/simulation/m_viscous.fpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module m_viscous
1313
use m_muscl
1414
use m_helper
1515
use m_finite_differences
16-
use m_constants, only: model_eqns_5eq
16+
use m_constants, only: model_eqns_5eq, recon_type_weno, recon_type_muscl
1717

1818
private; public s_get_viscous, s_compute_viscous_stress_cylindrical_boundary, s_initialize_viscous_module, &
1919
& s_reconstruct_cell_boundary_values_visc_deriv, s_finalize_viscous_module, s_compute_viscous_stress_tensor
@@ -857,7 +857,7 @@ contains
857857
integer :: recon_dir !< Coordinate direction of the WENO reconstruction
858858
integer :: i, j, k, l
859859

860-
#:for SCHEME, TYPE in [('weno','WENO_TYPE'), ('muscl','MUSCL_TYPE')]
860+
#:for SCHEME, TYPE in [('weno','recon_type_weno'), ('muscl','recon_type_muscl')]
861861
if (recon_type == ${TYPE}$) then
862862
! Reconstruction in s1-direction
863863

@@ -941,7 +941,7 @@ contains
941941
integer :: recon_dir !< Coordinate direction of the WENO reconstruction
942942
integer :: i, j, k, l
943943

944-
#:for SCHEME, TYPE in [('weno','WENO_TYPE'), ('muscl','MUSCL_TYPE')]
944+
#:for SCHEME, TYPE in [('weno','recon_type_weno'), ('muscl','recon_type_muscl')]
945945
if (recon_type == ${TYPE}$) then
946946
! Reconstruction in s1-direction
947947

0 commit comments

Comments
 (0)