Nektar++
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:
[legend]

Public Member Functions

 NektarFFT (int N)
 Initialises NektarFFT class members. More...
 
virtual ~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 66 of file NektarFFT.h.

Constructor & Destructor Documentation

◆ NektarFFT()

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 56 of file NektarFFT.cpp.

57{
58 m_N = N;
59}

References m_N.

◆ ~NektarFFT()

Nektar::LibUtilities::NektarFFT::~NektarFFT ( )
virtual

Definition at line 61 of file NektarFFT.cpp.

62{
63}

Member Function Documentation

◆ FFTBwdTrans()

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 83 of file NektarFFT.cpp.

85{
86 v_FFTBwdTrans(coef, phys);
87}
virtual void v_FFTBwdTrans(Array< OneD, NekDouble > &coef, Array< OneD, NekDouble > &phys)
Definition: NektarFFT.cpp:94

References v_FFTBwdTrans().

◆ FFTFwdTrans()

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 77 of file NektarFFT.cpp.

79{
80 v_FFTFwdTrans(phys, coef);
81}
virtual void v_FFTFwdTrans(Array< OneD, NekDouble > &phys, Array< OneD, NekDouble > &coef)
Definition: NektarFFT.cpp:89

References v_FFTFwdTrans().

◆ v_FFTBwdTrans()

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

Reimplemented in Nektar::LibUtilities::NekFFTW.

Definition at line 94 of file NektarFFT.cpp.

96{
97}

Referenced by FFTBwdTrans().

◆ v_FFTFwdTrans()

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

Reimplemented in Nektar::LibUtilities::NekFFTW.

Definition at line 89 of file NektarFFT.cpp.

91{
92}

Referenced by FFTFwdTrans().

Member Data Documentation

◆ m_N

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 81 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().