Public Types | Static Public Member Functions | List of all members
fft Class Reference

Fast fourier transform using the fftw library. More...

Public Types

enum  transformDirection { FORWARD_TRANSFORM = -1, REVERSE_TRANSFORM = 1 }
 

Static Public Member Functions

static void fftRenumberRecurse (List< complex > &data, List< complex > &renumData, const UList< int > &nn, label nnprod, label ii, label l1, label l2)
 
static void fftRenumber (List< complex > &data, const UList< int > &nn)
 
static tmp< complexFieldrealTransform1D (const scalarField &field)
 
static tmp< complexFieldrealTransform1D (const tmp< scalarField > &field)
 
static void transform (complexField &field, const UList< int > &nn, transformDirection fftDirection)
 
static tmp< complexFieldforwardTransform (const tmp< complexField > &field, const UList< int > &nn)
 
static tmp< complexFieldreverseTransform (const tmp< complexField > &field, const UList< int > &nn)
 
static tmp< complexVectorFieldforwardTransform (const tmp< complexVectorField > &field, const UList< int > &nn)
 
static tmp< complexVectorFieldreverseTransform (const tmp< complexVectorField > &field, const UList< int > &nn)
 

Detailed Description

Fast fourier transform using the fftw library.

The complex transform field is returned in the field supplied. The direction of transform is supplied as an argument (-1 = forward, 1 = reverse). The dimensionality and organisation of the array of values in space is supplied in the nn indexing array.

Note
The fftw library uses int only (no longs) for its dimensionality.
Source files

Definition at line 51 of file fft.H.

Member Enumeration Documentation

◆ transformDirection

Enumerator
FORWARD_TRANSFORM 

The sign -1 = FFTW_FORWARD.

REVERSE_TRANSFORM 

The sign +1 = FFTW_BACKWARD.

Definition at line 56 of file fft.H.

Member Function Documentation

◆ fftRenumberRecurse()

void fftRenumberRecurse ( List< complex > &  data,
List< complex > &  renumData,
const UList< int > &  nn,
label  nnprod,
label  ii,
label  l1,
label  l2 
)
static

Definition at line 28 of file fft.C.

References Foam::roots::complex, Foam::Im(), Foam::Re(), and UList::size().

Referenced by fft::fftRenumber().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fftRenumber()

void fftRenumber ( List< complex > &  data,
const UList< int > &  nn 
)
static

Definition at line 87 of file fft.C.

References fft::fftRenumberRecurse(), and forAll.

Here is the call graph for this function:

◆ realTransform1D() [1/2]

Foam::tmp< Foam::complexField > realTransform1D ( const scalarField field)
static

Definition at line 113 of file fft.C.

References field(), n, and tmp::New().

Referenced by noiseFFT::Pf(), and noiseModel::Pf().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ realTransform1D() [2/2]

Foam::tmp< Foam::complexField > realTransform1D ( const tmp< scalarField > &  field)
static

Definition at line 161 of file fft.C.

References tmp::clear().

Here is the call graph for this function:

◆ transform()

void transform ( complexField field,
const UList< int > &  nn,
transformDirection  fftDirection 
)
static

Definition at line 172 of file fft.C.

References UList::begin(), field(), forAll, N(), and UList::size().

Here is the call graph for this function:

◆ forwardTransform() [1/2]

Foam::tmp< Foam::complexField > forwardTransform ( const tmp< complexField > &  field,
const UList< int > &  nn 
)
static

Definition at line 236 of file fft.C.

References tmp::clear(), tmp::New(), and Foam::transform().

Referenced by energySpectrum::calcAndWriteSpectrum(), and Foam::calcEk().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reverseTransform() [1/2]

Foam::tmp< Foam::complexField > reverseTransform ( const tmp< complexField > &  field,
const UList< int > &  nn 
)
static

Definition at line 252 of file fft.C.

References tmp::clear(), tmp::New(), and Foam::transform().

Referenced by turbGen::U().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ forwardTransform() [2/2]

Foam::tmp< Foam::complexVectorField > forwardTransform ( const tmp< complexVectorField > &  field,
const UList< int > &  nn 
)
static

Definition at line 268 of file fft.C.

References tmp::clear(), Foam::component(), VectorSpace< Vector< scalar >, scalar, 3 >::nComponents, and tmp::New().

Here is the call graph for this function:

◆ reverseTransform() [2/2]

Foam::tmp< Foam::complexVectorField > reverseTransform ( const tmp< complexVectorField > &  field,
const UList< int > &  nn 
)
static

Definition at line 291 of file fft.C.

References tmp::clear(), Foam::component(), VectorSpace< Vector< scalar >, scalar, 3 >::nComponents, and tmp::New().

Here is the call graph for this function:

The documentation for this class was generated from the following files: