From 173486ea736b380d7073349eb89d795a71975e01 Mon Sep 17 00:00:00 2001 From: Ann Almgren Date: Tue, 9 Apr 2024 15:42:47 -0700 Subject: [PATCH] fix plotfile multilevel writing (#1575) --- Source/IO/Plotfile.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Source/IO/Plotfile.cpp b/Source/IO/Plotfile.cpp index 9e9dc184d..253d353ce 100644 --- a/Source/IO/Plotfile.cpp +++ b/Source/IO/Plotfile.cpp @@ -1199,13 +1199,12 @@ ERF::WritePlotFile (int which, Vector plot_var_names) // Do piecewise interpolation of mf into mf2 for (int lev = 1; lev <= finest_level; ++lev) { -#ifdef _OPENMP -#pragma omp parallel if (amrex::Gpu::notInLaunchRegion()) -#endif - for (MFIter mfi(mf2[lev], TilingIfNotGPU()); mfi.isValid(); ++mfi) { - const Box& bx = mfi.tilebox(); - pcinterp_interp(bx,mf2[lev].array(mfi), 0, mf[lev].nComp(), mf[lev].const_array(mfi),0,r2[lev-1]); - } + Interpolater* mapper_c = &pc_interp; + InterpFromCoarseLevel(mf2[lev], t_new[lev], mf[lev], + 0, 0, ncomp_mf, + geom[lev], g2[lev], + null_bc_for_fill, 0, null_bc_for_fill, 0, + r2[lev-1], mapper_c, domain_bcs_type, 0); } // Define an effective ref_ratio which is isotropic to be passed into WriteMultiLevelPlotfile