From f8e8439f97a55aeb99c756d5842a2f7902a3c453 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Thu, 9 Jul 2020 10:32:45 -0700 Subject: [PATCH] Use the new AMReX face interpolator for grad phi (#1123) This fixes #469 and fixes #1118 by ensuring that the interpolator for grad phi (used when gravity.max_solve_level is in play) is valid for nodal data. --- CHANGES.md | 3 +++ Source/driver/Castro.cpp | 4 ++-- Source/gravity/Gravity.cpp | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 1f93e318e1..114d871786 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,8 @@ # 20.08 + * An issue with gravity.max_solve_level resulting in accesses to invalid data + (#469, #1118) has been resolved. (#1123) + * If castro.speed_limit is set to a number greater than zero, this will now be strictly enforced on the magnitude of the velocity. (#1115) diff --git a/Source/driver/Castro.cpp b/Source/driver/Castro.cpp index e73cceeee9..5c5dc1d835 100644 --- a/Source/driver/Castro.cpp +++ b/Source/driver/Castro.cpp @@ -2226,9 +2226,9 @@ Castro::post_regrid (int lbase, GradPhiPhysBCFunct gp_phys_bc; - // We need to use a nodal interpolater. + // We need to use a interpolater that works with data on faces. - Interpolater* gp_interp = &node_bilinear_interp; + Interpolater* gp_interp = &face_linear_interp; Vector grad_phi_coarse = amrex::GetVecOfPtrs(gravity->get_grad_phi_prev(level-1)); Vector grad_phi_fine = amrex::GetVecOfPtrs(gravity->get_grad_phi_curr(level)); diff --git a/Source/gravity/Gravity.cpp b/Source/gravity/Gravity.cpp index 001a199b90..b17c1f627a 100644 --- a/Source/gravity/Gravity.cpp +++ b/Source/gravity/Gravity.cpp @@ -826,9 +826,9 @@ Gravity::actual_multilevel_solve (int crse_level, int finest_level_in, GradPhiPhysBCFunct gp_phys_bc; - // We need to use a nodal interpolater. + // We need to use a interpolater that works with data on faces. - Interpolater* gp_interp = &node_bilinear_interp; + Interpolater* gp_interp = &face_linear_interp; // For the BCs, we will use the Gravity_Type BCs for convenience, but these will // not do anything because we do not fill on physical boundaries.