Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some nse_test cleaning #2653

Merged
merged 6 commits into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Exec/reacting_tests/nse_test/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ USE_MPI = TRUE

USE_REACT = TRUE

USE_SIMPLIFIED_SDC := TRUE

CASTRO_HOME ?= ../../..

Expand Down
11 changes: 7 additions & 4 deletions Exec/reacting_tests/nse_test/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nse_test
# `nse_test`

This is a simple test problem designed to explore how well hydro and
reactions are coupled when a system enters NSE.
Expand All @@ -7,7 +7,10 @@ This version is based on ``reacting_convergence`` (which is in turn
based on ``acoustic_pulse_general``), but using the ``aprox19``
network with the NSE table enabled.

You can run the Strang convergence test with the script convergence_strang.sh
You can run the simplified-SDC convergence test with the script
`convergence_simplified_sdc_w_vel.sh`

The script `create_pretty_tables.py` will take the 2 (or 3) output
files and make a single LaTeX-formatted table of the results. Use
the `--simple` argument to format in plaintext.

The script create_pretty_tables.py will take the 2 output files and
make a single LaTeX-formatted table of the results.
10 changes: 5 additions & 5 deletions Exec/reacting_tests/nse_test/convergence_simplified_sdc_w_vel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ problem.u0=1.e8
problem.v0=1.e8
"

mpiexec -n 8 ${EXEC} inputs.32 ${RUNPARAMS} >& /dev/null
mpiexec -n 8 ${EXEC} inputs.64 ${RUNPARAMS} >& /dev/null
mpiexec -n 8 ${EXEC} inputs.128 ${RUNPARAMS} >& /dev/null
mpiexec -n 8 ${EXEC} inputs.32 ${RUNPARAMS} >& 32.out
mpiexec -n 8 ${EXEC} inputs.64 ${RUNPARAMS} >& 64.out
mpiexec -n 8 ${EXEC} inputs.128 ${RUNPARAMS} >& 128.out

RichardsonConvergenceTest2d.gnu.ex coarFile=nse_test_32_plt00080 mediFile=nse_test_64_plt00160 fineFile=nse_test_128_plt00320 >& nse_convergence_simple_sdc_vlo.out

mpiexec -n 8 ${EXEC} inputs.256 ${RUNPARAMS} >& /dev/null
mpiexec -n 8 ${EXEC} inputs.256 ${RUNPARAMS} >& 256.out

RichardsonConvergenceTest2d.gnu.ex coarFile=nse_test_64_plt00160 mediFile=nse_test_128_plt00320 fineFile=nse_test_256_plt00640 >& nse_convergence_simple_sdc_lo.out

mpiexec -n 8 ${EXEC} inputs.512 ${RUNPARAMS} >& /dev/null
mpiexec -n 8 ${EXEC} inputs.512 ${RUNPARAMS} >& 512.out

RichardsonConvergenceTest2d.gnu.ex coarFile=nse_test_128_plt00320 mediFile=nse_test_256_plt00640 fineFile=nse_test_512_plt01280 >& nse_convergence_simple_sdc_hi.out

Expand Down
9 changes: 4 additions & 5 deletions Exec/reacting_tests/nse_test/problem_initialize_state_data.H
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ void problem_initialize_state_data (int i, int j, int k,
Array4<Real> const& state,
const GeometryData& geomdata)
{
int coord_type = geomdata.Coord();

const Real* dx = geomdata.CellSize();
const Real* problo = geomdata.ProbLo();
Expand Down Expand Up @@ -101,11 +100,11 @@ void problem_initialize_state_data (int i, int j, int k,
// since the species are interpolated, normalize them

Real sumX = 0.0_rt;
for (int n = 0; n < NumSpec; n++) {
sumX += burn_state.xn[n];
for (auto X : burn_state.xn) {
sumX += X;
}
for (int n = 0; n < NumSpec; n++) {
burn_state.xn[n] /= sumX;
for (auto & X : burn_state.xn) {
X /= sumX;
}

#ifdef NSE_NET
Expand Down