Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only set modified k to 0 for even number of points #2852

Merged
merged 2 commits into from
Feb 15, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) ){
RemiLehe marked this conversation as resolved.
Show resolved Hide resolved
p_modified_k[i] = 0.0_rt;
}
}
Expand Down