diff options
author | 2019-04-28 14:32:57 -0700 | |
---|---|---|
committer | 2019-04-28 14:32:57 -0700 | |
commit | a75f2ac4a0870440a6825e8b05efbca0d4b03e43 (patch) | |
tree | 5c5273c9665184de65e9eadacc5eeb908c7b7e56 /Source/FieldSolver/WarpXFFT.cpp | |
parent | 178d50896b3da55874d8601934341c725ce041d6 (diff) | |
download | WarpX-a75f2ac4a0870440a6825e8b05efbca0d4b03e43.tar.gz WarpX-a75f2ac4a0870440a6825e8b05efbca0d4b03e43.tar.zst WarpX-a75f2ac4a0870440a6825e8b05efbca0d4b03e43.zip |
Fix 2D bugs
Diffstat (limited to '')
-rw-r--r-- | Source/FieldSolver/WarpXFFT.cpp | 6 |
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] ) ); } |