Skip to content

Commit

Permalink
only swap fc vars if > 0
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWibking committed Jan 15, 2024
1 parent 3935c0b commit 8a31244
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/RadhydroSimulation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,9 @@ template <typename problem_t> void RadhydroSimulation<problem_t>::advanceSingleT

// since we are starting a new timestep, need to swap old and new state vectors
std::swap(state_old_cc_[lev], state_new_cc_[lev]);
std::swap(state_old_fc_[lev], state_new_fc_[lev]);
if (Physics_Indices<problem_t>::nvarTotal_fc > 0) {
std::swap(state_old_fc_[lev], state_new_fc_[lev]);
}

// check hydro states before update (this can be caused by the flux register!)
CHECK_HYDRO_STATES(state_old_cc_[lev]);
Expand Down

0 comments on commit 8a31244

Please sign in to comment.