Skip to content

Commit

Permalink
Make tests smaller but run more of them in CI (#300)
Browse files Browse the repository at this point in the history
* dont fillpatch react data in derives when not doing reactions

* remove extraneous file in flamesheet

* make flamesheet tests smaller

* peleLM uses amr.max_step not max_step

* update flowcontrol header name in TripleFlame case

* make tests smaller

* do more tests in CI

* fix no EB checkl for Efield

* add some mass conservation verification

* add EFIELD and EBBFS tests

* fix new tests

* fix unused variables

* more fixes for TripleFlame case

* remove commented code
  • Loading branch information
baperry2 authored Nov 2, 2023
1 parent 807fec6 commit 66d6d7f
Show file tree
Hide file tree
Showing 16 changed files with 228 additions and 131 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,63 @@ jobs:
run: |
mpirun -n 2 ./PeleLMeX3d.gnu.MPI.ex input.3d-regt amr.max_step=2 amr.plot_int=-1 amr.check_int=-1 amr.n_cell=128 32 32
# Build and Run the EB_BackwardStepFlame RegTest with GNU9.3 and MPI support
EBBFS:
name: [email protected] MPI Run [EBBFS]
runs-on: ubuntu-latest
env:
{CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code"}
steps:
- uses: actions/checkout@v3
- name: System Dependencies
run: .github/workflows/dependencies/dependencies_gcc10.sh
- name: Repo Dependencies
run: Utils/CloneDeps.sh
- name: Build
env:
AMREX_HOME: ${GITHUB_WORKSPACE}/build/amrex
PELE_PHYSICS_HOME: ${GITHUB_WORKSPACE}/build/PelePhysics
PELELMEX_HOME: ${GITHUB_WORKSPACE}
AMREX_HYDRO_HOME: ${GITHUB_WORKSPACE}/build/AMReX-Hydro
SUNDIALS_HOME : ${GITHUB_WORKSPACE}/build/sundials
working-directory: ./Exec/RegTests/EB_BackwardStepFlame/
run: |
make TPL COMP=gnu USE_MPI=TRUE
make -j 2 COMP=gnu USE_MPI=TRUE
- name: Run
working-directory: ./Exec/RegTests/EB_BackwardStepFlame/
run: |
mpirun -n 2 ./PeleLMeX2d.gnu.MPI.ex input.2d amr.max_step=2 amr.plot_int=-1 amr.check_int=-1
# Build and Run the Efield flamesheet with GNU9.3 and MPI support
EFIELD:
name: [email protected] MPI Run [EFIELD]
runs-on: ubuntu-latest
env:
{CXXFLAGS: "-Werror -Wshadow -Woverloaded-virtual -Wunreachable-code"}
steps:
- uses: actions/checkout@v3
- name: System Dependencies
run: .github/workflows/dependencies/dependencies_gcc10.sh
- name: Repo Dependencies
run: Utils/CloneDeps.sh
- name: Build
env:
AMREX_HOME: ${GITHUB_WORKSPACE}/build/amrex
PELE_PHYSICS_HOME: ${GITHUB_WORKSPACE}/build/PelePhysics
PELELMEX_HOME: ${GITHUB_WORKSPACE}
AMREX_HYDRO_HOME: ${GITHUB_WORKSPACE}/build/AMReX-Hydro
SUNDIALS_HOME : ${GITHUB_WORKSPACE}/build/sundials
working-directory: ./Exec/Efield/FlameSheetIons
run: |
make TPL COMP=gnu USE_MPI=TRUE
make -j 2 COMP=gnu USE_MPI=TRUE
- name: Run
working-directory: ./Exec/Efield/FlameSheetIons
run: |
mpirun -n 2 ./PeleLMeX2d.gnu.MPI.EF.ex input.2d-regt amr.max_step=2 amr.plot_int=-1 amr.check_int=-1
# Build and Run the TurbInflow RegTest in DEBUG with GNU9.3 and MPI support
TI3D:
name: [email protected] MPI Run [TI3DDBG]
Expand Down
2 changes: 1 addition & 1 deletion Exec/RegTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ add_subdirectory(HotBubble)
add_subdirectory(PeriodicCases)
#add_subdirectory(SprayTest)
add_subdirectory(TaylorGreen)
#add_subdirectory(TripleFlame)
add_subdirectory(TripleFlame)
if(PELELMEX_DIM GREATER 2)
add_subdirectory(TurbInflow)
endif()
Expand Down
8 changes: 4 additions & 4 deletions Exec/RegTests/EnclosedFlame/enclosedflame-2d.inp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ peleLM.hi_bc = NoSlipWallAdiab NoSlipWallAdiab


#-------------------------AMR CONTROL----------------------------
amr.n_cell = 128 128 32 # Level 0 number of cells in each direction
amr.n_cell = 128 128 8 # Level 0 number of cells in each direction
amr.v = 1 # AMR verbose
amr.max_level = 2 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 2 # refinement ratio
Expand Down Expand Up @@ -48,7 +48,7 @@ peleLM.do_mass_balance = 1
amr.check_int = 100
amr.plot_int = 100
amr.max_step = 10
amr.dt_shrink = 0.0001
amr.dt_shrink = 0.01
amr.stop_time = 1.0
#amr.stop_time = 1.00
amr.cfl = 0.15
Expand All @@ -59,8 +59,8 @@ peleLM.chem_integrator = "ReactorCvode"
peleLM.use_typ_vals_chem = 1 # Use species/temp typical values in CVODE
ode.rtol = 1.0e-6 # Relative tolerance of the chemical solve
ode.atol = 1.0e-5 # Absolute tolerance factor applied on typical values
cvode.solve_type = denseAJ_direct # CVODE Linear solve type (for Newton direction)
cvode.max_order = 4 # CVODE max BDF order.
cvode.solve_type = denseAJ_direct # CVODE Linear solve type (for Newton direction)
cvode.max_order = 4 # CVODE max BDF order.

#--------------------REFINEMENT CONTROL------------------------
#amr.refinement_indicators = temp
Expand Down
10 changes: 5 additions & 5 deletions Exec/RegTests/EnclosedFlame/enclosedflame-3d.inp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ peleLM.hi_bc = NoSlipWallAdiab NoSlipWallAdiab NoSlipWallAdiab


#-------------------------AMR CONTROL----------------------------
amr.n_cell = 128 128 128 # Level 0 number of cells in each direction
amr.n_cell = 32 32 32 # Level 0 number of cells in each direction
amr.v = 1 # AMR verbose
amr.max_level = 1 # maximum level number allowed
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 2 # refinement ratio
amr.regrid_int = 5 # how often to regrid
amr.n_error_buf = 2 2 2 2 # number of buffer cells in error est
Expand Down Expand Up @@ -47,7 +47,7 @@ peleLM.do_mass_balance = 1
amr.check_int = 5
amr.plot_int = 100
amr.max_step = 10
amr.dt_shrink = 0.0001
amr.dt_shrink = 0.01
amr.stop_time = 1.0
#amr.stop_time = 1.00
amr.cfl = 0.15
Expand All @@ -58,8 +58,8 @@ peleLM.chem_integrator = "ReactorCvode"
#peleLM.use_typ_vals_chem = 1 # Use species/temp typical values in CVODE
#ode.rtol = 1.0e-6 # Relative tolerance of the chemical solve
#ode.atol = 1.0e-5 # Absolute tolerance factor applied on typical values
cvode.solve_type = denseAJ_direct # CVODE Linear solve type (for Newton direction)
cvode.max_order = 4 # CVODE max BDF order.
cvode.solve_type = denseAJ_direct # CVODE Linear solve type (for Newton direction)
cvode.max_order = 4 # CVODE max BDF order.

#--------------------REFINEMENT CONTROL------------------------
#amr.refinement_indicators = temp
Expand Down
8 changes: 4 additions & 4 deletions Exec/RegTests/FlameSheet/flamesheet-drm19-2d.inp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
geometry.is_periodic = 1 0 # For each dir, 0: non-perio, 1: periodic
geometry.coord_sys = 0 # 0 => cart, 1 => RZ
geometry.prob_lo = 0.0 0.0 0.0 # x_lo y_lo (z_lo)
geometry.prob_hi = 0.016 0.032 0.016 # x_hi y_hi (z_hi)
geometry.prob_hi = 0.008 0.032 0.008 # x_hi y_hi (z_hi)

#---------------------- BC FLAGS ---------------------------------
# Interior, Inflow, Outflow, Symmetry,
Expand All @@ -12,13 +12,13 @@ peleLM.hi_bc = Interior Outflow # bc in x_hi y_hi (z_hi)


#---------------------- AMR CONTROL ------------------------------
amr.n_cell = 32 64 32 # Level 0 number of cells in each direction
amr.n_cell = 16 64 16 # Level 0 number of cells in each direction
amr.max_level = 2 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 5 # how often to regrid
amr.n_error_buf = 1 1 2 2 # number of buffer cells in error est
amr.grid_eff = 0.7 # what constitutes an efficient grid
amr.blocking_factor = 16 # block factor in grid generation (min box size)
amr.blocking_factor = 8 # block factor in grid generation (min box size)
amr.max_grid_size = 256 # max box size

#---------------------- Problem ----------------------------------
Expand All @@ -29,7 +29,7 @@ prob.pertlength = 0.016
pmf.datafile = "drm19_pmf.dat"

#---------------------- PeleLMeX CONTROL -------------------------
peleLM.v = 1 # PeleLMeX version
peleLM.v = 1 # PeleLMeX verbose
peleLM.use_wbar = 1 # Include Wbar term in species diffusion fluxes
peleLM.sdc_iterMax = 2 # Number of SDC iterations
peleLM.num_init_iter = 3 # Number of initial iterations
Expand Down
6 changes: 3 additions & 3 deletions Exec/RegTests/FlameSheet/flamesheet-drm19-3d.inp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
geometry.is_periodic = 1 1 0 # For each dir, 0: non-perio, 1: periodic
geometry.coord_sys = 0 # 0 => cart, 1 => RZ
geometry.prob_lo = 0.0 0.0 0.0 # x_lo y_lo (z_lo)
geometry.prob_hi = 0.016 0.016 0.032 # x_hi y_hi (z_hi)
geometry.prob_hi = 0.008 0.008 0.032 # x_hi y_hi (z_hi)

# >>>>>>>>>>>>> BC FLAGS <<<<<<<<<<<<<<<<
# Interior, Inflow, Outflow, Symmetry,
Expand All @@ -11,14 +11,14 @@ peleLM.lo_bc = Interior Interior Inflow
peleLM.hi_bc = Interior Interior Outflow

#-------------------------AMR CONTROL----------------------------
amr.n_cell = 32 32 64 # Level 0 number of cells in each direction
amr.n_cell = 16 16 64 # Level 0 number of cells in each direction
amr.v = 1 # AMR verbose
amr.max_level = 1 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 5 # how often to regrid
amr.n_error_buf = 1 1 2 2 # number of buffer cells in error est
amr.grid_eff = 0.7 # what constitutes an efficient grid
amr.blocking_factor = 16 # block factor in grid generation (min box size)
amr.blocking_factor = 8 # block factor in grid generation (min box size)
amr.max_grid_size = 64 # max box size


Expand Down
71 changes: 0 additions & 71 deletions Exec/RegTests/FlameSheet/input

This file was deleted.

15 changes: 7 additions & 8 deletions Exec/RegTests/HotBubble/hotbubble-3d.inp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ peleLM.hi_bc = SlipWallAdiab Outflow SlipWallAdiab


#-------------------------AMR CONTROL----------------------------
amr.n_cell = 32 64 32 # Level 0 number of cells in each direction
amr.n_cell = 64 128 64 # Level 0 number of cells in each direction
amr.n_cell = 16 32 16 # Level 0 number of cells in each direction
amr.v = 1 # AMR verbose
amr.max_level = 1 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
Expand Down Expand Up @@ -51,14 +50,14 @@ amr.stop_time = 0.07
amr.cfl = 0.5
amr.derive_plot_vars = avg_pressure mag_vort mass_fractions

cvode.solve_type = dense # CVODE Linear solve type (for Newton direction)
ode.analytical_jacobian = 0 # Provide analytical jacobian (from Fuego)
cvode.solve_type = dense # CVODE Linear solve type (for Newton direction)
ode.analytical_jacobian = 0 # Provide analytical jacobian (from Fuego)

#------------ INPUTS TO CONSTANT TRANSPORT -----------------
transport.const_viscosity = 0.0
transport.const_bulk_viscosity = 0.0
transport.const_conductivity = 0.0
transport.const_diffusivity = 0.0
transport.const_viscosity = 0.0
transport.const_bulk_viscosity = 0.0
transport.const_conductivity = 0.0
transport.const_diffusivity = 0.0

#--------------------REFINEMENT CONTROL------------------------
#amr.refinement_indicators = temp
Expand Down
12 changes: 6 additions & 6 deletions Exec/RegTests/PeriodicCases/covo-3d.inp
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ peleLM.hi_bc = Interior Interior Interior


#-------------------------AMR CONTROL----------------------------
amr.n_cell = 64 64 64 # Level 0 number of cells in each direction
amr.n_cell = 16 16 16 # Level 0 number of cells in each direction
amr.v = 1 # AMR verbose
amr.max_level = 0 # maximum level number allowed
amr.ref_ratio = 2 2 2 2 # refinement ratio
amr.regrid_int = 2 # how often to regrid
amr.n_error_buf = 1 1 2 2 # number of buffer cells in error est
amr.grid_eff = 0.7 # what constitutes an efficient grid
amr.blocking_factor = 16 # block factor in grid generation (min box size)
amr.blocking_factor = 8 # block factor in grid generation (min box size)
amr.max_grid_size = 64 # max box size


Expand All @@ -32,10 +32,10 @@ prob.rvort = 0.07
prob.forcevort = 6.0

#------------ INPUTS TO CONSTANT TRANSPORT -----------------
transport.const_viscosity = 0.0
transport.const_bulk_viscosity = 0.0
transport.const_conductivity = 0.0
transport.const_diffusivity = 0.0
transport.const_viscosity = 0.0
transport.const_bulk_viscosity = 0.0
transport.const_conductivity = 0.0
transport.const_diffusivity = 0.0

#-------------------------PeleLM CONTROL----------------------------
peleLM.v = 1
Expand Down
23 changes: 9 additions & 14 deletions Exec/RegTests/TripleFlame/pelelmex_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <AMReX_FArrayBox.H>
#include <AMReX_SPACE.H>

AMREX_GPU_DEVICE
AMREX_GPU_HOST_DEVICE
AMREX_FORCE_INLINE
void
set_Y_from_Phi(
Expand All @@ -29,7 +29,7 @@ set_Y_from_Phi(
eos.X2Y(Xt, Y);
}

AMREX_GPU_DEVICE
AMREX_GPU_HOST_DEVICE
AMREX_FORCE_INLINE
void
set_Y_from_Ksi(
Expand All @@ -53,18 +53,13 @@ pelelmex_initdata(
amrex::Array4<amrex::Real> const& /*aux*/,
amrex::GeometryData const& geomdata,
ProbParm const& prob_parm,
pele::physics::PMF::PmfData::DataContainer const* pmf_data)
pele::physics::PMF::PmfData::DataContainer const* /*pmf_data*/)
{
const amrex::Real* prob_lo = geomdata.ProbLo();
const amrex::Real* prob_hi = geomdata.ProbHi();
const amrex::Real* dx = geomdata.CellSize();

AMREX_D_TERM(const amrex::Real x = prob_lo[0] + (i + 0.5) * dx[0];
, const amrex::Real y = prob_lo[1] + (j + 0.5) * dx[1];
, const amrex::Real z = prob_lo[2] + (k + 0.5) * dx[2];);

AMREX_D_TERM(, const amrex::Real L_x = prob_hi[0] - prob_lo[0];
, const amrex::Real L_y = prob_hi[1] - prob_lo[1]);
const amrex::Real x = prob_lo[0] + (i + 0.5) * dx[0];
const amrex::Real y = prob_lo[1] + (j + 0.5) * dx[1];

auto eos = pele::physics::PhysicsType::eos();
amrex::Real massfrac[NUM_SPECIES] = {0.0};
Expand Down Expand Up @@ -128,19 +123,19 @@ bcnormal(
const amrex::Real x[AMREX_SPACEDIM],
const int /*m_nAux*/,
amrex::Real s_ext[NVAR],
const int idir,
const int /*idir*/,
const int sgn,
const amrex::Real time,
amrex::GeometryData const& geomdata,
amrex::GeometryData const& /*geomdata*/,
ProbParm const& prob_parm,
pele::physics::PMF::PmfData::DataContainer const* pmf_data)
pele::physics::PMF::PmfData::DataContainer const* /*pmf_data*/)
{
auto eos = pele::physics::PhysicsType::eos();
amrex::Real massfrac[NUM_SPECIES] = {0.0};

if (sgn == 1) {

if ((prob_parm.FCData.ctrl_active == 0u) || time <= 0.0) {
if ((prob_parm.FCData.ctrl_active == 0U) || time <= 0.0) {
s_ext[VELX] = 0.0;
#if (AMREX_SPACEDIM == 2)
s_ext[VELY] = prob_parm.V_in;
Expand Down
Loading

0 comments on commit 66d6d7f

Please sign in to comment.