Skip to content

Commit 2449f5d

Browse files
authored
in SDC react, switch to multiplying by (1 / dt) (#3194)
1 parent 47bff38 commit 2449f5d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Source/reactions/Castro_react.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -744,17 +744,17 @@ Castro::react_state(Real time, Real dt)
744744
// part.
745745

746746
// rho enuc
747-
react_src(i,j,k,0) = (U_new(i,j,k,UEINT) - U_old(i,j,k,UEINT)) / dt - burn_state.ydot_a[SEINT];
747+
react_src(i,j,k,0) = (U_new(i,j,k,UEINT) - U_old(i,j,k,UEINT)) * dtInv - burn_state.ydot_a[SEINT];
748748

749749
if (store_omegadot) {
750750
// rho omegadot_k
751751
for (int n = 0; n < NumSpec; ++n) {
752-
react_src(i,j,k,1+n) = (U_new(i,j,k,UFS+n) - U_old(i,j,k,UFS+n)) / dt - burn_state.ydot_a[SFS+n];
752+
react_src(i,j,k,1+n) = (U_new(i,j,k,UFS+n) - U_old(i,j,k,UFS+n)) * dtInv - burn_state.ydot_a[SFS+n];
753753
}
754754
#if NAUX_NET > 0
755755
// rho auxdot_k
756756
for (int n = 0; n < NumAux; ++n) {
757-
react_src(i,j,k,1+n+NumSpec) = (U_new(i,j,k,UFX+n) - U_old(i,j,k,UFX+n)) / dt - burn_state.ydot_a[SFX+n];
757+
react_src(i,j,k,1+n+NumSpec) = (U_new(i,j,k,UFX+n) - U_old(i,j,k,UFX+n)) * dtInv - burn_state.ydot_a[SFX+n];
758758
}
759759
#endif
760760
}

0 commit comments

Comments
 (0)