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

Symmetry in dft arrays #427

Merged
merged 3 commits into from
Jul 25, 2018
Merged

Symmetry in dft arrays #427

merged 3 commits into from
Jul 25, 2018

Conversation

HomerReid
Copy link
Contributor

Fixes #421.

src/dft.cpp Outdated
// where NI = number of points in Ith direction.
int idx2=0;
for (int i=rank-1, stride=1; i>=0; stride*=array_count[i--])
idx2 += stride * iloc.in_direction(ds[i]) / 2;
Copy link
Collaborator

@stevengj stevengj Jul 24, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it should be stride * (iloc.in_direction(ds[i]) / 2)

@stevengj stevengj merged commit 3947b3e into NanoComp:master Jul 25, 2018
bencbartlett pushed a commit to bencbartlett/meep that referenced this pull request Sep 9, 2021
* attempt to handle symmetries in dft arrays

* update acquisition of array slices for DFT fields to behave properly in the presence of symmetries

* div 2 before stride
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants