OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
FFT< Transform, Dim, T > Class Template Reference

#include <FFT.h>

Inheritance diagram for FFT< Transform, Dim, T >:
Collaboration diagram for FFT< Transform, Dim, T >:

Public Types

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

void write (std::ostream &out) const
void setDirectionName (int direction, const char *directionName)
void setNormFact (Precision_t nf)
int transVnodes () const

Protected Member Functions

int getDirection (const char *directionName) const
 translate direction name string into dimension number
bool transformDim (unsigned d) const
 query whether this dimension is to be transformed
unsigned numTransformDims (void) const
 query number of transform dimensions
unsigned activeDimension (unsigned d) const
 get dimension number from list of transformed dimensions
InternalFFT_tgetEngine (void)
 access the internal FFT Engine
Precision_tgetNormFact (void)
 get the FFT normalization factor
const Domain_tgetDomain (void) const
 get our domain
bool checkDomain (const Domain_t &dom1, const Domain_t &dom2) const
 compare indexes of two domains
bool compressTemps (void) const
 do we compress temps?

Static Protected Attributes

static GuardCellSizes< DimnullGC
 null GuardCellSizes object for checking BareField arguments to transform

Private Attributes

std::map< const char *, int > directions_m
 Stores user-defined names for FFT directions:
FFT_e transformType_m
 Indicates which type of transform we do.
bool transformDims_m [Dim]
 Indicates which dimensions are transformed.
unsigned nTransformDims_m
 Stores the number of dims to be transformed.
unsigned * activeDims_m
 Stores the numbers of these dims (0,1,2).
InternalFFT_t FFTEngine_m
 Internal FFT object for performing serial FFTs.
Precision_t normFact_m
 Normalization factor:
Domain_t Domain_m
 Domain of the input field, mainly used to check axis sizes and ordering, former const Domain_t& Domain_m;.
bool compressTempFields_m
 Switch to turn on/off compression of intermediate Fields (tempFields) as algorithm is finished with them.

Detailed Description

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

Non-specialized FFT class. We specialize based on Transform tag class

Definition at line 48 of file FFT.h.

Member Typedef Documentation

◆ Domain_t

template<unsigned Dim, class T>
typedef NDIndex<Dim> FFTBase< Dim, T >::Domain_t
inherited

Definition at line 60 of file FFTBase.h.

◆ InternalFFT_t

template<unsigned Dim, class T>
typedef FFTPACK<T> FFTBase< Dim, T >::InternalFFT_t
inherited

Definition at line 66 of file FFTBase.h.

◆ Precision_t

template<unsigned Dim, class T>
typedef T FFTBase< Dim, T >::Precision_t
inherited

Definition at line 59 of file FFTBase.h.

Member Enumeration Documentation

◆ anonymous enum

template<unsigned Dim, class T>
anonymous enum
inherited
Enumerator
dimensions 

Definition at line 58 of file FFTBase.h.

◆ FFT_e

template<unsigned Dim, class T>
enum FFTBase::FFT_e
inherited
Enumerator
ccFFT 
rcFFT 
sineFFT 
cosineFFT 

Definition at line 63 of file FFTBase.h.

Member Function Documentation

◆ activeDimension()

template<unsigned Dim, class T>
unsigned FFTBase< Dim, T >::activeDimension ( unsigned d) const
inlineprotectedinherited

get dimension number from list of transformed dimensions

get dimension number from list of transformed dimensions

Parameters
d
Returns

Definition at line 252 of file FFTBase.h.

References activeDims_m, nTransformDims_m, and PAssert_LT.

◆ checkDomain()

template<unsigned Dim, class T>
bool FFTBase< Dim, T >::checkDomain ( const Domain_t & dom1,
const Domain_t & dom2 ) const
inlineprotectedinherited

compare indexes of two domains

helper function for comparing domains

Parameters
Dim
dom1
Dim
dom2
Returns

Definition at line 269 of file FFTBase.h.

References Dim.

Referenced by FFT< CCTransform, Dim, T >::transform().

◆ compressTemps()

template<unsigned Dim, class T>
bool FFTBase< Dim, T >::compressTemps ( void ) const
inlineprotectedinherited

do we compress temps?

Definition at line 166 of file FFTBase.h.

Referenced by FFT< CCTransform, Dim, T >::transform().

◆ getDirection()

template<unsigned Dim, class T>
int FFTBase< Dim, T >::getDirection ( const char * directionName) const
inlineprotectedinherited

translate direction name string into dimension number

Translate direction name string into dimension number

Parameters
directionName
Returns

Definition at line 225 of file FFTBase.h.

References directions_m.

Referenced by FFT< CCTransform, Dim, T >::transform().

◆ getDomain()

template<unsigned Dim, class T>
const Domain_t & FFTBase< Dim, T >::getDomain ( void ) const
inlineprotectedinherited

get our domain

Definition at line 160 of file FFTBase.h.

Referenced by FFT< CCTransform, Dim, T >::transform().

◆ getEngine()

template<unsigned Dim, class T>
InternalFFT_t & FFTBase< Dim, T >::getEngine ( void )
inlineprotectedinherited

access the internal FFT Engine

Definition at line 154 of file FFTBase.h.

Referenced by FFT< CCTransform, Dim, T >::FFT(), and FFT< CCTransform, Dim, T >::transform().

◆ getNormFact()

template<unsigned Dim, class T>
Precision_t & FFTBase< Dim, T >::getNormFact ( void )
inlineprotectedinherited

get the FFT normalization factor

Definition at line 157 of file FFTBase.h.

Referenced by FFT< CCTransform, Dim, T >::FFT(), and FFT< CCTransform, Dim, T >::transform().

◆ numTransformDims()

template<unsigned Dim, class T>
unsigned FFTBase< Dim, T >::numTransformDims ( void ) const
inlineprotectedinherited

query number of transform dimensions

Definition at line 148 of file FFTBase.h.

Referenced by FFT< CCTransform, Dim, T >::transform().

◆ setDirectionName()

template<unsigned Dim, class T>
void FFTBase< Dim, T >::setDirectionName ( int direction,
const char * directionName )
inlineinherited

Allow the user to name the transform directions, for code clarity.

Parameters
direction
directionName

Allow the user to name the transform directions, for code clarity. Typical values might be "x_to_k", "k_to_x", "t_to_omega", "omega_to_t"

Definition at line 209 of file FFTBase.h.

References directions_m, and PAssert_EQ.

◆ setNormFact()

template<unsigned Dim, class T>
void FFTBase< Dim, T >::setNormFact ( Precision_t nf)
inlineinherited

Set the FFT normalization factor (to something other than the default)

Parameters
nf

Definition at line 117 of file FFTBase.h.

◆ transformDim()

template<unsigned Dim, class T>
bool FFTBase< Dim, T >::transformDim ( unsigned d) const
inlineprotectedinherited

query whether this dimension is to be transformed

query whether this dimension is to be transformed

Parameters
d
Returns

Definition at line 238 of file FFTBase.h.

References Dim, PAssert_LT, and transformDims_m.

◆ transVnodes()

template<unsigned Dim, class T>
int FFTBase< Dim, T >::transVnodes ( ) const
inlineinherited

Utility to determine the number of vnodes to use in temporary transpose fields; this is either -1, or a limited number set on the command line

Returns

Definition at line 125 of file FFTBase.h.

◆ write()

template<unsigned Dim, class T>
void FFTBase< Dim, T >::write ( std::ostream & out) const
inherited

I/O for FFT object

Parameters
out

Definition at line 82 of file FFTBase.hpp.

References Dim, directions_m, getTransformType(), transformDims_m, and transformType_m.

Referenced by operator<<().

Here is the call graph for this function:

Member Data Documentation

◆ activeDims_m

template<unsigned Dim, class T>
unsigned* FFTBase< Dim, T >::activeDims_m
privateinherited

Stores the numbers of these dims (0,1,2).

Definition at line 176 of file FFTBase.h.

Referenced by activeDimension().

◆ compressTempFields_m

template<unsigned Dim, class T>
bool FFTBase< Dim, T >::compressTempFields_m
privateinherited

Switch to turn on/off compression of intermediate Fields (tempFields) as algorithm is finished with them.

Definition at line 188 of file FFTBase.h.

◆ directions_m

template<unsigned Dim, class T>
std::map<const char*,int> FFTBase< Dim, T >::directions_m
privateinherited

Stores user-defined names for FFT directions:

Definition at line 171 of file FFTBase.h.

Referenced by getDirection(), setDirectionName(), and write().

◆ Domain_m

template<unsigned Dim, class T>
Domain_t FFTBase< Dim, T >::Domain_m
privateinherited

Domain of the input field, mainly used to check axis sizes and ordering, former const Domain_t& Domain_m;.

Definition at line 185 of file FFTBase.h.

◆ FFTEngine_m

template<unsigned Dim, class T>
InternalFFT_t FFTBase< Dim, T >::FFTEngine_m
privateinherited

Internal FFT object for performing serial FFTs.

Definition at line 179 of file FFTBase.h.

◆ normFact_m

template<unsigned Dim, class T>
Precision_t FFTBase< Dim, T >::normFact_m
privateinherited

Normalization factor:

Definition at line 182 of file FFTBase.h.

◆ nTransformDims_m

template<unsigned Dim, class T>
unsigned FFTBase< Dim, T >::nTransformDims_m
privateinherited

Stores the number of dims to be transformed.

Definition at line 175 of file FFTBase.h.

Referenced by activeDimension().

◆ nullGC

template<unsigned Dim, class T>
GuardCellSizes<Dim> FFTBase< Dim, T >::nullGC
staticprotectedinherited

null GuardCellSizes object for checking BareField arguments to transform

! These members are used by the derived FFT classes

Definition at line 139 of file FFTBase.h.

Referenced by FFT< CCTransform, Dim, T >::transform().

◆ transformDims_m

template<unsigned Dim, class T>
bool FFTBase< Dim, T >::transformDims_m[Dim]
privateinherited

Indicates which dimensions are transformed.

Definition at line 174 of file FFTBase.h.

Referenced by transformDim(), and write().

◆ transformType_m

template<unsigned Dim, class T>
FFT_e FFTBase< Dim, T >::transformType_m
privateinherited

Indicates which type of transform we do.

Definition at line 173 of file FFTBase.h.

Referenced by write().


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