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

use copy_cons_to_burn_type for simplified-SDC #2603

Merged
merged 2 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
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
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