diff --git a/Src/Amr/AMReX_Amr.cpp b/Src/Amr/AMReX_Amr.cpp index 946d71e37cc..7ebe9ce28dc 100644 --- a/Src/Amr/AMReX_Amr.cpp +++ b/Src/Amr/AMReX_Amr.cpp @@ -2108,8 +2108,15 @@ Amr::coarseTimeStep (Real stop_time) cumtime += dt_level[0]; - amr_level[0]->postCoarseTimeStep(cumtime); + // sync up statedata time + for (int lev = 0; lev <= finestLevel(); ++lev) { + AmrLevel& amrlevel = getLevel(lev); + for (auto& statedata : amrlevel.state) { + statedata.syncNewTimeLevel(cumtime); + } + } + amr_level[0]->postCoarseTimeStep(cumtime); if (verbose > 0) { diff --git a/Src/Amr/AMReX_AmrLevel.H b/Src/Amr/AMReX_AmrLevel.H index bd61de4a082..32e91f0e64d 100644 --- a/Src/Amr/AMReX_AmrLevel.H +++ b/Src/Amr/AMReX_AmrLevel.H @@ -614,7 +614,7 @@ void AmrLevel::RK (int order, int state_type, Real time, Real dt, int iteration, MultiFab& S_new = get_new_data(state_type); const Real t_old = state[state_type].prevTime(); const Real t_new = state[state_type].curTime(); - AMREX_ALWAYS_ASSERT(amrex::almostEqual(time,t_old) && amrex::almostEqual(time+dt,t_new)); + AMREX_ALWAYS_ASSERT(amrex::almostEqual(time,t_old,10) && amrex::almostEqual(time+dt,t_new,10)); if (order == 2) { RungeKutta::RK2(S_old, S_new, time, dt, std::forward(f), diff --git a/Src/Amr/AMReX_AmrLevel.cpp b/Src/Amr/AMReX_AmrLevel.cpp index c82b5e385cd..34750985367 100644 --- a/Src/Amr/AMReX_AmrLevel.cpp +++ b/Src/Amr/AMReX_AmrLevel.cpp @@ -40,16 +40,8 @@ AmrLevel::post_timestep (int /*iteration*/) } void -AmrLevel::postCoarseTimeStep (Real time) +AmrLevel::postCoarseTimeStep (Real /*time*/) { - BL_ASSERT(level == 0); - // sync up statedata time - for (int lev = 0; lev <= parent->finestLevel(); ++lev) { - AmrLevel& amrlevel = parent->getLevel(lev); - for (int i = 0; i < amrlevel.state.size(); ++i) { - amrlevel.state[i].syncNewTimeLevel(time); - } - } } void