Skip to content

Commit

Permalink
remove dabardt from the NSE output
Browse files Browse the repository at this point in the history
we never use it and the interpolation can be expensive
  • Loading branch information
zingale committed Feb 17, 2024
1 parent 53d2621 commit f2adcb9
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 20 deletions.
2 changes: 0 additions & 2 deletions nse_tabular/nse_table.H
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ void nse_interp(nse_table_t& nse_state, bool skip_X_fill=false) {
nse_state.abar = trilinear(ir1, it1, ic1, rholog, tlog, yet, abartab);
nse_state.bea = trilinear(ir1, it1, ic1, rholog, tlog, yet, beatab);
nse_state.dyedt = trilinear(ir1, it1, ic1, rholog, tlog, yet, dyedttab);
nse_state.dabardt = trilinear(ir1, it1, ic1, rholog, tlog, yet, dabardttab);
nse_state.dbeadt = trilinear(ir1, it1, ic1, rholog, tlog, yet, dbeadttab);
nse_state.e_nu = trilinear(ir1, it1, ic1, rholog, tlog, yet, enutab);

Expand Down Expand Up @@ -465,7 +464,6 @@ void nse_interp(nse_table_t& nse_state, bool skip_X_fill=false) {
nse_state.abar = tricubic(ir0, it0, ic0, rholog, tlog, yet, abartab);
nse_state.bea = tricubic(ir0, it0, ic0, rholog, tlog, yet, beatab);
nse_state.dyedt = tricubic(ir0, it0, ic0, rholog, tlog, yet, dyedttab);
nse_state.dabardt = tricubic(ir0, it0, ic0, rholog, tlog, yet, dabardttab);
nse_state.dbeadt = tricubic(ir0, it0, ic0, rholog, tlog, yet, dbeadttab);
nse_state.e_nu = tricubic(ir0, it0, ic0, rholog, tlog, yet, enutab);

Expand Down
1 change: 0 additions & 1 deletion nse_tabular/nse_table_type.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ struct nse_table_t {
amrex::Real abar{};
amrex::Real bea{};
amrex::Real dyedt{};
amrex::Real dabardt{};
amrex::Real dbeadt{};
amrex::Real e_nu{};
amrex::Real X[NumSpec]{};
Expand Down
1 change: 0 additions & 1 deletion unit_test/nse_table_cell/nse_cell.H
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ void nse_cell_c()
std::cout << "Abar = " << abar << std::endl;
std::cout << "<B/A> = " << dq << std::endl;
std::cout << "dYe/dt = " << dyedt << std::endl;
std::cout << "dAbar/dt = " << dabardt << std::endl;
std::cout << "d<B/A>/dt = " << dbeadt << std::endl;
for (int n = 0; n < NumSpec; ++n) {
std::cout << "X(" << short_spec_names_cxx[n] << ") = " << X[n] << std::endl;
Expand Down
5 changes: 0 additions & 5 deletions unit_test/test_nse_interp/ci-benchmarks/aprox19.out
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ tricubic interpolated values:
abar = 55.60652462
bea = 8.755119523
dyedt = -0.004527880871
dabardt = 1.310223024e-16
dbeadt = 0.000111945508
e_nu = 1.101641642e+16
X(H1) = 0
Expand All @@ -60,19 +59,15 @@ X(p) = 9.843630258e-06

testing temperature derivatives of cubic
first finite-difference derivatives
dAbar/dT = -1.072562355e-09
dbea/dT = -6.867059575e-12
now using derivative of the interpolant
dAbar/dT = -1.072562604e-09
dbea/dT = -6.867048589e-12


testing density derivatives of cubic
first finite-difference derivatives
dAbar/drho = 3.987525411e-10
dbea/drho = 7.619559936e-13
now using derivative of the interpolant
dAbar/drho = 3.987522836e-10
dbea/drho = 7.618831514e-13

EOS T from e consistency check (old method): 1.395278886e+18 1.38844906e+18
Expand Down
11 changes: 0 additions & 11 deletions unit_test/test_nse_interp/nse_cell.H
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ void nse_cell_c()
std::cout << "abar = " << nse_state.abar << std::endl;
std::cout << "bea = " << nse_state.bea << std::endl;
std::cout << "dyedt = " << nse_state.dyedt << std::endl;
std::cout << "dabardt = " << nse_state.dabardt << std::endl;
std::cout << "dbeadt = " << nse_state.dbeadt << std::endl;
std::cout << "e_nu = " << nse_state.e_nu << std::endl;
for (int n = 0; n < NumSpec; ++n) {
Expand Down Expand Up @@ -161,18 +160,13 @@ void nse_cell_c()

nse_interp(nse_state);

std::cout << "dAbar/dT = " << (nse_state.abar - abar_old) / (nse_state.T - T_old) << std::endl;
std::cout << "dbea/dT = " << (nse_state.bea - bea_old) / (nse_state.T - T_old) << std::endl;

std::cout << "now using derivative of the interpolant" << std::endl;

Real dabardT = nse_interp_dT(temperature, density, ye,
nse_table::abartab);

Real dbeadT = nse_interp_dT(temperature, density, ye,
nse_table::beatab);

std::cout << "dAbar/dT = " << dabardT << std::endl;
std::cout << "dbea/dT = " << dbeadT << std::endl;

std::cout << std::endl;
Expand All @@ -196,18 +190,13 @@ void nse_cell_c()

nse_interp(nse_state);

std::cout << "dAbar/drho = " << (nse_state.abar - abar_old) / (nse_state.rho - rho_old) << std::endl;
std::cout << "dbea/drho = " << (nse_state.bea - bea_old) / (nse_state.rho - rho_old) << std::endl;

std::cout << "now using derivative of the interpolant" << std::endl;

Real dabardrho = nse_interp_drho(temperature, density, ye,
nse_table::abartab);

Real dbeadrho = nse_interp_drho(temperature, density, ye,
nse_table::beatab);

std::cout << "dAbar/drho = " << dabardrho << std::endl;
std::cout << "dbea/drho = " << dbeadrho << std::endl;

std::cout << std::endl;
Expand Down

0 comments on commit f2adcb9

Please sign in to comment.