From 3ef8e08c65dfd04bc98c8b9238b9f230d4c10cde Mon Sep 17 00:00:00 2001 From: Revathi Jambunathan <41089244+RevathiJambunathan@users.noreply.github.com> Date: Fri, 24 Apr 2020 16:22:22 -0700 Subject: Re-initialize diag functors after LoadBalance (#943) * fixing bug to initialize CellCenterFunctor for Bx * new function to initialize diag functors called from regrid * add comments and clean * more cleaning * use of unique_ptrs to prevent memory leak * fixing eol * Apply suggestions from code review Co-Authored-By: MaxThevenet * rho_new in PSATD defined using unique_ptr * initialize field functor per level * adding a comment for input lev * more comments * clearning * comments * space in function when called * fix eol Co-authored-by: MaxThevenet --- Source/Parallelization/WarpXRegrid.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Parallelization/WarpXRegrid.cpp') diff --git a/Source/Parallelization/WarpXRegrid.cpp b/Source/Parallelization/WarpXRegrid.cpp index bb5e5d9d8..ac8c81934 100644 --- a/Source/Parallelization/WarpXRegrid.cpp +++ b/Source/Parallelization/WarpXRegrid.cpp @@ -268,6 +268,8 @@ WarpX::RemakeLevel (int lev, Real /*time*/, const BoxArray& ba, const Distributi { amrex::Abort("RemakeLevel: to be implemented"); } + // Re-initialize diagnostic functors that stores pointers to the user-requested fields at level, lev. + multi_diags->InitializeFieldFunctors( lev ); } void -- cgit v1.2.3