aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/WarpXFFT.cpp
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-04-30 09:41:21 -0700
committerGravatar GitHub <noreply@github.com> 2019-04-30 09:41:21 -0700
commitbb1289f3879155244372f791d6854107150f4266 (patch)
tree5c2697eeb93fa75b6f82b5b3603c393b6c57e39a /Source/FieldSolver/WarpXFFT.cpp
parent9a7a87fcd64d7faab8c57cbc769840f8ee74454a (diff)
parentfcab5379ddadb02f81d14c9583000c0aeb5b7db6 (diff)
downloadWarpX-bb1289f3879155244372f791d6854107150f4266.tar.gz
WarpX-bb1289f3879155244372f791d6854107150f4266.tar.zst
WarpX-bb1289f3879155244372f791d6854107150f4266.zip
Merge pull request #104 from ECP-WarpX/fix_spectral
Fix bugs in the spectral solver
Diffstat (limited to 'Source/FieldSolver/WarpXFFT.cpp')
-rw-r--r--Source/FieldSolver/WarpXFFT.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/FieldSolver/WarpXFFT.cpp b/Source/FieldSolver/WarpXFFT.cpp
index 4bccc956b..1cf5460f2 100644
--- a/Source/FieldSolver/WarpXFFT.cpp
+++ b/Source/FieldSolver/WarpXFFT.cpp
@@ -130,7 +130,11 @@ WarpX::AllocLevelDataFFT (int lev)
// Allocate and initialize objects for the spectral solver
// (all use the same distribution mapping)
std::array<Real,3> dx = CellSize(lev);
- RealVect dx_vect = RealVect( AMREX_D_DECL(dx[0], dx[1], dx[2]) );
+#if (AMREX_SPACEDIM == 3)
+ RealVect dx_vect(dx[0], dx[1], dx[2]);
+#elif (AMREX_SPACEDIM == 2)
+ RealVect dx_vect(dx[0], dx[2]);
+#endif
spectral_solver_fp[lev].reset( new SpectralSolver( ba_fp_fft, dm_fp_fft,
nox_fft, noy_fft, noz_fft, do_nodal, dx_vect, dt[lev] ) );
}