Skip to content

Commit

Permalink
Replace std::pow with integer powers to amrex::Math::powi (#1426)
Browse files Browse the repository at this point in the history
With updated network to reflect changes in pynucastro/pynucastro#709.

Added a script and CI to detect cases where we can potentially use powi instead of std::pow for integer powers.
  • Loading branch information
zhichen3 authored Dec 31, 2023
1 parent fd59277 commit 32fa759
Show file tree
Hide file tree
Showing 47 changed files with 979 additions and 872 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/check_powi.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import subprocess
import sys
import os
import re


def pow_to_powi(text):
# Finds all possible std::pow(x, n) where n is a potential integer
# to amrex::Math::powi<n>(x)

# Check for all positive and negative integer, whole float numbers
# with and without _rt
std_pattern = r"std::pow\(([^,]+),\s*(-?(?:\d+\.0*_rt?|\d))\)"
gcem_pattern = r"gcem::pow\(([^,]+),\s*(-?(?:\d+\.0*_rt?|\d))\)"

def replacement(match):
x = match.group(1)
n = match.group(2)

# Only extracts out the integer part before decimal point
n = n.split('.')[0] if '.' in n else n
return f"amrex::Math::powi<{n}>({x})"

text = re.sub(std_pattern, replacement, text)
text = re.sub(gcem_pattern, replacement, text)
return text

def process_content(dir_path):
# This function processes all text in the given directory
for root, dirs, filenames in os.walk(dir_path):
for filename in filenames:
if filename.endswith(".H") or filename.endswith(".cpp"):
filepath = os.path.join(root, filename)

with open(filepath, 'r') as file:
content = file.read()

updated_content = pow_to_powi(content)

with open(filepath, 'w') as file:
file.write(updated_content)

def git_diff():
# Run git diff to see if there are any changes made

git_diff_output = subprocess.run(['git', 'diff', '--color=always'],
capture_output=True, text=True)

# Print out suggested change and raise error after detecting modification
if git_diff_output.stdout:
print("Detected potential usage to replace std::pow" +
"with integer powers via amrex::Math::powi\n")
print("Below are the suggested change:\n")
print(git_diff_output.stdout)

raise RuntimeError("Changes detected after modification")

if __name__ == '__main__':

# Get directory paths
directory_paths = sys.argv[1:]

# Modify the std::pow -> amrex::Math::powi if needed
for dir_path in directory_paths:
process_content(dir_path)

# Give suggested change if there are any modifications made
git_diff()
37 changes: 37 additions & 0 deletions .github/workflows/check_powi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: check powi

on:
push:
branches:
- development
- main
pull_request:
branches:
- development

jobs:
check-ifdefs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Cache pip
uses: actions/cache@v3
with:
# this path is specific to Ubuntu
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Run check_powi
run: |
python .github/workflows/check_powi.py .
4 changes: 2 additions & 2 deletions EOS/ztwd/actual_eos.H
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ using namespace amrex;

const std::string eos_name = "ztwd";

const Real A = M_PI * std::pow(C::m_e, 4) * std::pow(C::c_light, 5) / (3.0_rt * std::pow(C::hplanck, 3));
const Real B2 = 8.0_rt * M_PI * std::pow(C::m_e, 3) * std::pow(C::c_light, 3) * C::m_p / (3.0_rt * std::pow(C::hplanck, 3));
const Real A = M_PI * amrex::Math::powi<4>(C::m_e) * amrex::Math::powi<5>(C::c_light) / (3.0_rt * amrex::Math::powi<3>(C::hplanck));
const Real B2 = 8.0_rt * M_PI * amrex::Math::powi<3>(C::m_e) * amrex::Math::powi<3>(C::c_light) * C::m_p / (3.0_rt * amrex::Math::powi<3>(C::hplanck));
const Real iter_tol = 1.e-10_rt;
const int max_iter = 1000;

Expand Down
12 changes: 6 additions & 6 deletions conductivity/stellar/actual_conductivity.H
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ actual_conductivity (T& state)
d0log = -(3.868_rt + 0.806_rt*xh) + (3.42_rt - 0.52_rt*xh)*std::log(t6);
}
Real xka1 = 2.809_rt * std::exp(-(1.74_rt - 0.755_rt*xh)
* std::pow(std::log10(t6) - 0.22_rt + 0.1375_rt*xh, 2));
* amrex::Math::powi<2>(std::log10(t6) - 0.22_rt + 0.1375_rt*xh));

Real xkw = 4.05_rt * std::exp(-(0.306_rt - 0.04125_rt*xh)
* std::pow(std::log10(t6) - 0.18_rt + 0.1625_rt*xh, 2));
Real xkaz = 50.0_rt*xz*xka1 * std::exp(-0.5206_rt*std::pow((std::log(state.rho)-d0log)/xkw, 2));
* amrex::Math::powi<2>(std::log10(t6) - 0.18_rt + 0.1625_rt*xh));
Real xkaz = 50.0_rt*xz*xka1 * std::exp(-0.5206_rt*amrex::Math::powi<2>((std::log(state.rho)-d0log)/xkw));
Real dbar2log = -(4.283_rt + 0.7196_rt*xh) + 3.86_rt*std::log(t6);
Real dbar1log = -5.296_rt + 4.833_rt*std::log(t6);
if (dbar2log < dbar1log) {
Expand Down Expand Up @@ -198,7 +198,7 @@ actual_conductivity (T& state)
}

// fudge molecular opacity for low temps
Real xkf = t7peek * state.rho * std::pow(state.T * 1.0e-7_rt, 4);
Real xkf = t7peek * state.rho * amrex::Math::powi<4>(state.T * 1.0e-7_rt);
orad = xkf * orad/(xkf + orad);


Expand Down Expand Up @@ -317,9 +317,9 @@ actual_conductivity (T& state)
Real xrel = 1.009_rt * std::pow(zbar/abar * state.rho * 1.0e-6_rt, third);
Real beta2 = xrel*xrel/(1.0_rt + xrel*xrel);
Real jy = (1.0_rt + 6.0_rt/(5.0_rt*xrel*xrel) + 2.0_rt/(5.0_rt*xrel*xrel*xrel*xrel))
* ( yg*yg*yg / (3.0_rt * std::pow(1.0_rt + 0.07414_rt * yg, 3))
* ( yg*yg*yg / (3.0_rt * amrex::Math::powi<3>(1.0_rt + 0.07414_rt * yg))
* std::log((2.81_rt - 0.810_rt*beta2 + yg)/yg)
+ std::pow(M_PI, 5/6.0_rt) * std::pow(yg/(13.91_rt + yg), 4));
+ std::pow(M_PI, 5/6.0_rt) * amrex::Math::powi<4>(yg/(13.91_rt + yg)));
Real vee = 0.511_rt * state.T*state.T * xmas/(ymas*ymas) * std::sqrt(xmas/ymas) * jy;
Real cee = wfac/vee;

Expand Down
6 changes: 3 additions & 3 deletions integration/RKC/rkc.H
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void step (BurnT& state, RkcT& rstate, const Real h, const int m)
Real arg = m * std::log(w0 + temp2);
Real w1 = std::sinh(arg) * temp1 /
(std::cosh(arg) * m * temp2 - w0 * std::sinh(arg));
Real bjm1 = 1.0_rt / std::pow(2.0_rt * w0, 2);
Real bjm1 = 1.0_rt / amrex::Math::powi<2>(2.0_rt * w0);
Real bjm2 = bjm1;

// Evaluate the first stage.
Expand Down Expand Up @@ -58,7 +58,7 @@ void step (BurnT& state, RkcT& rstate, const Real h, const int m)
Real zj = 2.0_rt * w0 * zjm1 - zjm2;
Real dzj = 2.0_rt * w0 * dzjm1 - dzjm2 + 2.0_rt * zjm1;
Real d2zj = 2.0_rt * w0 * d2zjm1 - d2zjm2 + 4.0_rt * dzjm1;
Real bj = d2zj / std::pow(dzj, 2);
Real bj = d2zj / amrex::Math::powi<2>(dzj);
Real ajm1 = 1.0_rt - zjm1 * bjm1;
Real mu = 2.0_rt * w0 * bj / bjm1;
Real nu = -bj / bjm2;
Expand Down Expand Up @@ -220,7 +220,7 @@ int rkclow (BurnT& state, RkcT& rstate)

Real est = p8 * (rstate.yn(i) - rstate.y(i)) +
p4 * h * (rstate.fn(i) + rstate.yjm1(i));
err += std::pow(est / wt, 2);
err += amrex::Math::powi<2>(est / wt);
}

err = std::sqrt(err / int_neqs);
Expand Down
2 changes: 1 addition & 1 deletion integration/utils/initial_timestep.H
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Real initial_react_dt (BurnT& burn_state, IntT& int_state,

Real yddnorm = 0.0_rt;
for (int ii = 1; ii <= INT_NEQS; ii++) {
yddnorm += std::pow(ddydtt(ii) * ewt(ii), 2);
yddnorm += amrex::Math::powi<2>(ddydtt(ii) * ewt(ii));
}
yddnorm = std::sqrt(yddnorm / INT_NEQS);

Expand Down
8 changes: 4 additions & 4 deletions integration/utils/rkc_util.H
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Real rkc_init_dt (BurnT& state, IntT& rstate, const Real max_timestep, const Rea
} else {
wt = rstate.rtol_enuc * std::abs(rstate.yn(i)) + rstate.atol_enuc;
}
est += std::pow((rstate.yjm2(i) - rstate.fn(i)) / wt, 2);
est += amrex::Math::powi<2>((rstate.yjm2(i) - rstate.fn(i)) / wt);
}
est = absh * std::sqrt(est / INT_NEQS);

Expand Down Expand Up @@ -115,8 +115,8 @@ int rkcrho (BurnT& state, IntT& rstate, const Real max_timestep, Real& sprad)
Real ynrm{};
Real vnrm{};
for (int i = 1; i <= INT_NEQS; ++i) {
ynrm += std::pow(rstate.yn(i), 2);
vnrm += std::pow(rstate.yjm1(i), 2);
ynrm += amrex::Math::powi<2>(rstate.yn(i));
vnrm += amrex::Math::powi<2>(rstate.yjm1(i));
}
ynrm = std::sqrt(ynrm);
vnrm = std::sqrt(vnrm);
Expand Down Expand Up @@ -164,7 +164,7 @@ int rkcrho (BurnT& state, IntT& rstate, const Real max_timestep, Real& sprad)
rstate.nfesig++;
Real dfnrm{};
for (int i = 1; i <= INT_NEQS; ++i) {
dfnrm += std::pow(rstate.yjm2(i) - rstate.fn(i), 2);
dfnrm += amrex::Math::powi<2>(rstate.yjm2(i) - rstate.fn(i));
}
dfnrm = std::sqrt(dfnrm);
Real sigmal = sigma;
Expand Down
14 changes: 7 additions & 7 deletions networks/CNO_extras/actual_rhs.H
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,7 @@ void rhs_nuc(const burn_t& state,
-screened_rates(k_He4_O16_to_Ne20)*Y(He4)*Y(O16)*state.rho +
-screened_rates(k_He4_Ne18_to_Mg22)*Y(He4)*Y(Ne18)*state.rho +
-screened_rates(k_He4_Ne20_to_Mg24)*Y(He4)*Y(Ne20)*state.rho +
0.5*screened_rates(k_C12_C12_to_He4_Ne20)*std::pow(Y(C12), 2)*state.rho +
0.5*screened_rates(k_C12_C12_to_He4_Ne20)*amrex::Math::powi<2>(Y(C12))*state.rho +
-screened_rates(k_He4_N13_to_p_O16)*Y(He4)*Y(N13)*state.rho +
screened_rates(k_p_N15_to_He4_C12)*Y(N15)*Y(H1)*state.rho +
-screened_rates(k_He4_O14_to_p_F17)*Y(He4)*Y(O14)*state.rho +
Expand All @@ -644,16 +644,16 @@ void rhs_nuc(const burn_t& state,
screened_rates(k_p_O18_to_He4_N15)*Y(O18)*Y(H1)*state.rho +
screened_rates(k_p_F18_to_He4_O15)*Y(F18)*Y(H1)*state.rho +
screened_rates(k_p_F19_to_He4_O16)*Y(F19)*Y(H1)*state.rho +
-0.5*screened_rates(k_He4_He4_He4_to_C12)*std::pow(Y(He4), 3)*std::pow(state.rho, 2) +
-0.5*screened_rates(k_He4_He4_He4_to_C12)*amrex::Math::powi<3>(Y(He4))*amrex::Math::powi<2>(state.rho) +
screened_rates(k_p_Ne20_to_He4_F17)*Y(Ne20)*Y(H1)*state.rho;

ydot_nuc(C12) =
-screened_rates(k_p_C12_to_N13)*Y(C12)*Y(H1)*state.rho +
-screened_rates(k_He4_C12_to_O16)*Y(C12)*Y(He4)*state.rho +
-screened_rates(k_C12_C12_to_He4_Ne20)*std::pow(Y(C12), 2)*state.rho +
-screened_rates(k_C12_C12_to_He4_Ne20)*amrex::Math::powi<2>(Y(C12))*state.rho +
screened_rates(k_p_N15_to_He4_C12)*Y(N15)*Y(H1)*state.rho +
-screened_rates(k_C12_O16_to_He4_Mg24)*Y(C12)*Y(O16)*state.rho +
0.16666666666666667*screened_rates(k_He4_He4_He4_to_C12)*std::pow(Y(He4), 3)*std::pow(state.rho, 2);
0.16666666666666667*screened_rates(k_He4_He4_He4_to_C12)*amrex::Math::powi<3>(Y(He4))*amrex::Math::powi<2>(state.rho);

ydot_nuc(C13) =
screened_rates(k_N13_to_C13_weak_wc12)*Y(N13) +
Expand Down Expand Up @@ -747,7 +747,7 @@ void rhs_nuc(const burn_t& state,
screened_rates(k_He4_O16_to_Ne20)*Y(He4)*Y(O16)*state.rho +
screened_rates(k_p_F19_to_Ne20)*Y(F19)*Y(H1)*state.rho +
-screened_rates(k_He4_Ne20_to_Mg24)*Y(He4)*Y(Ne20)*state.rho +
0.5*screened_rates(k_C12_C12_to_He4_Ne20)*std::pow(Y(C12), 2)*state.rho +
0.5*screened_rates(k_C12_C12_to_He4_Ne20)*amrex::Math::powi<2>(Y(C12))*state.rho +
-screened_rates(k_p_Ne20_to_He4_F17)*Y(Ne20)*Y(H1)*state.rho;

ydot_nuc(Mg22) =
Expand Down Expand Up @@ -865,7 +865,7 @@ void jac_nuc(const burn_t& state,
scratch = screened_rates(k_p_F18_to_He4_O15)*Y(F18)*state.rho + screened_rates(k_p_F19_to_He4_O16)*Y(F19)*state.rho + screened_rates(k_p_N15_to_He4_C12)*Y(N15)*state.rho + screened_rates(k_p_Ne20_to_He4_F17)*Y(Ne20)*state.rho + screened_rates(k_p_O17_to_He4_N14)*Y(O17)*state.rho + screened_rates(k_p_O18_to_He4_N15)*Y(O18)*state.rho;
jac.set(He4, H1, scratch);

scratch = -screened_rates(k_He4_C12_to_O16)*Y(C12)*state.rho - 1.5*screened_rates(k_He4_He4_He4_to_C12)*std::pow(Y(He4), 2)*std::pow(state.rho, 2) - screened_rates(k_He4_N13_to_p_O16)*Y(N13)*state.rho - screened_rates(k_He4_N14_to_F18)*Y(N14)*state.rho - screened_rates(k_He4_N15_to_F19)*Y(N15)*state.rho - screened_rates(k_He4_Ne18_to_Mg22)*Y(Ne18)*state.rho - screened_rates(k_He4_Ne20_to_Mg24)*Y(Ne20)*state.rho - screened_rates(k_He4_O14_to_Ne18)*Y(O14)*state.rho - screened_rates(k_He4_O14_to_p_F17)*Y(O14)*state.rho - screened_rates(k_He4_O15_to_Ne19)*Y(O15)*state.rho - screened_rates(k_He4_O16_to_Ne20)*Y(O16)*state.rho;
scratch = -screened_rates(k_He4_C12_to_O16)*Y(C12)*state.rho - 1.5*screened_rates(k_He4_He4_He4_to_C12)*amrex::Math::powi<2>(Y(He4))*amrex::Math::powi<2>(state.rho) - screened_rates(k_He4_N13_to_p_O16)*Y(N13)*state.rho - screened_rates(k_He4_N14_to_F18)*Y(N14)*state.rho - screened_rates(k_He4_N15_to_F19)*Y(N15)*state.rho - screened_rates(k_He4_Ne18_to_Mg22)*Y(Ne18)*state.rho - screened_rates(k_He4_Ne20_to_Mg24)*Y(Ne20)*state.rho - screened_rates(k_He4_O14_to_Ne18)*Y(O14)*state.rho - screened_rates(k_He4_O14_to_p_F17)*Y(O14)*state.rho - screened_rates(k_He4_O15_to_Ne19)*Y(O15)*state.rho - screened_rates(k_He4_O16_to_Ne20)*Y(O16)*state.rho;
jac.set(He4, He4, scratch);

scratch = 1.0*screened_rates(k_C12_C12_to_He4_Ne20)*Y(C12)*state.rho + screened_rates(k_C12_O16_to_He4_Mg24)*Y(O16)*state.rho - screened_rates(k_He4_C12_to_O16)*Y(He4)*state.rho;
Expand Down Expand Up @@ -910,7 +910,7 @@ void jac_nuc(const burn_t& state,
scratch = -screened_rates(k_p_C12_to_N13)*Y(C12)*state.rho + screened_rates(k_p_N15_to_He4_C12)*Y(N15)*state.rho;
jac.set(C12, H1, scratch);

scratch = -screened_rates(k_He4_C12_to_O16)*Y(C12)*state.rho + 0.5*screened_rates(k_He4_He4_He4_to_C12)*std::pow(Y(He4), 2)*std::pow(state.rho, 2);
scratch = -screened_rates(k_He4_C12_to_O16)*Y(C12)*state.rho + 0.5*screened_rates(k_He4_He4_He4_to_C12)*amrex::Math::powi<2>(Y(He4))*amrex::Math::powi<2>(state.rho);
jac.set(C12, He4, scratch);

scratch = -2.0*screened_rates(k_C12_C12_to_He4_Ne20)*Y(C12)*state.rho - screened_rates(k_C12_O16_to_He4_Mg24)*Y(O16)*state.rho - screened_rates(k_He4_C12_to_O16)*Y(He4)*state.rho - screened_rates(k_p_C12_to_N13)*Y(H1)*state.rho;
Expand Down
Binary file modified networks/CNO_extras/cno_extras.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified networks/CNO_extras/cno_extras_hide_alpha.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions networks/ECSN/actual_rhs.H
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ void rhs_nuc(const burn_t& state,
ydot_nuc(H1) =
-screened_rates(k_p_Al27_to_Si28)*Y(Al27)*Y(H1)*state.rho +
-screened_rates(k_p_P31_to_S32)*Y(P31)*Y(H1)*state.rho +
0.5*screened_rates(k_O16_O16_to_p_P31)*std::pow(Y(O16), 2)*state.rho +
0.5*screened_rates(k_O16_O16_to_p_P31)*amrex::Math::powi<2>(Y(O16))*state.rho +
(-screened_rates(k_p_Al27_to_He4_Mg24)*Y(Al27)*Y(H1)*state.rho + screened_rates(k_He4_Mg24_to_p_Al27)*Y(He4)*Y(Mg24)*state.rho) +
(-screened_rates(k_p_P31_to_He4_Si28)*Y(P31)*Y(H1)*state.rho + screened_rates(k_He4_Si28_to_p_P31)*Y(He4)*Y(Si28)*state.rho);

Expand All @@ -326,14 +326,14 @@ void rhs_nuc(const burn_t& state,
-screened_rates(k_He4_Mg24_to_Si28)*Y(He4)*Y(Mg24)*state.rho +
-screened_rates(k_He4_Al27_to_P31)*Y(Al27)*Y(He4)*state.rho +
-screened_rates(k_He4_Si28_to_S32)*Y(He4)*Y(Si28)*state.rho +
0.5*screened_rates(k_O16_O16_to_He4_Si28)*std::pow(Y(O16), 2)*state.rho +
0.5*screened_rates(k_O16_O16_to_He4_Si28)*amrex::Math::powi<2>(Y(O16))*state.rho +
(screened_rates(k_p_Al27_to_He4_Mg24)*Y(Al27)*Y(H1)*state.rho + -screened_rates(k_He4_Mg24_to_p_Al27)*Y(He4)*Y(Mg24)*state.rho) +
(screened_rates(k_p_P31_to_He4_Si28)*Y(P31)*Y(H1)*state.rho + -screened_rates(k_He4_Si28_to_p_P31)*Y(He4)*Y(Si28)*state.rho);

ydot_nuc(O16) =
(-screened_rates(k_He4_O16_to_Ne20)*Y(He4)*Y(O16)*state.rho + screened_rates(k_Ne20_to_He4_O16)*Y(Ne20)) +
-screened_rates(k_O16_O16_to_p_P31)*std::pow(Y(O16), 2)*state.rho +
-screened_rates(k_O16_O16_to_He4_Si28)*std::pow(Y(O16), 2)*state.rho;
-screened_rates(k_O16_O16_to_p_P31)*amrex::Math::powi<2>(Y(O16))*state.rho +
-screened_rates(k_O16_O16_to_He4_Si28)*amrex::Math::powi<2>(Y(O16))*state.rho;

ydot_nuc(O20) =
(-screened_rates(k_O20_to_F20)*Y(O20) + screened_rates(k_F20_to_O20)*Y(F20));
Expand Down Expand Up @@ -361,13 +361,13 @@ void rhs_nuc(const burn_t& state,
screened_rates(k_He4_Mg24_to_Si28)*Y(He4)*Y(Mg24)*state.rho +
screened_rates(k_p_Al27_to_Si28)*Y(Al27)*Y(H1)*state.rho +
-screened_rates(k_He4_Si28_to_S32)*Y(He4)*Y(Si28)*state.rho +
0.5*screened_rates(k_O16_O16_to_He4_Si28)*std::pow(Y(O16), 2)*state.rho +
0.5*screened_rates(k_O16_O16_to_He4_Si28)*amrex::Math::powi<2>(Y(O16))*state.rho +
(screened_rates(k_p_P31_to_He4_Si28)*Y(P31)*Y(H1)*state.rho + -screened_rates(k_He4_Si28_to_p_P31)*Y(He4)*Y(Si28)*state.rho);

ydot_nuc(P31) =
screened_rates(k_He4_Al27_to_P31)*Y(Al27)*Y(He4)*state.rho +
-screened_rates(k_p_P31_to_S32)*Y(P31)*Y(H1)*state.rho +
0.5*screened_rates(k_O16_O16_to_p_P31)*std::pow(Y(O16), 2)*state.rho +
0.5*screened_rates(k_O16_O16_to_p_P31)*amrex::Math::powi<2>(Y(O16))*state.rho +
(-screened_rates(k_p_P31_to_He4_Si28)*Y(P31)*Y(H1)*state.rho + screened_rates(k_He4_Si28_to_p_P31)*Y(He4)*Y(Si28)*state.rho);

ydot_nuc(S32) =
Expand Down
12 changes: 6 additions & 6 deletions networks/He-C-Fe-group/actual_network.H
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ namespace Rates
k_Fe55_to_Mn55 = 87,
k_Fe56_to_Co56 = 88,
k_Mn55_to_Fe55 = 89,
k_Ni56_to_Co56 = 90,
k_Ni57_to_Co57 = 91,
k_n_to_p = 92,
k_n_to_p = 90,
k_Ni56_to_Co56 = 91,
k_Ni57_to_Co57 = 92,
k_p_to_n = 93,
k_S32_He4_to_Ar36_approx = 94,
k_Ar36_to_S32_He4_approx = 95,
Expand Down Expand Up @@ -303,9 +303,9 @@ namespace Rates
"Fe55_to_Mn55", // 87,
"Fe56_to_Co56", // 88,
"Mn55_to_Fe55", // 89,
"Ni56_to_Co56", // 90,
"Ni57_to_Co57", // 91,
"n_to_p", // 92,
"n_to_p", // 90,
"Ni56_to_Co56", // 91,
"Ni57_to_Co57", // 92,
"p_to_n", // 93,
"S32_He4_to_Ar36_approx", // 94,
"Ar36_to_S32_He4_approx", // 95,
Expand Down
2 changes: 1 addition & 1 deletion networks/He-C-Fe-group/actual_network_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ namespace NSE_INDEX
-1, -1, 26, -1, -1, 22, 89,
-1, -1, 27, -1, -1, 29, -1,
-1, -1, 22, -1, -1, 26, -1,
-1, -1, 0, -1, -1, 1, -1,
-1, -1, 31, -1, -1, 29, 84,
-1, -1, 32, -1, -1, 30, 85,
-1, -1, 0, -1, -1, 1, -1,
-1, -1, 1, -1, -1, 0, -1,
-1, 2, 16, -1, -1, 17, 95,
-1, -1, 17, -1, 2, 16, -1,
Expand Down
Loading

0 comments on commit 32fa759

Please sign in to comment.