Skip to content

Commit

Permalink
fix(SWFFT/Poisson) (#133)
Browse files Browse the repository at this point in the history
- rank-mapping didn't have to be modified from fortran to C order
- already done so in SWFFT/Simple.
  • Loading branch information
YL-codehub authored Sep 2, 2024
1 parent 608c2aa commit 0bb992c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions ExampleCodes/SWFFT/SWFFT_poisson/swfft_solver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,7 @@ swfft_solver(MultiFab& rhs, MultiFab& soln, Geometry& geom, int verbose)
int j = ba[ib].smallEnd(1) / ny;
int k = ba[ib].smallEnd(2) / nz;

// This would be the "correct" local index if the data wasn't being transformed
// int local_index = k*nbx*nby + j*nbx + i;

// This is what we pass to dfft to compensate for the Fortran ordering
// of amrex data in MultiFabs.
int local_index = i*nby*nbz + j*nbz + k;
int local_index = k*nbx*nby + j*nbx + i;

rank_mapping[local_index] = dmap[ib];
if (verbose)
Expand Down

0 comments on commit 0bb992c

Please sign in to comment.