diff options
-rw-r--r-- | Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp b/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp index 2f11f84ca..6d31116b6 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp @@ -266,7 +266,7 @@ SpectralKSpace::getModifiedKComponent( const DistributionMapping& dm, } else { // The other axes contains both positive and negative k ; // the Nyquist frequency is in the middle of the array. - if (i == N/2) { + if ( (N%2==0) && (i == N/2) ){ p_modified_k[i] = 0.0_rt; } } |