-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into new_rk2_sdc_and_eos
- Loading branch information
Showing
13 changed files
with
442 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: Castro development | ||
|
||
on: [push, pull_request] | ||
|
||
concurrency: | ||
group: ${{ github.ref }}-${{ github.head_ref }}-apps-dev | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
castro-development: | ||
name: Castro development | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download Castro | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'AMReX-Astro/Castro' | ||
ref: development | ||
path: 'Castro' | ||
- name: Download AMReX | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: 'AMReX-Codes/amrex' | ||
ref: development | ||
path: 'amrex' | ||
- name: Dependencies | ||
run: | | ||
.github/workflows/dependencies/dependencies.sh | ||
.github/workflows/dependencies/dependencies_ccache.sh | ||
- name: Set Up Cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.cache/ccache | ||
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }} | ||
restore-keys: | | ||
ccache-${{ github.workflow }}-${{ github.job }}-git- | ||
- name: Build flame_wave | ||
run: | | ||
export CCACHE_COMPRESS=1 | ||
export CCACHE_COMPRESSLEVEL=10 | ||
export CCACHE_MAXSIZE=75M | ||
export CCACHE_LOGFILE=${{ github.workspace }}/ccache.log.txt | ||
ccache -z | ||
export AMREX_HOME=${PWD}/amrex | ||
export MICROPHYSICS_HOME=${PWD} | ||
cd Castro/Exec/science/flame_wave/ | ||
make -j2 CCACHE=ccache USE_MPI=FALSE | ||
ccache -s | ||
du -hs ~/.cache/ccache | ||
- name: Build subchandra | ||
run: | | ||
export CCACHE_COMPRESS=1 | ||
export CCACHE_COMPRESSLEVEL=10 | ||
export CCACHE_MAXSIZE=75M | ||
export CCACHE_LOGFILE=${{ github.workspace }}/ccache.log.txt | ||
ccache -z | ||
export AMREX_HOME=${PWD}/amrex | ||
export MICROPHYSICS_HOME=${PWD} | ||
cd Castro/Exec/science/subchandra/ | ||
make -j2 CCACHE=ccache USE_MPI=FALSE | ||
ccache -s | ||
du -hs ~/.cache/ccache | ||
save_pr_number: | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Save PR number | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
run: | | ||
echo $PR_NUMBER > pr_number.txt | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: pr_number | ||
path: pr_number.txt | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
PRECISION = DOUBLE | ||
PROFILE = FALSE | ||
|
||
DEBUG = FALSE | ||
|
||
DIM = 3 | ||
|
||
COMP = gnu | ||
|
||
USE_MPI = FALSE | ||
USE_OMP = FALSE | ||
|
||
USE_REACT = TRUE | ||
|
||
USE_NSE_NET = TRUE | ||
EBASE = main | ||
|
||
# define the location of the Microphysics top directory | ||
MICROPHYSICS_HOME ?= ../.. | ||
|
||
# This sets the EOS directory | ||
EOS_DIR := helmholtz | ||
|
||
# This sets the network directory | ||
NETWORK_DIR := subch_base | ||
|
||
SCREEN_METHOD = chabrier1998 | ||
|
||
CONDUCTIVITY_DIR := stellar | ||
|
||
INTEGRATOR_DIR = VODE | ||
|
||
ifeq ($(USE_CUDA), TRUE) | ||
INTEGRATOR_DIR := VODE | ||
endif | ||
|
||
EXTERN_SEARCH += . | ||
|
||
Bpack := ./Make.package | ||
Blocs := . | ||
|
||
include $(MICROPHYSICS_HOME)/unit_test/Make.unit_test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CEXE_sources += main.cpp | ||
CEXE_headers += nse_network_compatibility.H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# NSE Network Checking Script | ||
|
||
This is a script for checking whether integrated mass fractions of | ||
a reaction network will eventually match with the mass fractions | ||
calculated via NSE equations. Currently, this is only valid for networks | ||
that do not involve weak rates. | ||
|
||
* Note that the integration doesn't achieve NSE even though we have | ||
USE_NSE_NET=TRUE is due to the reference size of the cell. By setting | ||
nse.nse_dx_independet=1 will fix this. | ||
|
||
Script will print out all burn_state cases when nse_dx_independent is | ||
not enabled. It will only print out burn_state cases that didn't enter NSE | ||
when nse_dx_independent=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
@namespace: unit_test | ||
|
||
run_prefix character "" | ||
|
||
# the final time to integrate to | ||
tmax real 1.e3 | ||
|
||
# first output time -- we will output in nsteps logarithmically spaced steps between [tfirst, tmax] | ||
tfirst real 0.0 | ||
|
||
# number of steps (logarithmically spaced) | ||
nsteps integer 100 | ||
|
||
rho_min real 1.e7 | ||
rho_max real 1.e9 | ||
|
||
nrho integer 4 | ||
|
||
T_min real 6.e9 | ||
T_max real 8.e9 | ||
|
||
nT integer 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# this inputs is used for checking the compatibility of networks with NSE_NET | ||
|
||
unit_test.run_prefix = "test_nse_network_compatibility_" | ||
|
||
integrator.burner_verbose = 0 | ||
|
||
# Set which jacobian to use | ||
# 1 = analytic jacobian | ||
# 2 = numerical jacobian | ||
|
||
integrator.jacobian = 1 | ||
|
||
integrator.renormalize_abundances = 0 | ||
|
||
integrator.rtol_spec = 1.0e-6 | ||
integrator.rtol_enuc = 1.0e-6 | ||
integrator.atol_spec = 1.0e-10 | ||
integrator.atol_enuc = 1.0e-6 | ||
|
||
unit_test.tmax = 1.e3 | ||
unit_test.tfirst = 1.e-10 | ||
unit_test.nsteps = 100 | ||
|
||
integrator.integrate_energy = 0 | ||
integrator.call_eos_in_rhs = 0 | ||
integrator.do_species_clip = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#include <iostream> | ||
#include <cstring> | ||
#include <vector> | ||
|
||
#include <AMReX_ParmParse.H> | ||
#include <AMReX_MultiFab.H> | ||
using namespace amrex; | ||
|
||
#include <extern_parameters.H> | ||
#include <eos.H> | ||
#include <network.H> | ||
#include <nse_network_compatibility.H> | ||
#include <unit_test.H> | ||
|
||
int main(int argc, char *argv[]) { | ||
|
||
amrex::Initialize(argc, argv); | ||
|
||
std::cout << "starting the single zone burn..." << std::endl; | ||
|
||
ParmParse ppa("amr"); | ||
|
||
init_unit_test(); | ||
|
||
// C++ EOS initialization (must be done after Fortran eos_init and init_extern_parameters) | ||
eos_init(); | ||
|
||
// C++ Network, RHS, screening, rates initialization | ||
network_init(); | ||
|
||
nse_network_compatibility(); | ||
|
||
amrex::Finalize(); | ||
} |
Oops, something went wrong.