Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
e77907e
add a slightly more extensive nova network
zingale Aug 27, 2021
6ae3dcf
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Oct 6, 2021
1e3b012
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Oct 13, 2021
cf0a29c
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Feb 16, 2022
e4fbb2c
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Apr 7, 2022
645baad
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Aug 22, 2022
b754391
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Feb 23, 2023
d398920
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Jun 1, 2023
991b355
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Jun 9, 2023
03de257
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Nov 10, 2023
6a8ade9
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Nov 17, 2023
14be14d
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Dec 1, 2023
86cc226
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Apr 23, 2024
1be585f
Merge branch 'development' of ssh://github.com/StarKiller-astro/Micro…
zingale Sep 30, 2024
9a6d8b8
Merge branch 'development' of github.com:amrex-astro/Microphysics int…
zingale Nov 13, 2024
a804b84
Merge branch 'development' of github.com:amrex-astro/Microphysics int…
zingale Jan 27, 2025
07b8212
Merge branch 'development' of github.com:amrex-astro/Microphysics int…
zingale Jan 30, 2025
5da1b53
Merge branch 'development' of github.com:amrex-astro/Microphysics int…
zingale Apr 15, 2025
d3b0f0a
Merge branch 'development' of github.com:amrex-astro/Microphysics int…
zingale Jun 23, 2025
9b02cea
Merge branch 'development' of github.com:amrex-astro/Microphysics int…
zingale Jun 24, 2025
29a3868
Merge branch 'development' of github.com:amrex-astro/Microphysics int…
zingale Jul 1, 2025
2fdfce9
Merge branch 'development' of github.com:amrex-astro/Microphysics int…
zingale Aug 29, 2025
fe5b143
Merge branch 'development' of github.com:amrex-astro/Microphysics int…
zingale Sep 19, 2025
c8683b3
Merge branch 'development' of github.com:amrex-astro/Microphysics int…
zingale Sep 30, 2025
0ab20d7
Merge branch 'development' of github.com:amrex-astro/Microphysics int…
zingale Oct 28, 2025
a1fa5a9
some clang-tidy 21 fixes
zingale Oct 29, 2025
ca2aca4
more fixes
zingale Oct 29, 2025
f5aa64b
start of support for C++20
zingale Oct 29, 2025
64a00da
update has_energy
zingale Oct 29, 2025
304d594
bump up cuda
zingale Oct 29, 2025
19d9975
update entropy
zingale Oct 29, 2025
8ebd918
update pressure
zingale Oct 29, 2025
30c55c2
more work
zingale Oct 29, 2025
61a002b
update pressure
zingale Oct 29, 2025
f669c50
more changes
zingale Oct 29, 2025
10626a2
finish
zingale Oct 29, 2025
4875891
fix clang-tidy
zingale Oct 29, 2025
057984c
update CUDA requirements
zingale Oct 29, 2025
bcca47f
Merge branch 'development' into use_cxx-20
zingale Nov 3, 2025
e1dd93d
Merge branch 'use_cxx-20' of github.com:zingale/Microphysics into use…
zingale Nov 3, 2025
fecd17a
update C++ standard
zingale Nov 3, 2025
131aa40
reverse ln2
zingale Nov 3, 2025
952ae79
try bumping up standard
zingale Nov 3, 2025
9c1e2e4
suppress warnings
zingale Nov 3, 2025
9713504
Merge branch 'development' into use_cxx-20
zingale Nov 5, 2025
78eafbb
Merge branch 'development' into use_cxx-20
zingale Nov 15, 2025
b6fc3c0
Merge branch 'development' into use_cxx-20
zingale Dec 9, 2025
934220f
Merge branch 'development' into use_cxx-20
zingale Jan 5, 2026
27372cc
update clang-tidy
zingale Jan 5, 2026
0b2908f
Merge branch 'development' into use_cxx-20
zingale Jan 8, 2026
e42b7fa
Merge branch 'development' into use_cxx-20
zingale Jan 10, 2026
0a66936
Merge branch 'development' into use_cxx-20
zingale Jan 11, 2026
6137c0e
Merge branch 'development' into use_cxx-20
zingale Jan 11, 2026
20e722b
fix
zingale Jan 11, 2026
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 .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Checks: >
-misc-use-internal-linkage,
modernize-*,
-modernize-avoid-c-arrays,
-modernize-use-designated-initializers,
-modernize-use-trailing-return-type,
performance-*,
-performance-avoid-endl,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/castro-development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
export MICROPHYSICS_HOME=${PWD}

cd Castro/Exec/science/flame_wave/
make -j 4 CCACHE=ccache USE_MPI=FALSE
make -j 4 CXXSTD=c++20 CCACHE=ccache USE_MPI=FALSE

ccache -s
du -hs ~/.cache/ccache
Expand All @@ -64,7 +64,7 @@ jobs:
export MICROPHYSICS_HOME=${PWD}

cd Castro/Exec/science/subchandra/
make -j 4 CCACHE=ccache USE_MPI=FALSE NETWORK_DIR=he-burn/he-burn-19am
make -j 4 CXXSTD=c++20 CCACHE=ccache USE_MPI=FALSE NETWORK_DIR=he-burn/he-burn-19am

ccache -s
du -hs ~/.cache/ccache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/castro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
export MICROPHYSICS_HOME=${PWD}

cd Castro/Exec/science/flame_wave/
make -j 4 CCACHE=ccache USE_MPI=FALSE
make -j 4 CXXSTD=c++20 CCACHE=ccache USE_MPI=FALSE

ccache -s
du -hs ~/.cache/ccache
Expand All @@ -68,7 +68,7 @@ jobs:
export MICROPHYSICS_HOME=${PWD}

cd Castro/Exec/science/subchandra/
make -j 4 CCACHE=ccache USE_MPI=FALSE NETWORK_DIR=he-burn/he-burn-19am
make -j 4 CXXSTD=c++20 CCACHE=ccache USE_MPI=FALSE NETWORK_DIR=he-burn/he-burn-19am

ccache -s
du -hs ~/.cache/ccache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:

jobs:
cuda-compile:
name: CUDA@11.7 GCC
name: CUDA@12.9 GCC
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v6
Expand All @@ -26,7 +26,7 @@ jobs:
cd ../..

- name: Dependencies
run: .github/workflows/dependencies/dependencies_nvcc.sh 11.7
run: .github/workflows/dependencies/dependencies_nvcc.sh 12.9

- name: compile test_react (aprox13)
run: |
Expand Down
2 changes: 1 addition & 1 deletion Docs/source/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Microphysics requires

optional dependencies are:

* CUDA (≥ 11)
* CUDA (≥ 12)
* ROCm (≥ 6.3.1 --- earlier versions have register allocation bugs)

Usage Modes
Expand Down
16 changes: 8 additions & 8 deletions EOS/breakout/actual_eos.H
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ void actual_eos (I input, T& state)
// dens, temp and xmass are inputs
amrex::Real cv = R / (state.mu * (gamma_const - 1.0_rt));
amrex::Real e = cv * state.T;
if constexpr (has_energy<T>::value) {
if constexpr (has_energy<T>) {
state.cv = cv;
state.e = e;
}
if constexpr (has_pressure<T>::value) {
if constexpr (has_pressure<T>) {
state.p = (gamma_const - 1.0_rt) * state.rho * e;
}
if constexpr (has_pressure<T>::value && has_energy<T>::value) {
if constexpr (has_pressure<T> && has_energy<T>) {
state.gam1 = gamma_const;
}

Expand Down Expand Up @@ -102,10 +102,10 @@ void actual_eos (I input, T& state)
{
// dens, pres, and xmass are inputs

if constexpr (has_pressure<T>::value) {
if constexpr (has_pressure<T>) {
amrex::Real poverrho = state.p / state.rho;
state.T = poverrho * state.mu * (1.0_rt / R);
if constexpr (has_energy<T>::value) {
if constexpr (has_energy<T>) {
state.e = poverrho * (1.0_rt / (gamma_const - 1.0_rt));
state.gam1 = gamma_const;
}
Expand All @@ -117,11 +117,11 @@ void actual_eos (I input, T& state)
{
// dens, energy, and xmass are inputs

if constexpr (has_energy<T>::value) {
if constexpr (has_energy<T>) {
amrex::Real poverrho = (gamma_const - 1.0_rt) * state.e;
state.T = poverrho * state.mu * (1.0_rt / R);

if constexpr (has_pressure<T>::value) {
if constexpr (has_pressure<T>) {
state.p = poverrho * state.rho;
state.gam1 = gamma_const;

Expand All @@ -135,7 +135,7 @@ void actual_eos (I input, T& state)

// Try to avoid the expensive log function. Since we don't need entropy
// in hydro solver, set it to an invalid but "nice" value for the plotfile.
if constexpr (has_entropy<T>::value) {
if constexpr (has_entropy<T>) {
state.s = 1.0_rt;
}

Expand Down
6 changes: 3 additions & 3 deletions EOS/eos_composition.H
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ eos_xderivs_t composition_derivatives (const T& state)
eos_xderivs_t state_xderivs;

for (int n = 0; n < NumSpec; n++) {
if constexpr (has_dpdA<T>::value && has_dpdZ<T>::value) {
if constexpr (has_dpdA<T> && has_dpdZ<T>) {
state_xderivs.dpdX[n] =
state.dpdA * (state.abar * aion_inv[n]) * (aion[n] - state.abar) +
state.dpdZ * (state.abar * aion_inv[n]) * (zion[n] - state.zbar);
Expand All @@ -94,7 +94,7 @@ eos_xderivs_t composition_derivatives (const T& state)
state_xderivs.dpdX[n] = 0.0_rt;
}

if constexpr (has_dedA<T>::value && has_dedZ<T>::value) {
if constexpr (has_dedA<T> && has_dedZ<T>) {
state_xderivs.dedX[n] =
state.dedA * (state.abar * aion_inv[n]) * (aion[n] - state.abar) +
state.dedZ * (state.abar * aion_inv[n]) * (zion[n] - state.zbar);
Expand All @@ -103,7 +103,7 @@ eos_xderivs_t composition_derivatives (const T& state)
state_xderivs.dedX[n] = 0.0_rt;
}

if constexpr (has_pressure<T>::value) {
if constexpr (has_pressure<T>) {
if (state.dpdr != 0.0) {

state_xderivs.dhdX[n] = state_xderivs.dedX[n]
Expand Down
56 changes: 28 additions & 28 deletions EOS/gamma_law/actual_eos.H
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void actual_eos (I input, T& state)
// Get the mass of a nucleon from m_u.
const amrex::Real m_nucleon = C::m_u;

if constexpr (has_xn<T>::value) {
if constexpr (has_xn<T>) {
if (eos_rp::eos_assume_neutral) {
state.mu = state.abar;
} else {
Expand Down Expand Up @@ -86,7 +86,7 @@ void actual_eos (I input, T& state)
// Solve for the temperature:
// h = e + p/rho = (p/rho)*[1 + 1/(gamma-1)] = (p/rho)*gamma/(gamma-1)

if constexpr (has_enthalpy<T>::value) {
if constexpr (has_enthalpy<T>) {
state.T = (state.h * state.mu * m_nucleon / C::k_B)*(eos_rp::eos_gamma - 1.0)/eos_rp::eos_gamma;
}

Expand All @@ -99,7 +99,7 @@ void actual_eos (I input, T& state)
// Solve for the density:
// p = rho k T / (mu m_nucleon)

if constexpr (has_pressure<T>::value) {
if constexpr (has_pressure<T>) {
state.rho = state.p * state.mu * m_nucleon / (C::k_B * state.T);
}

Expand All @@ -112,7 +112,7 @@ void actual_eos (I input, T& state)
// Solve for the temperature:
// p = rho k T / (mu m_nucleon)

if constexpr (has_pressure<T>::value) {
if constexpr (has_pressure<T>) {
state.T = state.p * state.mu * m_nucleon / (C::k_B * state.rho);
}

Expand All @@ -125,7 +125,7 @@ void actual_eos (I input, T& state)
// Solve for the temperature
// e = k T / [(mu m_nucleon)*(gamma-1)]

if constexpr (has_energy<T>::value) {
if constexpr (has_energy<T>) {
state.T = state.e * state.mu * m_nucleon * (eos_rp::eos_gamma - 1.0) / C::k_B;
}

Expand All @@ -139,7 +139,7 @@ void actual_eos (I input, T& state)
// Invert Sackur-Tetrode eqn (below) using
// rho = p mu m_nucleon / (k T)

if constexpr (has_pressure<T>::value && has_entropy<T>::value) {
if constexpr (has_pressure<T> && has_entropy<T>) {
state.T = std::pow(state.p, 2.0/5.0) *
std::pow(2.0 * M_PI * C::hbar * C::hbar / (state.mu * m_nucleon), 3.0/5.0) *
std::exp(2.0 * state.mu * m_nucleon * state.s / (5.0 * C::k_B) - 1.0) / C::k_B;
Expand All @@ -148,7 +148,7 @@ void actual_eos (I input, T& state)
// Solve for the density
// rho = p mu m_nucleon / (k T)

if constexpr (has_pressure<T>::value) {
if constexpr (has_pressure<T>) {
state.rho = state.p * state.mu * m_nucleon / (C::k_B * state.T);
}

Expand All @@ -160,7 +160,7 @@ void actual_eos (I input, T& state)

// Solve for temperature and density

if constexpr (has_pressure<T>::value && has_enthalpy<T>::value) {
if constexpr (has_pressure<T> && has_enthalpy<T>) {
state.rho = state.p / state.h * eos_rp::eos_gamma / (eos_rp::eos_gamma - 1.0);
state.T = state.p * state.mu * m_nucleon / (C::k_B * state.rho);
}
Expand Down Expand Up @@ -199,21 +199,21 @@ void actual_eos (I input, T& state)
// specific internal energy using the gamma-law EOS relation.
amrex::Real pressure = state.rho * state.T * C::k_B / (state.mu * m_nucleon);
amrex::Real energy = pressure / (eos_rp::eos_gamma - 1.0) * rhoinv;
if constexpr (has_pressure<T>::value) {
if constexpr (has_pressure<T>) {
state.p = pressure;
}
if constexpr (has_energy<T>::value) {
if constexpr (has_energy<T>) {
state.e = energy;
}

// enthalpy is h = e + p/rho
if constexpr (has_enthalpy<T>::value) {
if constexpr (has_enthalpy<T>) {
state.h = energy + pressure * rhoinv;
}

// entropy (per gram) of an ideal monoatomic gas (the Sackur-Tetrode equation)
// NOTE: this expression is only valid for gamma = 5/3.
if constexpr (has_entropy<T>::value) {
if constexpr (has_entropy<T>) {
const amrex::Real fac = 1.0 / std::pow(2.0 * M_PI * C::hbar * C::hbar, 1.5);

state.s = (C::k_B / (state.mu * m_nucleon)) *
Expand All @@ -222,39 +222,39 @@ void actual_eos (I input, T& state)
}

// Compute the thermodynamic derivatives and specific heats
if constexpr (has_pressure<T>::value) {
if constexpr (has_pressure<T>) {
state.dpdT = state.p * Tinv;
state.dpdr = state.p * rhoinv;
}
if constexpr (has_energy<T>::value) {
if constexpr (has_energy<T>) {
state.dedT = state.e * Tinv;
state.dedr = 0.0;
}
if constexpr (has_entropy<T>::value) {
if constexpr (has_entropy<T>) {
state.dsdT = 1.5 * (C::k_B / (state.mu * m_nucleon)) * Tinv;
state.dsdr = - (C::k_B / (state.mu * m_nucleon)) * rhoinv;
}
if constexpr (has_enthalpy<T>::value) {
if constexpr (has_enthalpy<T>) {
state.dhdT = state.dedT + state.dpdT * rhoinv;
state.dhdr = 0.0;
}

if constexpr (has_xne_xnp<T>::value) {
if constexpr (has_xne_xnp<T>) {
state.xne = 0.0;
state.xnp = 0.0;
}
if constexpr (has_eta<T>::value) {
if constexpr (has_eta<T>) {
state.eta = 0.0;
}
if constexpr (has_pele_ppos<T>::value) {
if constexpr (has_pele_ppos<T>) {
state.pele = 0.0;
state.ppos = 0.0;
}

if constexpr (has_energy<T>::value) {
if constexpr (has_energy<T>) {
state.cv = state.dedT;

if constexpr (has_pressure<T>::value) {
if constexpr (has_pressure<T>) {
state.cp = eos_rp::eos_gamma * state.cv;

state.gam1 = eos_rp::eos_gamma;
Expand All @@ -264,31 +264,31 @@ void actual_eos (I input, T& state)

// sound speed
state.cs = std::sqrt(eos_rp::eos_gamma * state.p * rhoinv);
if constexpr (has_G<T>::value) {
if constexpr (has_G<T>) {
state.G = 0.5 * (1.0 + eos_rp::eos_gamma);
}
}
}

if constexpr (has_dpdA<T>::value) {
if constexpr (has_dpdA<T>) {
state.dpdA = - state.p * (1.0 / state.abar);
}
if constexpr (has_dedA<T>::value) {
if constexpr (has_dedA<T>) {
state.dedA = - state.e * (1.0 / state.abar);
}

if (eos_rp::eos_assume_neutral) {
if constexpr (has_dpdZ<T>::value) {
if constexpr (has_dpdZ<T>) {
state.dpdZ = 0.0;
}
if constexpr (has_dedZ<T>::value) {
if constexpr (has_dedZ<T>) {
state.dedZ = 0.0;
}
} else {
if constexpr (has_dpdZ<T>::value) {
if constexpr (has_dpdZ<T>) {
state.dpdZ = state.p * (1.0 / (1.0 + state.zbar));
}
if constexpr (has_dedZ<T>::value) {
if constexpr (has_dedZ<T>) {
state.dedZ = state.e * (1.0/(1.0 + state.zbar));
}
}
Expand Down
Loading
Loading