aboutsummaryrefslogtreecommitdiff
path: root/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp')
-rw-r--r--Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp b/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
index 8330b645e..7320b7cf1 100644
--- a/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
+++ b/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
@@ -51,7 +51,7 @@ SpectralKSpace::SpectralKSpace( const BoxArray& realspace_ba,
// For local FFTs, boxes in spectral space start at 0 in
// each direction and have the same number of points as the
// (cell-centered) real space box
- Box realspace_bx = realspace_ba[i];
+ const Box realspace_bx = realspace_ba[i];
IntVect fft_size = realspace_bx.length();
// Because the spectral solver uses real-to-complex FFTs, we only
// need the positive k values along the fastest axis
@@ -61,7 +61,7 @@ SpectralKSpace::SpectralKSpace( const BoxArray& realspace_ba,
IntVect spectral_bx_size = fft_size;
spectral_bx_size[0] = fft_size[0]/2 + 1;
// Define the corresponding box
- Box spectral_bx = Box( IntVect::TheZeroVector(),
+ const Box spectral_bx = Box( IntVect::TheZeroVector(),
spectral_bx_size - IntVect::TheUnitVector() );
spectral_bl.push_back( spectral_bx );
}
@@ -95,11 +95,11 @@ SpectralKSpace::getKComponent( const DistributionMapping& dm,
// Loop over boxes and allocate the corresponding DeviceVector
// for each box owned by the local MPI proc
for ( MFIter mfi(spectralspace_ba, dm); mfi.isValid(); ++mfi ){
- Box bx = spectralspace_ba[mfi];
+ const Box bx = spectralspace_ba[mfi];
Gpu::DeviceVector<Real>& k = k_comp[mfi];
// Allocate k to the right size
- int N = bx.length( i_dim );
+ const int N = bx.length( i_dim );
k.resize( N );
Real* pk = k.data();
@@ -227,7 +227,7 @@ SpectralKSpace::getModifiedKComponent( const DistributionMapping& dm,
// Loop over boxes and allocate the corresponding DeviceVector
// for each box owned by the local MPI proc
for ( MFIter mfi(spectralspace_ba, dm); mfi.isValid(); ++mfi ){
- Real delta_x = dx[i_dim];
+ const Real delta_x = dx[i_dim];
const Gpu::DeviceVector<Real>& k = k_vec[i_dim][mfi];
Gpu::DeviceVector<Real>& modified_k = modified_k_comp[mfi];