dftd3_fourier_fft Module

Complex fast Fourier transform on a three-dimensional mesh.

Self-contained radix-2/3 Stockham transform. Allowing products of powers of two and three avoids padding the particle mesh to the next power of two.


Uses


Derived Types

type, public ::  fft_mesh

Twiddle factors for the transforms along the three mesh directions

Components

Type Visibility Attributes Name Initial
integer, public :: mesh(3) = 0

Number of points along each direction

complex(kind=wp), public, allocatable :: tw(:,:)

Roots of unity for each direction, whose lengths need not divide each other


Functions

public pure function valid_mesh_size(npoint) result(nmesh)

Smallest supported mesh size not below the requested number of points

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: npoint

Requested number of mesh points

Return Value integer

Supported number of mesh points


Subroutines

public subroutine fft_3d(self, grid, isign)

Transform along all three directions, isign selects forward (-1) or backward (+1)

Arguments

Type IntentOptional Attributes Name
type(fft_mesh), intent(in) :: self

Instance of the transform

complex(kind=wp), intent(inout) :: grid(:,:,:)

Mesh to transform in place

integer, intent(in) :: isign

Sign of the exponent

public subroutine new_fft_mesh(self, mesh)

Tabulate the roots of unity for transforms on the given mesh

Arguments

Type IntentOptional Attributes Name
type(fft_mesh), intent(out) :: self

Instance of the transform

integer, intent(in) :: mesh(3)

Number of points along each direction