@@ -98,12 +98,12 @@ void Filter::DoFilter (const Box& tbx,
98
98
#if AMREX_SPACEDIM >= 2
99
99
amrex::Real const * AMREX_RESTRICT sy = stencil_y.data ();
100
100
#endif
101
- #if defined(WARPX_DIM_3D)
101
+ #if AMREX_SPACEDIM == 3
102
102
amrex::Real const * AMREX_RESTRICT sz = stencil_z.data ();
103
103
#endif
104
104
Dim3 slen_local = slen;
105
105
106
- #if defined(WARPX_DIM_3D)
106
+ #if AMREX_SPACEDIM == 3
107
107
AMREX_PARALLEL_FOR_4D ( tbx, ncomp, i, j, k, n,
108
108
{
109
109
Real d = 0.0 ;
@@ -279,10 +279,10 @@ void Filter::DoFilter (const Box& tbx,
279
279
const auto hi = amrex::ubound (tbx);
280
280
// tmp and dst are of type Array4 (Fortran ordering)
281
281
amrex::Real const * AMREX_RESTRICT sx = stencil_x.data ();
282
- #if ( AMREX_SPACEDIM >= 2)
282
+ #if AMREX_SPACEDIM >= 2
283
283
amrex::Real const * AMREX_RESTRICT sy = stencil_y.data ();
284
284
#endif
285
- #if defined(WARPX_DIM_3D)
285
+ #if AMREX_SPACEDIM == 3
286
286
amrex::Real const * AMREX_RESTRICT sz = stencil_z.data ();
287
287
#endif
288
288
for (int n = 0 ; n < ncomp; ++n) {
@@ -298,19 +298,19 @@ void Filter::DoFilter (const Box& tbx,
298
298
for (int iz=0 ; iz < slen.z ; ++iz){
299
299
for (int iy=0 ; iy < slen.y ; ++iy){
300
300
for (int ix=0 ; ix < slen.x ; ++ix){
301
- #if defined(WARPX_DIM_3D)
301
+ #if AMREX_SPACEDIM == 3
302
302
const Real sss = sx[ix]*sy[iy]*sz[iz];
303
- #elif ( AMREX_SPACEDIM >= 2)
303
+ #elif AMREX_SPACEDIM >= 2
304
304
const Real sss = sx[ix]*sy[iy];
305
- #elif ( AMREX_SPACEDIM == 1)
305
+ #elif AMREX_SPACEDIM == 1
306
306
const Real sss = sx[ix];
307
307
#endif
308
308
// 3 nested loop on 3D array
309
309
for (int k = lo.z ; k <= hi.z ; ++k) {
310
310
for (int j = lo.y ; j <= hi.y ; ++j) {
311
311
AMREX_PRAGMA_SIMD
312
312
for (int i = lo.x ; i <= hi.x ; ++i) {
313
- #if defined(WARPX_DIM_3D)
313
+ #if AMREX_SPACEDIM == 3
314
314
dst (i,j,k,dcomp+n) += sss*(tmp (i-ix,j-iy,k-iz,scomp+n)
315
315
+tmp (i+ix,j-iy,k-iz,scomp+n)
316
316
+tmp (i-ix,j+iy,k-iz,scomp+n)
@@ -319,7 +319,7 @@ void Filter::DoFilter (const Box& tbx,
319
319
+tmp (i+ix,j-iy,k+iz,scomp+n)
320
320
+tmp (i-ix,j+iy,k+iz,scomp+n)
321
321
+tmp (i+ix,j+iy,k+iz,scomp+n));
322
- #elif ( AMREX_SPACEDIM >= 2)
322
+ #elif AMREX_SPACEDIM >= 2
323
323
dst (i,j,k,dcomp+n) += sss*(tmp (i-ix,j-iy,k,scomp+n)
324
324
+tmp (i+ix,j-iy,k,scomp+n)
325
325
+tmp (i-ix,j+iy,k,scomp+n)
0 commit comments