diff options
Diffstat (limited to 'Source/BoundaryConditions/PML.cpp')
-rw-r--r-- | Source/BoundaryConditions/PML.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Source/BoundaryConditions/PML.cpp b/Source/BoundaryConditions/PML.cpp index 276641f38..9a1c25c7d 100644 --- a/Source/BoundaryConditions/PML.cpp +++ b/Source/BoundaryConditions/PML.cpp @@ -190,7 +190,7 @@ SigmaBox::SigmaBox (const Box& box, const BoxArray& grids, const Real* dx, int n #if (AMREX_SPACEDIM >= 2) int jdim = (idim+1) % AMREX_SPACEDIM; #endif -#if (AMREX_SPACEDIM == 3) +#if defined(WARPX_DIM_3D) int kdim = (idim+2) % AMREX_SPACEDIM; #endif @@ -208,7 +208,7 @@ SigmaBox::SigmaBox (const Box& box, const BoxArray& grids, const Real* dx, int n { side_faces.push_back(kv.first); } -#if (AMREX_SPACEDIM == 3) +#if defined(WARPX_DIM_3D) else if (amrex::grow(grid_box, kdim, ncell).intersects(box)) { side_faces.push_back(kv.first); @@ -243,7 +243,7 @@ SigmaBox::SigmaBox (const Box& box, const BoxArray& grids, const Real* dx, int n Box lobox = amrex::adjCellLo(grid_box, idim, ncell); lobox.grow(jdim,ncell); -#if (AMREX_SPACEDIM == 3) +#if defined(WARPX_DIM_3D) lobox.grow(kdim,ncell); #endif Box looverlap = lobox & box; @@ -255,7 +255,7 @@ SigmaBox::SigmaBox (const Box& box, const BoxArray& grids, const Real* dx, int n Box hibox = amrex::adjCellHi(grid_box, idim, ncell); hibox.grow(jdim,ncell); -#if (AMREX_SPACEDIM == 3) +#if defined(WARPX_DIM_3D) hibox.grow(kdim,ncell); #endif Box hioverlap = hibox & box; @@ -271,7 +271,7 @@ SigmaBox::SigmaBox (const Box& box, const BoxArray& grids, const Real* dx, int n } #endif -#if (AMREX_SPACEDIM == 3) +#if defined(WARPX_DIM_3D) for (auto gid : side_side_edges) { const Box& grid_box = grids[gid]; @@ -315,7 +315,7 @@ SigmaBox::SigmaBox (const Box& box, const BoxArray& grids, const Real* dx, int n for (auto gid : side_faces) { const Box& grid_box = grids[gid]; -#if (AMREX_SPACEDIM == 2) +#if defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ) const Box& overlap = amrex::grow(grid_box,jdim,ncell) & box; #else const Box& overlap = amrex::grow(amrex::grow(grid_box,jdim,ncell),kdim,ncell) & box; @@ -541,11 +541,11 @@ PML::PML (const int lev, const BoxArray& grid_ba, const DistributionMapping& /*g queryWithParser(pp_psatd, "ny_guard", ngFFt_y); queryWithParser(pp_psatd, "nz_guard", ngFFt_z); -#if (AMREX_SPACEDIM == 3) +#if defined(WARPX_DIM_3D) IntVect ngFFT = IntVect(ngFFt_x, ngFFt_y, ngFFt_z); -#elif (AMREX_SPACEDIM == 2) +#elif defined(WARPX_DIM_XZ) || defined(WARPX_DIM_RZ) IntVect ngFFT = IntVect(ngFFt_x, ngFFt_z); -#elif (AMREX_SPACEDIM == 1) +#elif defined(WARPX_DIM_1D_Z) IntVect ngFFT = IntVect(ngFFt_z); #endif @@ -796,7 +796,7 @@ PML::MakeBoxArray (const amrex::Geometry& geom, const amrex::BoxArray& grid_ba, bx &= domain; Vector<Box> bndryboxes; -#if (AMREX_SPACEDIM == 3) +#if defined(WARPX_DIM_3D) int kbegin = -1, kend = 1; #else int kbegin = 0, kend = 0; |