Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrap SDC+NSE neutrino calls with NEUTRINOS #1400

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Changes from all commits
Commits
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
11 changes: 8 additions & 3 deletions integration/nse_update_simplified_sdc.H
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ void sdc_nse_burn(BurnT& state, const Real dt) {
Real abar = state.y[SFX+iabar] / rho_old;
Real zbar = abar * ye_in;

#ifdef NEUTRINOS
constexpr int do_derivatives = 0;
sneut5<do_derivatives>(T_in, rho_old, abar, zbar,
snu, dsnudt, dsnudd, dsnuda, dsnudz);

#endif
Real snu_old = snu;

// get the current NSE state from the table -- this will be used
Expand Down Expand Up @@ -163,9 +164,10 @@ void sdc_nse_burn(BurnT& state, const Real dt) {

// now get the updated neutrino term
zbar = abar_out * eos_state.aux[iye];
#ifdef NEUTRINOS
sneut5<do_derivatives>(T_new, eos_state.rho, abar_out, zbar,
snu, dsnudt, dsnudd, dsnuda, dsnudz);

#endif
rho_enucdot -= 0.5_rt * rho_half * (snu_old + snu);

// update the new state for the next pass
Expand Down Expand Up @@ -264,10 +266,11 @@ void sdc_nse_burn(BurnT& state, const Real dt) {
abar = 1.0 / abar;
zbar *= abar;

#ifdef NEUTRINOS
constexpr int do_derivatives = 0;
sneut5<do_derivatives>(T_in, rho_old, abar, zbar,
snu, dsnudt, dsnudd, dsnuda, dsnudz);

#endif
Real snu_old = snu;


Expand Down Expand Up @@ -362,9 +365,11 @@ void sdc_nse_burn(BurnT& state, const Real dt) {
abar = 1.0 / abar;
zbar *= abar;

#ifdef NEUTRINOS
constexpr int do_derivatives = 0;
sneut5<do_derivatives>(T_new, state.y[SRHO], abar, zbar,
snu, dsnudt, dsnudd, dsnuda, dsnudz);
#endif

rho_enucdot -= 0.5_rt * rho_half * (snu_old + snu);

Expand Down