-
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.
convert all pynucastro nets to C++ (#809)
this uses the latest version of pynucastro to write out Starkiller C++ networks
- Loading branch information
Showing
165 changed files
with
39,549 additions
and
1,052,453 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 |
---|---|---|
|
@@ -90,6 +90,7 @@ extern_parameters_F.H | |
# old plotfiles | ||
*.old.*[0-9] | ||
|
||
|
||
# Jupyter stuff | ||
.ipynb_checkpoints/ | ||
|
||
20180319default2 |
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
F90EXE_sources += actual_network.F90 | ||
F90EXE_sources += reaclib_rates.F90 | ||
F90EXE_sources += table_rates.F90 | ||
f90EXE_sources += physical_constants.f90 | ||
F90EXE_sources += network_properties.F90 | ||
CEXE_headers += network_properties.H | ||
|
||
ifeq ($(USE_REACT),TRUE) | ||
F90EXE_sources += actual_rhs.F90 | ||
|
||
USE_SCREENING = TRUE | ||
USE_NEUTRINOS = TRUE | ||
DEFINES += -DNETWORK_HAS_CXX_IMPLEMENTATION | ||
|
||
CEXE_sources += actual_network_data.cpp | ||
CEXE_headers += actual_network.H | ||
CEXE_headers += actual_rhs.H | ||
CEXE_headers += reaclib_rates.H | ||
CEXE_headers += table_rates.H | ||
CEXE_sources += table_rates_data.cpp | ||
USE_SCREENING = TRUE | ||
USE_NEUTRINOS = TRUE | ||
endif |
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 |
---|---|---|
@@ -1,4 +1 @@ | ||
@namespace: network | ||
|
||
# Turn off thermal neutrino losses | ||
disable_thermal_neutrinos logical .false. |
This file was deleted.
Oops, something went wrong.
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,82 @@ | ||
#ifndef actual_network_H | ||
#define actual_network_H | ||
|
||
#include <AMReX_REAL.H> | ||
#include <AMReX_Array.H> | ||
|
||
#include <fundamental_constants.H> | ||
#include <network_properties.H> | ||
|
||
using namespace amrex; | ||
|
||
void actual_network_init(); | ||
|
||
const std::string network_name = "pynucastro-cxx"; | ||
|
||
namespace network | ||
{ | ||
extern AMREX_GPU_MANAGED amrex::Array1D<amrex::Real, 1, NumSpec> bion; | ||
extern AMREX_GPU_MANAGED amrex::Array1D<amrex::Real, 1, NumSpec> mion; | ||
} | ||
|
||
namespace Rates | ||
{ | ||
|
||
enum NetworkRates | ||
{ | ||
k_ne20__he4_o16 = 1, | ||
k_he4_o16__ne20 = 2, | ||
k_he4_ne20__mg24 = 3, | ||
k_he4_mg24__si28 = 4, | ||
k_p_al27__si28 = 5, | ||
k_he4_al27__p31 = 6, | ||
k_he4_si28__s32 = 7, | ||
k_p_p31__s32 = 8, | ||
k_o16_o16__p_p31 = 9, | ||
k_o16_o16__he4_si28 = 10, | ||
k_he4_mg24__p_al27 = 11, | ||
k_p_al27__he4_mg24 = 12, | ||
k_he4_si28__p_p31 = 13, | ||
k_p_p31__he4_si28 = 14, | ||
k_f20__o20 = 15, | ||
k_ne20__f20 = 16, | ||
k_o20__f20 = 17, | ||
k_f20__ne20 = 18, | ||
NumRates = k_f20__ne20 | ||
}; | ||
|
||
// For each rate, we need: rate, drate/dT, screening, dscreening/dT | ||
|
||
const int NumGroups = 4; | ||
|
||
// number of reaclib rates | ||
|
||
const int NrateReaclib = 14; | ||
const int NumReaclibSets = 34; | ||
|
||
// number of tabular rates | ||
|
||
const int NrateTabular = 4; | ||
|
||
} | ||
|
||
namespace reaclib_rates | ||
{ | ||
|
||
// Temperature coefficient arrays (numbers correspond to reaction | ||
// numbers in net_info) | ||
|
||
extern AMREX_GPU_MANAGED amrex::Array2D<amrex::Real, 1, 7, 1, Rates::NumReaclibSets> ctemp_rate; | ||
|
||
// Index into ctemp_rate, dimension 2, where each rate's | ||
// coefficients start | ||
|
||
extern AMREX_GPU_MANAGED amrex::Array1D<int, 1, Rates::NrateReaclib> rate_start_idx; | ||
|
||
// Reaction multiplicities-1 (how many rates contribute - 1) | ||
|
||
extern AMREX_GPU_MANAGED amrex::Array1D<int, 1, Rates::NrateReaclib> rate_extra_mult; | ||
|
||
} | ||
|
||
#endif |
Oops, something went wrong.