Skip to content
Draft
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
1 change: 1 addition & 0 deletions .github/workflows/good_defines.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ BL_FORT_USE_UPPERCASE
BL_LANG_FORT
BL_LAZY
BL_USE_SETBUF
CONS_SPECIES_HAVE_SOURCES
MODEL_PARSER
DIFFUSION
DO_PROBLEM_POST_INIT
Expand Down
8 changes: 3 additions & 5 deletions Source/driver/_variables
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
total-pressure QPTOT NQTHERM 1 MHD
total-reint QREITOT NQTHERM 1 RADIATION
radiation QRAD NQTHERM NGROUPS RADIATION
advected QFA None NumAdv None
species QFS None NumSpec None
auxiliary QFX None NumAux None
advected QFA [(NQSRC, CONS_SPECIES_HAVE_SOURCES)] NumAdv None
species QFS [(NQSRC, CONS_SPECIES_HAVE_SOURCES)] NumSpec None
auxiliary QFX [(NQSRC, CONS_SPECIES_HAVE_SOURCES)] NumAux None


# the auxiliary quantities
Expand All @@ -63,5 +63,3 @@
density GDRHO None 1 HYBRID_MOMENTUM
flux-limiter GDLAMS None NGROUPS RADIATION
radiation GDERADS None NGROUPS RADIATION


2 changes: 1 addition & 1 deletion Source/hydro/Castro_ctu_hydro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Castro::construct_ctu_hydro_source(Real time, Real dt) // NOLINT(readability-co
const Box& qbx = amrex::grow(bx, NUM_GROW);
const Box& qbx3 = amrex::grow(bx, 3);

#ifdef RADIATION
#if defined(RADIATION) || defined(CONS_SPECIES_HAVE_SOURCES)
q.resize(qbx, NQ);
#else
// note: we won't store the passives in q, so we'll compute their
Expand Down
9 changes: 9 additions & 0 deletions Source/hydro/advection_util.H
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ void src_to_prim(int i, int j, int k, const Real dt,
(srcQ(i,j,k,QREINT) - q_arr(i,j,k,QREINT) * srcQ(i,j,k,QRHO)*rhoinv) *
rhoinv + eos_state.dpdr_e * srcQ(i,j,k,QRHO);

#ifdef CONS_SPECIES_HAVE_SOURCES
// Do the passive variables, i.e. advected, species, and auxiliary

for (int ipassive = 0; ipassive < npassive; ipassive++) {
const int nc = upassmap(ipassive);
const int n = qpassmap(ipassive);
srcQ(i,j,k,n) = (srcU[nc] - q_arr(i,j,k,n) * srcQ(i,j,k,QRHO)) * rhoinv;
}
#endif
}

///
Expand Down
21 changes: 21 additions & 0 deletions Source/hydro/trace_ppm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,27 @@ Castro::trace_ppm(const Box& bx,
ppm_reconstruct(s, flat, sm, sp);
ppm_int_profile_single(sm, sp, s[i0], un, dtdL, Ip_passive, Im_passive);

#ifdef CONS_SPECIES_HAVE_SOURCES
// Now apply source term

Real Ip_src_passive;
Real Im_src_passive;

#ifndef AMREX_USE_GPU
do_trace = do_source_trace[n];
#else
do_trace = check_trace_source(srcQ, idir, i, j, k, n);
#endif
if (do_trace) {
load_stencil(srcQ, idir, i, j, k, n, s);
ppm_reconstruct(s, flat, sm, sp);
ppm_int_profile_single(sm, sp, s[i0], un, dtdL, Ip_src_passive, Im_src_passive);

Ip_passive += hdt * Ip_src_passive;
Im_passive += hdt * Im_src_passive;
}
#endif

// Plus state on face i

if ((idir == 0 && i >= vlo[0]) ||
Expand Down
Loading