44#include " core/def/phare_mpi.hpp" // IWYU pragma: keep
55
66#include " core/numerics/ohm/ohm.hpp"
7+ #include " core/utilities/mpi_utils.hpp"
78#include " core/numerics/ampere/ampere.hpp"
89#include " core/data/vecfield/vecfield.hpp"
910#include " core/numerics/faraday/faraday.hpp"
@@ -553,13 +554,20 @@ void SolverPPC<HybridModel, AMR_Types>::moveIons_(level_t& level, ModelViews_t&
553554 TimeSetter setTime{views, newTime};
554555 auto const & levelBoxing = boxing[level.getLevelNumber ()];
555556
557+ try
556558 {
557559 auto dt = newTime - currentTime;
558560 for (auto & state : views)
559561 ionUpdater_.updatePopulations (
560562 state.ions , state.electromagAvg ,
561563 levelBoxing.at (amr::to_string (state.patch ->getGlobalId ())), dt, mode);
562564 }
565+ catch (core::DictionaryException const & ex)
566+ {
567+ PHARE_LOG_ERROR (ex ());
568+ }
569+ if (core::mpi::any (core::Errors::instance ().any ()))
570+ throw core::DictionaryException{}(" ID" , " Updater::updatePopulations" );
563571
564572 // this needs to be done before calling the messenger
565573 setTime ([](auto & state) -> auto & { return state.ions ; });
@@ -569,17 +577,8 @@ void SolverPPC<HybridModel, AMR_Types>::moveIons_(level_t& level, ModelViews_t&
569577 fromCoarser.fillIonPopMomentGhosts (views.model ().state .ions , level, newTime);
570578 fromCoarser.fillIonGhostParticles (views.model ().state .ions , level, newTime);
571579
572- try
573- {
574- for (auto & state : views)
575- ionUpdater_.updateIons (state.ions );
576- }
577- catch (core::DictionaryException const & ex)
578- {
579- PHARE_LOG_ERROR (ex ());
580- }
581- if (core::mpi::any (core::Errors::instance ().any ()))
582- throw core::DictionaryException{}(" ID" , " Updater::updatePopulations" );
580+ for (auto & state : views)
581+ ionUpdater_.updateIons (state.ions );
583582
584583 // no need to update time, since it has been done before
585584 // now Ni and Vi are calculated we can fill pure ghost nodes
0 commit comments