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

switch the spectrum code over to using AMReX's FFT #4

Open
zingale opened this issue Nov 6, 2024 · 1 comment
Open

switch the spectrum code over to using AMReX's FFT #4

zingale opened this issue Nov 6, 2024 · 1 comment

Comments

@zingale
Copy link
Member

zingale commented Nov 6, 2024

see AMReX-Codes/amrex#3713

we can do:

int level = 0;
MultiFab mf = plotfile.get(level);
FFT::R2C<Real,FFT::Direction::forward> r2c(plotfile.probDomain(level));
auto const& [cba, cdm] = r2c.getSpectralDataLayout();
cMultiFab spectral_data(cba, cdm, 1, 0);
int icomp = 3; // component 3
MultiFab real_data(mf, amrex::make_alias, icomp, 1);
r2c.forward(read_data, spectral_data);
// spectral_data is now the result of real-to-complex forward FFT of the level 0 component 3 data.
@zingale zingale transferred this issue from AMReX-Astro/amrex-astro-diag Nov 6, 2024
@zingale
Copy link
Member Author

zingale commented Nov 28, 2024

see this tutorial:
AMReX-Codes/amrex-tutorials#144

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

No branches or pull requests

1 participant