Skip to content

Commit

Permalink
copy new state to old
Browse files Browse the repository at this point in the history
  • Loading branch information
gardner48 committed Jun 17, 2024
1 parent 932dd8f commit b043d53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ExampleCodes/SUNDIALS/Source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ void main_main ()
// advance from state_old at time to state_new at time + dt
integrator.advance(state_old, state_new, time, dt);

// swap old/new and update time by dt
std::swap(state_old, state_new);
// update old state and update time by dt
amrex::MultiFab::Copy(state_old[0], state_new[0], 0, 0, Ncomp, Nghost);
time += dt;

// Tell the I/O Processor to write out which step we're doing
Expand Down

0 comments on commit b043d53

Please sign in to comment.