Skip to content

Commit

Permalink
swap the order of Poisson and the first burn for Strang (#2726)
Browse files Browse the repository at this point in the history
it should not matter which comes first, since reactions don't
change density, but this swap will allow us to precompute the
shock flag with sources before the first burn.
  • Loading branch information
zingale authored Apr 7, 2024
1 parent 21e2979 commit 49dcb5a
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions Source/sources/Castro_sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,15 @@ Castro::pre_advance_operators (Real time, Real dt) // NOLINT(readability-conver

advance_status status {};

// If we are using gravity, solve for the potential and
// gravitational field. note: since reactions don't change
// density, we can do this before or after the burn.

#ifdef GRAVITY
construct_old_gravity(time);
#endif


// If we are Strang splitting the reactions, do the old-time contribution now.

#ifndef TRUE_SDC
Expand All @@ -541,11 +550,6 @@ Castro::pre_advance_operators (Real time, Real dt) // NOLINT(readability-conver
#endif
#endif

// If we are using gravity, solve for the potential and gravitational field.

#ifdef GRAVITY
construct_old_gravity(time);
#endif

// Initialize the new-time data. This copy needs to come after all Strang-split operators.

Expand Down

0 comments on commit 49dcb5a

Please sign in to comment.