Skip to content

Commit 95cb860

Browse files
authored
remove redundant rhs and ydot for NSE_NET (#1507)
I think ydot was somehow needed before, but no longer the case.
1 parent 886498d commit 95cb860

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

nse_solver/nse_check.H

-30
Original file line numberDiff line numberDiff line change
@@ -587,14 +587,11 @@ bool in_nse(burn_t& current_state, bool skip_molar_check=false) {
587587
}
588588

589589
// set molar fractions
590-
// initialize ydot to store Ydot and energy generation rate.
591590

592591
amrex::Array1D<amrex::Real, 1, NumSpec> Y;
593-
amrex::Array1D<amrex::Real, 1, NumSpec + 1> ydot;
594592

595593
for (int n = 1; n <= NumSpec; ++n) {
596594
Y(n) = state.xn[n-1] * aion_inv[n-1];
597-
ydot(n) = 0.0_rt;
598595
}
599596

600597
rate_t rate_eval;
@@ -620,33 +617,6 @@ bool in_nse(burn_t& current_state, bool skip_molar_check=false) {
620617
t_s = state.dx / eos_state.cs;
621618
}
622619

623-
// Find ydot
624-
625-
rhs_nuc(state, ydot, Y, rate_eval.screened_rates);
626-
627-
// Find energy generation rate
628-
629-
amrex::Real enuc;
630-
ener_gener_rate(ydot, enuc);
631-
632-
// include any weak rate neutrino losses
633-
enuc += rate_eval.enuc_weak;
634-
635-
#ifdef NEUTRINOS
636-
// get abar and zbar
637-
composition(state);
638-
639-
amrex::Real sneut, dsneutdt, dsneutdd, snuda, snudz;
640-
constexpr int do_derivatives{0};
641-
sneut5<do_derivatives>(state.T, state.rho, state.abar, state.zbar, sneut, dsneutdt, dsneutdd, snuda, snudz);
642-
#else
643-
amrex::Real sneut = 0.0_rt;
644-
#endif
645-
646-
// fill in energy generation rate to ydot
647-
648-
ydot(NumSpec + 1) = enuc - sneut;
649-
650620
amrex::Array1D<int, 1, NumSpec> group_ind;
651621

652622
//

0 commit comments

Comments
 (0)