aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-04-26 19:42:55 -0700
committerGravatar Remi Lehe <remi.lehe@normalesup.org> 2019-04-26 19:42:55 -0700
commite63a8468a8a629e33153b6939819349f52b364bc (patch)
tree7cecb84cf45c9ee31555bc2d61449d409417b5b5 /Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
parent119d84674eaa0ca410a66bbc2a47a05408361cf6 (diff)
downloadWarpX-e63a8468a8a629e33153b6939819349f52b364bc.tar.gz
WarpX-e63a8468a8a629e33153b6939819349f52b364bc.tar.zst
WarpX-e63a8468a8a629e33153b6939819349f52b364bc.zip
Correct naming of `dx` ; use initializer list
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp b/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
index 7bed96fc4..6df3ea8fa 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
@@ -15,14 +15,12 @@ using namespace Gpu;
SpectralKSpace::SpectralKSpace( const BoxArray& realspace_ba,
const DistributionMapping& dm,
const RealVect realspace_dx )
+ : dx(realspace_dx) // Store the cell size as member `dx`
{
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(
realspace_ba.ixType()==IndexType::TheCellType(),
"SpectralKSpace expects a cell-centered box.");
- // Store the cell size
- dx = realspace_dx;
-
// Create the box array that corresponds to spectral space
BoxList spectral_bl; // Create empty box list
// Loop over boxes and fill the box list
@@ -33,6 +31,7 @@ SpectralKSpace::SpectralKSpace( const BoxArray& realspace_ba,
// TODO: this will be different for the real-to-complex FFT
// TODO: this will be different for the hybrid FFT scheme
Box realspace_bx = realspace_ba[i];
+ Print() << realspace_bx.smallEnd() << " " << realspace_bx.bigEnd() << std::endl;
Box bx = Box( IntVect::TheZeroVector(),
realspace_bx.bigEnd() - realspace_bx.smallEnd() );
spectral_bl.push_back( bx );