Skip to content

Commit

Permalink
Add test for BDF integrator and make it part of test_serial
Browse files Browse the repository at this point in the history
  • Loading branch information
jaharris87 committed Jun 28, 2024
1 parent 193c66f commit a4cd0d5
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ all: xnet_dense net_setup xnse
test: test_serial test_heat test_setup test_nse

test_serial: $(EXE)
@cd $(XNET_TEST_DIR) ; ln -sf ../tools/starkiller-helmholtz/helm_table.dat . ; ./test_xnet.sh ../source/xnet 1 4 7 9 11 15 53
@cd $(XNET_TEST_DIR) ; ln -sf ../tools/starkiller-helmholtz/helm_table.dat . ; ./test_xnet.sh ../source/xnet 1 4 7 9 11 15 53 54

test_heat: $(EXE)
@cd $(XNET_TEST_DIR) ; ln -sf ../tools/starkiller-helmholtz/helm_table.dat . ; ./test_xnet.sh ../source/xnet 50
Expand Down
32 changes: 32 additions & 0 deletions test/test_settings_bdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Problem Description
2000 timesteps
diagnostic level 1
New parameters
## Job Controls
1 Initial Zone
6 # of Zones
1 Include Weak Reactions (yes=1,no=0,only=-1)
1 Include Screening (yes=1)
1 Process Nuclear Data at Run Time (yes=1,no=0)
## Neutrinos
0 Include Neutrino Reactions (yes=1, no=0)
## NSE Initial Conditions
11.0 Temperature in GK to use NSE initial conditions instead of file
## Integration Controls
3 Choice of integration Scheme (1=Backward Euler, 2= Bader-Deufelhard)
9999 Max. number of timesteps before quit
10 Max. iterations per step
1 Rebuild the jacobian every ijac iterations after the first
3 Convergence Condition (Mass Cons.=0, (dY/Y small)=1)
1.00E-01 Max. Abundance Change per timestep
1.00E-07 Smallest Abundance used in timestep calculation
1.00E-06 Mass Conservation Limit
1.00E-04 Convergence Criterion
1.00E-99 Lower Abundance limit, smaller abundances = 0
2.00E+00 Max. Factor to change dt in a timestep
## Self-heating Controls
1 Include self-heating (yes=1,no=0)
1.00E-02 Max. Temperature Change per timestep
1.00E-04 Temperature Convergence Criterion
## Zone Batching Controls
4 Blocking size for zone loop
15 changes: 15 additions & 0 deletions test/test_xnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
## alpha (16) 51
## torch47 (47) 52
## SN160 (160) 53
## SN160 (160) (BDF integrator) 54
## =====================================================================
## All parallel test problems 30
## 4 different SN alpha (16) 31
Expand Down Expand Up @@ -101,6 +102,13 @@ function do_test_heat {
test_diff Test_Results/net_diag_$2 Test_Problems/Results/net_diag_$2 $2
}

function do_test_bdf {
cat test_settings_bdf Test_Problems/setup_$2 >| control
$1
mv -f net_diag01 Test_Results/net_diag_$2
test_diff Test_Results/net_diag_$2 Test_Problems/Results/net_diag_$2 $2
}

function do_test_batch {
cat test_settings_batch Test_Problems/setup_$2 >| control
$1
Expand Down Expand Up @@ -282,6 +290,13 @@ for xnet in ${xnet_list[@]}; do
do_test_heat $xnet $test_name
fi

# Self-heating test using SN160 (explosive burning of degenerate C/O) (with BDF integrator)
if [ $itest -eq 50 -o $itest -eq 54 ]; then
echo "Test: Self-heating from explosive burning of degenerate C/O with SN160 network and BDF integrator"
test_th="bdf"; test_net="sn160"; test_name=${test_th}_${test_net}
do_test_bdf $xnet $test_name
fi

# Zone batching test using alpha (explosive burning of degenerate C/O)
if [ $itest -eq 60 -o $itest -eq 61 ]; then
echo "Test: Zone batching w/ self-heating from explosive burning of degenerate C/O with alpha network"
Expand Down

0 comments on commit a4cd0d5

Please sign in to comment.