fft Class Reference

Fast fourier transform derived from the Numerical Recipes in C routine. More...

Public Types

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

Static Public Member Functions

static void transform (complexField &field, const labelList &nn, transformDirection fftDirection)
 
static tmp< complexFieldforwardTransform (const tmp< complexField > &field, const labelList &nn)
 
static tmp< complexFieldreverseTransform (const tmp< complexField > &field, const labelList &nn)
 
static tmp< complexVectorFieldforwardTransform (const tmp< complexVectorField > &field, const labelList &nn)
 
static tmp< complexVectorFieldreverseTransform (const tmp< complexVectorField > &field, const labelList &nn)
 

Detailed Description

Fast fourier transform derived from the Numerical Recipes in C routine.

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.

Source files

Definition at line 51 of file fft.H.

Member Enumeration Documentation

◆ transformDirection

Enumerator
FORWARD_TRANSFORM 
REVERSE_TRANSFORM 

Definition at line 56 of file fft.H.

Member Function Documentation

◆ transform()

void transform ( complexField field,
const labelList nn,
transformDirection  fftDirection 
)
static

Definition at line 41 of file fft.C.

References Foam::abort(), UList< T >::begin(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, Foam::fftRenumber(), forAll, fft::FORWARD_TRANSFORM, n, fft::REVERSE_TRANSFORM, Foam::sin(), List< T >::size(), Foam::sqrt(), SWAP, and TWOPI.

Referenced by fft::forwardTransform(), and fft::reverseTransform().

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

◆ forwardTransform() [1/2]

tmp< complexField > forwardTransform ( const tmp< complexField > &  field,
const labelList nn 
)
static

Definition at line 186 of file fft.C.

References tmp< T >::clear(), fft::FORWARD_TRANSFORM, tmp< T >::ref(), and fft::transform().

Referenced by fft::forwardTransform(), and Foam::writeEk().

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

◆ reverseTransform() [1/2]

tmp< complexField > reverseTransform ( const tmp< complexField > &  field,
const labelList nn 
)
static

Definition at line 202 of file fft.C.

References tmp< T >::clear(), tmp< T >::ref(), fft::REVERSE_TRANSFORM, and fft::transform().

Referenced by OUForce::addSup(), noiseFFT::Pf(), fft::reverseTransform(), and turbGen::U().

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

◆ forwardTransform() [2/2]

tmp< complexVectorField > forwardTransform ( const tmp< complexVectorField > &  field,
const labelList nn 
)
static

Definition at line 218 of file fft.C.

References tmp< T >::clear(), Foam::component(), fft::forwardTransform(), VectorSpace< Form, Cmpt, Ncmpts >::nComponents, and tmp< T >::ref().

Here is the call graph for this function:

◆ reverseTransform() [2/2]

tmp< complexVectorField > reverseTransform ( const tmp< complexVectorField > &  field,
const labelList nn 
)
static

Definition at line 247 of file fft.C.

References tmp< T >::clear(), Foam::component(), VectorSpace< Form, Cmpt, Ncmpts >::nComponents, tmp< T >::ref(), and fft::reverseTransform().

Here is the call graph for this function:

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