Skip to content

Commit

Permalink
add a sneu5 CI test
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Sep 13, 2023
1 parent 5e38c70 commit ba77591
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/test_neutrinos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: test_neutrinos

on: [pull_request]
jobs:
test_rhs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Get AMReX
run: |
mkdir external
cd external
git clone https://github.com/AMReX-Codes/amrex.git
cd amrex
git checkout development
echo 'AMREX_HOME=$(GITHUB_WORKSPACE)/external/amrex' >> $GITHUB_ENV
echo $AMREX_HOME
if [[ -n "${AMREX_HOME}" ]]; then exit 1; fi
cd ../..
- name: Install dependencies
run: |
sudo apt-get update -y -qq
sudo apt-get -qq -y install curl cmake jq clang g++>=9.3.0
- name: Build the fextrema tool
run: |
cd external/amrex/Tools/Plotfile
make programs=fextrema -j 2
- name: Compile
run: |
cd unit_test/test_neutrino_cooling
make realclean
make -j 4
- name: Run test_neutrino_cooling
run: |
cd unit_test/test_neutrino_cooling
./main3d.gnu.ex inputs
../../external/amrex/Tools/Plotfile/fextrema.gnu.ex test_sneut5 > test.out
- name: Compare to stored output
run: |
cd unit_test/test_neutrino_cooling
diff test.out ci-benchmarks/test_sneut5.out
31 changes: 31 additions & 0 deletions unit_test/test_neutrino_cooling/ci-benchmarks/test_sneut5.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
plotfile = test_sneut5
time = 0
variables minimum value maximum value
density 10 5000000000
temperature 1000000 10000000000
X_hydrogen-1 0.5 0.75
X_helium-3 0 0.026315789474
X_helium-4 0 0.25
X_carbon-12 0 0.026315789474
X_nitrogen-14 0 0.026315789474
X_oxygen-16 0 0.026315789474
X_neon-20 0 0.026315789474
X_magnesium-24 0 0.026315789474
X_silicon-28 0 0.026315789474
X_sulfur-32 0 0.026315789474
X_argon-36 0 0.026315789474
X_calcium-40 0 0.026315789474
X_titanium-44 0 0.026315789474
X_chromium-48 0 0.026315789474
X_chromium-56 0 0.026315789474
X_iron-52 0 0.026315789474
X_iron-54 0 0.026315789474
X_iron-56 0 0.026315789474
X_nickel-56 0 0.026315789474
X_neutron 0 0.026315789474
X_proton 0 0.026315789474
sneut 0 3.3206297956e+23
dsneutdt 0 2.9114557633e+14
dsneutda -2.0028760264e+16 1.6034657416e+20
dsneutdz -1.832532276e+20 2.2890025857e+16

0 comments on commit ba77591

Please sign in to comment.