FFT

These tutorials demonstrate how to use the amrex::FFT classes to solve for and manipulate Fourier transform data. For more information on the amrex::FFT class refer to the AMReX documentation here.

There are two FFT tutorials, Basic and Poisson.

Basic

The tutorial found in amrex-tutorials/ExampleCodes/FFT/Basic demonstrates how to take a forward FFT, manipulate or access the spectral data (in this example by copying the spectral data into a MultiFab for plotfile visualziation) and then taking the inverse FFT.

Poisson

This tutorial: amrex-tutorials/ExampleCodes/FFT/Poisson solves a Poisson equation with periodic boundary conditions. It relies on the AMReX_FFT_Poisson.H routines to solve the equation by using the forwardThenBackward function which takes the forward and inverse transform of the data with spectral data scaling in between as required by the Poisson equation.