From acb5f79738c71d14b2f2864cf982a6e5c66b8be8 Mon Sep 17 00:00:00 2001 From: Dave Grote Date: Mon, 10 Jun 2024 13:58:45 -0700 Subject: [PATCH] Remove unneeded macros from AllocLevelData --- Source/Parallelization/GuardCellManager.H | 2 +- Source/Parallelization/GuardCellManager.cpp | 2 +- Source/WarpX.cpp | 8 +------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 341db01bef6..561456943f1 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -52,7 +52,7 @@ public: */ void Init( amrex::Real dt, - amrex::RealVect dx, + const amrex::Real * dx, bool do_subcycling, bool do_fdtd_nci_corr, short grid_type, diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 28157e09d8c..321be15df7e 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -33,7 +33,7 @@ using namespace amrex; void guardCellManager::Init ( const amrex::Real dt, - const amrex::RealVect dx, + const amrex::Real *dx, const bool do_subcycling, const bool do_fdtd_nci_corr, const short grid_type, diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index d3f91002ef4..ef81aef4482 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -2120,13 +2120,7 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d { const bool aux_is_nodal = (field_gathering_algo == GatheringAlgo::MomentumConserving); -#if defined(WARPX_DIM_1D_Z) - const amrex::RealVect dx(WarpX::CellSize(lev)[2]); -#elif defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ) - const amrex::RealVect dx = {WarpX::CellSize(lev)[0], WarpX::CellSize(lev)[2]}; -#elif defined(WARPX_DIM_3D) - const amrex::RealVect dx = {WarpX::CellSize(lev)[0], WarpX::CellSize(lev)[1], WarpX::CellSize(lev)[2]}; -#endif + const Real* dx = Geom(lev).CellSize(); // Initialize filter before guard cells manager // (needs info on length of filter's stencil)