Skip to content

Commit

Permalink
use copy_cons_to_burn_type for simplified-SDC (#2603)
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale authored Oct 7, 2023
1 parent cfdaee1 commit c9604bf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 20 deletions.
22 changes: 3 additions & 19 deletions Source/reactions/Castro_react.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifdef MODEL_PARSER
#include <model_parser.H>
#endif
#include <sdc_cons_to_burn.H>

using std::string;
using namespace amrex;
Expand Down Expand Up @@ -583,24 +584,9 @@ Castro::react_state(Real time, Real dt)
}

// Feed in the old-time state data.
// this also sets burn_state.{rho,T}

burn_state.y[SRHO] = U_old(i,j,k,URHO);
burn_state.y[SMX] = U_old(i,j,k,UMX);
burn_state.y[SMY] = U_old(i,j,k,UMY);
burn_state.y[SMZ] = U_old(i,j,k,UMZ);
burn_state.y[SEDEN] = U_old(i,j,k,UEDEN);
burn_state.y[SEINT] = U_old(i,j,k,UEINT);
for (int n = 0; n < NumSpec; n++) {
burn_state.y[SFS+n] = U_old(i,j,k,UFS+n);
}
#if NAUX_NET > 0
for (int n = 0; n < NumAux; n++) {
burn_state.y[SFX+n] = U_old(i,j,k,UFX+n);
}
#endif

// we need an initial T guess for the EOS
burn_state.T = U_old(i,j,k,UTEMP);
copy_cons_to_burn_type(i, j, k, U_old, burn_state);

burn_state.T_fixed = -1.e30_rt;

Expand Down Expand Up @@ -629,8 +615,6 @@ Castro::react_state(Real time, Real dt)
}
#endif

burn_state.rho = burn_state.y[SRHO];

// Don't burn if we're outside of the relevant (rho, T) range.

if (U_old(i,j,k,UTEMP) < castro::react_T_min || U_old(i,j,k,UTEMP) > castro::react_T_max ||
Expand Down
1 change: 1 addition & 0 deletions Source/reactions/Make.package
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# this is included when USE_REACT = TRUE

CEXE_headers += Castro_react.H
CEXE_headers += sdc_const_to_burn.H

CEXE_sources += Castro_react.cpp
CEXE_headers += Castro_react_util.H
File renamed without changes.
1 change: 0 additions & 1 deletion Source/sdc/Make.package
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
CEXE_headers += Castro_sdc.H
CEXE_headers += sdc_const_to_burn.H

CEXE_sources += sdc_util.cpp

Expand Down

0 comments on commit c9604bf

Please sign in to comment.