Skip to content

Commit

Permalink
Initial merge attempt
Browse files Browse the repository at this point in the history
Existing code works, IGR NaNs after 1 time step for the 2D_riemann_test example case
  • Loading branch information
wilfonba committed Jan 3, 2025
1 parent bae121f commit fcf06db
Show file tree
Hide file tree
Showing 9 changed files with 2,576 additions and 425 deletions.
1 change: 1 addition & 0 deletions src/common/m_constants.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module m_constants
integer, parameter :: num_patches_max = 10
integer, parameter :: pathlen_max = 400
integer, parameter :: nnode = 4 !< Number of QBMM nodes
integer, parameter :: num_igr_iters = 1
real(wp), parameter :: capillary_cutoff = 1e-6 !< color function gradient magnitude at which to apply the surface tension fluxes
real(wp), parameter :: acoustic_spatial_support_width = 2.5_wp !< Spatial support width of acoustic source, used in s_source_spatial
real(wp), parameter :: dflt_vcfl_dt = 100._wp !< value of vcfl_dt when viscosity is off for computing adaptive timestep size
Expand Down
2 changes: 1 addition & 1 deletion src/simulation/m_checker.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ contains
if (.not. cfl_dt) then
@:PROHIBIT(dt <= 0)
end if
@:PROHIBIT(time_stepper < 1 .or. time_stepper > 5)
!@:PROHIBIT(time_stepper < 1 .or. time_stepper > 5)
end subroutine s_check_inputs_time_stepping

!> Checks constraints on parameters related to 6-equation model
Expand Down
21 changes: 15 additions & 6 deletions src/simulation/m_global_parameters.fpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ module m_global_parameters
#:if MFC_CASE_OPTIMIZATION
integer, parameter :: weno_polyn = ${weno_polyn}$ !< Degree of the WENO polynomials (polyn)
integer, parameter :: weno_order = ${weno_order}$ !< Order of the WENO reconstruction
integer, parameter :: igr_order !< Order of the IGR reconstructions
integer, parameter :: weno_num_stencils = ${weno_num_stencils}$ !< Number of stencils for WENO reconstruction (only different from weno_polyn for TENO(>5))
integer, parameter :: num_fluids = ${num_fluids}$ !< number of fluids in the simulation
logical, parameter :: wenojs = (${wenojs}$ /= 0) !< WENO-JS (default)
Expand All @@ -120,6 +121,7 @@ module m_global_parameters
#:else
integer :: weno_polyn !< Degree of the WENO polynomials (polyn)
integer :: weno_order !< Order of the WENO reconstruction
integer :: igr_order !< Order of the IGR reconstructions
integer :: weno_num_stencils !< Number of stencils for WENO reconstruction (only different from weno_polyn for TENO(>5))
integer :: num_fluids !< number of fluids in the simulation
logical :: wenojs !< WENO-JS (default)
Expand Down Expand Up @@ -150,8 +152,9 @@ module m_global_parameters
logical :: viscous !< Viscous effects
logical :: shear_stress !< Shear stresses
logical :: bulk_stress !< Bulk stresses
logical :: igr !< Use information geometric regularization

!$acc declare create(chemistry)
!$acc declare create(chemistry, igr)

logical :: bodyForces
logical :: bf_x, bf_y, bf_z !< body force toggle in three directions
Expand All @@ -167,7 +170,7 @@ module m_global_parameters
integer :: cpu_start, cpu_end, cpu_rate

#:if not MFC_CASE_OPTIMIZATION
!$acc declare create(num_dims, weno_polyn, weno_order, weno_num_stencils, num_fluids, wenojs, mapped_weno, wenoz, teno, wenoz_q)
!$acc declare create(num_dims, weno_polyn, weno_order, igr_order, weno_num_stencils, num_fluids, wenojs, mapped_weno, wenoz, teno, wenoz_q)
#:endif

!$acc declare create(mpp_lim, model_eqns, mixture_err, alt_soundspeed, avg_state, mp_weno, weno_eps, teno_CT, hypoelasticity, hyperelasticity, hyper_model, elasticity, low_Mach, viscous, shear_stress, bulk_stress)
Expand Down Expand Up @@ -537,6 +540,7 @@ contains
viscous = .false.
shear_stress = .false.
bulk_stress = .false.
igr = .false.
#:if not MFC_CASE_OPTIMIZATION
mapped_weno = .false.
Expand Down Expand Up @@ -602,6 +606,7 @@ contains
#:if not MFC_CASE_OPTIMIZATION
nb = 1
weno_order = dflt_int
igr_order = dflt_int
num_fluids = dflt_int
#:endif
Expand Down Expand Up @@ -1110,15 +1115,19 @@ contains
!buff_size = buff_size + fd_number
end if
if (probe_wrt) then
fd_number = max(1, fd_order/2)
end if
! Correction for smearing function in the lagrangian subgrid bubble model
if (bubbles_lagrange) then
buff_size = max(buff_size, 6)
end if
if (igr) then
buff_size = max(4,(igr_order - 1)/2)
end if
if (probe_wrt) then
fd_number = max(1, fd_order/2)
end if
! Configuring Coordinate Direction Indexes
idwint(1)%beg = 0; idwint(2)%beg = 0; idwint(3)%beg = 0
idwint(1)%end = m; idwint(2)%end = n; idwint(3)%end = p
Expand Down
Loading

0 comments on commit fcf06db

Please sign in to comment.