Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Nektar::LibUtilities::NektarFFT Class Reference

#include <NektarFFT.h>

Inheritance diagram for Nektar::LibUtilities::NektarFFT:
Inheritance graph
[legend]

Public Member Functions

 NektarFFT (int N)
 Initialises NektarFFT class members. More...
 
 ~NektarFFT ()
 
void FFTFwdTrans (Array< OneD, NekDouble > &phy, Array< OneD, NekDouble > &coef)
 
void FFTBwdTrans (Array< OneD, NekDouble > &coef, Array< OneD, NekDouble > &phys)
 

Public Attributes

int m_N
 

Protected Member Functions

virtual void v_FFTFwdTrans (Array< OneD, NekDouble > &phys, Array< OneD, NekDouble > &coef)
 
virtual void v_FFTBwdTrans (Array< OneD, NekDouble > &coef, Array< OneD, NekDouble > &phys)
 

Detailed Description

This class is a base class for all FFT implementation. It provides the underlying generic functionality and interface for perform a Fourier transform.

To perform the FFT with a differebt algorithm, create a derived class from this class and reimplement the virtual functions to provide custom implementation of the algorithm.

Definition at line 67 of file NektarFFT.h.

Constructor & Destructor Documentation

Nektar::LibUtilities::NektarFFT::NektarFFT ( int  N)

Initialises NektarFFT class members.

This constructor is protected as the objects of this class are never instantiated directly.

Definition at line 59 of file NektarFFT.cpp.

References m_N.

60  {
61  m_N = N;
62  }
Nektar::LibUtilities::NektarFFT::~NektarFFT ( )

Definition at line 64 of file NektarFFT.cpp.

65  {
66 
67  }

Member Function Documentation

void Nektar::LibUtilities::NektarFFT::FFTBwdTrans ( Array< OneD, NekDouble > &  coef,
Array< OneD, NekDouble > &  phys 
)

Backward transformation to pass from coefficient to physical space using the FFT. This method will take the place of the Matrix-Vector multiplication input: N = number of Fourier points inarrray = vector in coefficient space (length N) output: outarray = vector in physical space (length N)

Definition at line 90 of file NektarFFT.cpp.

References v_FFTBwdTrans().

91  {
92  v_FFTBwdTrans(coef,phys);
93  }
virtual void v_FFTBwdTrans(Array< OneD, NekDouble > &coef, Array< OneD, NekDouble > &phys)
Definition: NektarFFT.cpp:100
void Nektar::LibUtilities::NektarFFT::FFTFwdTrans ( Array< OneD, NekDouble > &  phys,
Array< OneD, NekDouble > &  coef 
)

Forward transformation to pass from physical to coefficient space using the FFT. This method will take the place of the Matrix-Vector multiplication input: N = number of Fourier points inarray = vector in physical space (length N) output: outarray = vector in coefficient space (length N)

This allows initialisation of the class which cannot be completed during object construction (such as setting of initial conditions).

Public interface routine to virtual function implementation.

Definition at line 85 of file NektarFFT.cpp.

References v_FFTFwdTrans().

86  {
87  v_FFTFwdTrans(phys,coef);
88  }
virtual void v_FFTFwdTrans(Array< OneD, NekDouble > &phys, Array< OneD, NekDouble > &coef)
Definition: NektarFFT.cpp:95
void Nektar::LibUtilities::NektarFFT::v_FFTBwdTrans ( Array< OneD, NekDouble > &  coef,
Array< OneD, NekDouble > &  phys 
)
protectedvirtual

Reimplemented in Nektar::LibUtilities::NekFFTW.

Definition at line 100 of file NektarFFT.cpp.

Referenced by FFTBwdTrans().

101  {
102 
103  }
void Nektar::LibUtilities::NektarFFT::v_FFTFwdTrans ( Array< OneD, NekDouble > &  phys,
Array< OneD, NekDouble > &  coef 
)
protectedvirtual

Reimplemented in Nektar::LibUtilities::NekFFTW.

Definition at line 95 of file NektarFFT.cpp.

Referenced by FFTFwdTrans().

96  {
97 
98  }

Member Data Documentation

int Nektar::LibUtilities::NektarFFT::m_N

m_N is the dimension of the Fourier transform. It means that the coefficient vector and the vector of the variable in physical space have size m_N. It is becasue everything is managed just with real data.

Definition at line 82 of file NektarFFT.h.

Referenced by Nektar::LibUtilities::NekFFTW::NekFFTW(), NektarFFT(), Nektar::LibUtilities::NekFFTW::Reshuffle_FFTW2Nek(), Nektar::LibUtilities::NekFFTW::Reshuffle_Nek2FFTW(), Nektar::LibUtilities::NekFFTW::v_FFTBwdTrans(), and Nektar::LibUtilities::NekFFTW::v_FFTFwdTrans().