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 1 commit
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
10 changes: 8 additions & 2 deletions integration/nse_update_simplified_sdc.H
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ 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);

Real snu_old = snu;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you meant to put snu_old outside just like the NSE_NET version below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

#endif

// get the current NSE state from the table -- this will be used
// to compute the NSE evolution sources
Expand Down Expand Up @@ -163,9 +165,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 +267,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 +366,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