Skip to content

Commit

Permalink
Use the new AMReX face interpolator for grad phi (#1123)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
maximumcats authored Jul 9, 2020
1 parent 6cf00f7 commit f8e8439
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
4 changes: 2 additions & 2 deletions Source/driver/Castro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<MultiFab*> grad_phi_coarse = amrex::GetVecOfPtrs(gravity->get_grad_phi_prev(level-1));
Vector<MultiFab*> grad_phi_fine = amrex::GetVecOfPtrs(gravity->get_grad_phi_curr(level));
Expand Down
4 changes: 2 additions & 2 deletions Source/gravity/Gravity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit f8e8439

Please sign in to comment.