OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
FFT< CCTransform, Dim, T > Class Template Reference

#include <FFT.h>

Inheritance diagram for FFT< CCTransform, Dim, T >:
Inheritance graph
[legend]
Collaboration diagram for FFT< CCTransform, Dim, T >:
Collaboration graph
[legend]

Public Types

typedef FieldLayout< DimLayout_t
 
typedef std::complex< T > Complex_t
 
typedef BareField< Complex_t, DimComplexField_t
 
typedef LField< Complex_t, DimComplexLField_t
 
typedef FFTBase< Dim, T >::Domain_t Domain_t
 
- Public Types inherited from FFTBase< Dim, T >
enum  { dimensions = Dim }
 
enum  FFT_e { ccFFT , rcFFT , sineFFT , cosineFFT }
 
typedef T Precision_t
 
typedef NDIndex< DimDomain_t
 
typedef FFTPACK< T > InternalFFT_t
 

Public Member Functions

 FFT (const Domain_t &cdomain, const bool transformTheseDims[Dim], const bool &compressTemps=false)
 
 FFT (const Domain_t &cdomain, const bool &compressTemps=false)
 
 ~FFT (void)
 
void transform (int direction, ComplexField_t &f, ComplexField_t &g, const bool &constInput=false)
 
void transform (const char *directionName, ComplexField_t &f, ComplexField_t &g, const bool &constInput=false)
 
void transform (int direction, ComplexField_t &f)
 
void transform (const char *directionName, ComplexField_t &f)
 
- Public Member Functions inherited from FFTBase< Dim, T >
 FFTBase ()
 
 FFTBase (FFT_e transform, const Domain_t &domain, const bool transformTheseDims[Dim], bool compressTemps)
 
 FFTBase (FFT_e transform, const Domain_t &domain, bool compressTemps)
 
virtual ~FFTBase (void)
 
void write (std::ostream &out) const
 
void setDirectionName (int direction, const char *directionName)
 
void setNormFact (Precision_t nf)
 
int transVnodes () const
 

Private Member Functions

void setup (void)
 

Private Attributes

Layout_t ** tempLayouts_m
 
ComplexField_t ** tempFields_m
 

Additional Inherited Members

- Protected Member Functions inherited from FFTBase< Dim, T >
int getDirection (const char *directionName) const
 translate direction name string into dimension number More...
 
bool transformDim (unsigned d) const
 query whether this dimension is to be transformed More...
 
unsigned numTransformDims (void) const
 query number of transform dimensions More...
 
unsigned activeDimension (unsigned d) const
 get dimension number from list of transformed dimensions More...
 
InternalFFT_tgetEngine (void)
 access the internal FFT Engine More...
 
Precision_tgetNormFact (void)
 get the FFT normalization factor More...
 
const Domain_tgetDomain (void) const
 get our domain More...
 
bool checkDomain (const Domain_t &dom1, const Domain_t &dom2) const
 compare indexes of two domains More...
 
bool compressTemps (void) const
 do we compress temps? More...
 
- Static Protected Attributes inherited from FFTBase< Dim, T >
static GuardCellSizes< DimnullGC = GuardCellSizes<Dim>()
 null GuardCellSizes object for checking BareField arguments to transform More...
 

Detailed Description

template<size_t Dim, class T>
class FFT< CCTransform, Dim, T >

complex-to-complex FFT class

Definition at line 54 of file FFT.h.

Member Typedef Documentation

◆ Complex_t

template<size_t Dim, class T >
typedef std::complex<T> FFT< CCTransform, Dim, T >::Complex_t

Definition at line 59 of file FFT.h.

◆ ComplexField_t

template<size_t Dim, class T >
typedef BareField<Complex_t,Dim> FFT< CCTransform, Dim, T >::ComplexField_t

Definition at line 60 of file FFT.h.

◆ ComplexLField_t

template<size_t Dim, class T >
typedef LField<Complex_t,Dim> FFT< CCTransform, Dim, T >::ComplexLField_t

Definition at line 61 of file FFT.h.

◆ Domain_t

template<size_t Dim, class T >
typedef FFTBase<Dim,T>::Domain_t FFT< CCTransform, Dim, T >::Domain_t

Definition at line 62 of file FFT.h.

◆ Layout_t

template<size_t Dim, class T >
typedef FieldLayout<Dim> FFT< CCTransform, Dim, T >::Layout_t

Definition at line 58 of file FFT.h.

Constructor & Destructor Documentation

◆ FFT() [1/2]

template<size_t Dim, class T >
FFT< CCTransform, Dim, T >::FFT ( const Domain_t cdomain,
const bool  transformTheseDims[Dim],
const bool &  compressTemps = false 
)

Create a new FFT object with the given domain for the input Field. Specify which dimensions to transform along. Optional argument compressTemps indicates whether or not to compress temporary Fields in between uses.

◆ FFT() [2/2]

template<size_t Dim, class T >
FFT< CCTransform, Dim, T >::FFT ( const Domain_t cdomain,
const bool &  compressTemps = false 
)
inline

Create a new FFT object of type CCTransform, with a given domain. Default case of transforming along all dimensions. Note this was formerly in the .cpp file, but the IBM linker could not find it!

Definition at line 78 of file FFT.h.

References Dim, FFTBase< Dim, T >::getEngine(), FFTBase< Dim, T >::getNormFact(), FFTPACK< T >::setup(), and Attrib::Legacy::Distribution::T.

Here is the call graph for this function:

◆ ~FFT()

template<size_t Dim, class T >
FFT< CCTransform, Dim, T >::~FFT ( void  )

Definition at line 117 of file FFT.hpp.

References FFTBase< Dim, T >::numTransformDims().

Here is the call graph for this function:

Member Function Documentation

◆ setup()

template<size_t Dim, class T >
void FFT< CCTransform, Dim, T >::setup ( void  )
private

setup performs all the initializations necessary after the transform directions have been specified.

Definition at line 69 of file FFT.hpp.

References FFTBase< Dim, T >::activeDimension(), FFTBase< Dim, T >::compressTemps(), Dim, FFTBase< Dim, T >::getDomain(), FFTBase< Dim, T >::numTransformDims(), PARALLEL, SERIAL, and FFTBase< Dim, T >::transVnodes().

Here is the call graph for this function:

◆ transform() [1/4]

template<size_t Dim, class T >
void FFT< CCTransform, Dim, T >::transform ( const char *  directionName,
ComplexField_t f 
)
inline

◆ transform() [2/4]

template<size_t Dim, class T >
void FFT< CCTransform, Dim, T >::transform ( const char *  directionName,
ComplexField_t f,
ComplexField_t g,
const bool &  constInput = false 
)

invoke using string for direction name

◆ transform() [3/4]

template<size_t Dim, class T >
void FFT< CCTransform, Dim, T >::transform ( int  direction,
ComplexField_t f 
)

overloaded versions which perform the FFT "in place"

◆ transform() [4/4]

template<size_t Dim, class T >
void FFT< CCTransform, Dim, T >::transform ( int  direction,
ComplexField_t f,
ComplexField_t g,
const bool &  constInput = false 
)

Do the FFT: specify +1 or -1 to indicate forward or inverse transform, or specify the user-defined name string for the direction. User provides separate input and output fields optional argument constInput indicates whether or not to treat the input Field argument f as const. If not, we can use it as a temporary in order to avoid an additional data transpose.

Member Data Documentation

◆ tempFields_m

template<size_t Dim, class T >
ComplexField_t** FFT< CCTransform, Dim, T >::tempFields_m
private

The array of temporary fields, one for each transform direction These use the corresponding tempLayouts.

Definition at line 259 of file FFT.h.

◆ tempLayouts_m

template<size_t Dim, class T >
Layout_t** FFT< CCTransform, Dim, T >::tempLayouts_m
private

How the temporary field's are laid out; these are computed from the input Field's domain. This will be allocated as an array of FieldLayouts with nTransformDims elements. Each is SERIAL along the zeroth dimension and the axes are permuted so that the transform direction is first

Definition at line 254 of file FFT.h.


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