CppNoddy
0.92
|
Some algorithms associated with Fourier transforms of CppNoddy container data. More...
Functions | |
OneD_Node_Mesh< D_complex > | shift (const OneD_Node_Mesh< D_complex > &ft) |
Shift the frequency spectrum obtained from dft to give positive and negative freq. More... | |
OneD_Node_Mesh< D_complex > | ishift (const OneD_Node_Mesh< D_complex > &ft) |
Invert the shif operation to recover a spectrum in the form that is expected by the idft routine. More... | |
OneD_Node_Mesh< D_complex > | dft_with_shift (const OneD_Node_Mesh< D_complex > &f) |
A wrapper that calls the 'dft' method above followed by the 'shift' method. More... | |
TwoD_Node_Mesh< D_complex > | dft_with_shift (const TwoD_Node_Mesh< D_complex > &f) |
OneD_Node_Mesh< D_complex > | idft_with_ishift (const OneD_Node_Mesh< D_complex > &ft, double origin=0) |
A wrapper that calls the 'ishift' method above followed by the 'idft' method. More... | |
TwoD_Node_Mesh< D_complex > | idft_with_ishift (const TwoD_Node_Mesh< D_complex > &ft, double origin=0) |
OneD_Node_Mesh< D_complex > | dft (const OneD_Node_Mesh< D_complex > &f) |
(Slow) DFT of the real data (x_i,f_i), i = 0, ... N-1; N must be EVEN. More... | |
OneD_Node_Mesh< D_complex > | idft (const OneD_Node_Mesh< D_complex > &ft, double origin=0) |
(Slow) Inverse DFT of the complex data (omega_i,F_i), i = 0,...,N-1; N must be EVEN. More... | |
Some algorithms associated with Fourier transforms of CppNoddy container data.
OneD_Node_Mesh< D_complex > CppNoddy::FT::dft | ( | const OneD_Node_Mesh< D_complex > & | f | ) |
(Slow) DFT of the real data (x_i,f_i), i = 0, ... N-1; N must be EVEN.
f | The data to be (discrete) Fourier transformed. |
Definition at line 88 of file FT.cpp.
References CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::coord(), f, and CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::set_nodes_vars().
Referenced by dft_with_shift(), and main().
OneD_Node_Mesh< D_complex > CppNoddy::FT::dft_with_shift | ( | const OneD_Node_Mesh< D_complex > & | f | ) |
A wrapper that calls the 'dft' method above followed by the 'shift' method.
Definition at line 48 of file FT.cpp.
References dft(), f, and shift().
Referenced by dft_with_shift(), and main().
TwoD_Node_Mesh< D_complex > CppNoddy::FT::dft_with_shift | ( | const TwoD_Node_Mesh< D_complex > & | f | ) |
Definition at line 52 of file FT.cpp.
References CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::coord(), dft_with_shift(), f, CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::get_nodes_vars(), CppNoddy::TwoD_Node_Mesh< _Type >::set_nodes_vars(), and CppNoddy::TwoD_Node_Mesh< _Type >::xcoord().
OneD_Node_Mesh< D_complex > CppNoddy::FT::idft | ( | const OneD_Node_Mesh< D_complex > & | ft, |
double | origin = 0 |
||
) |
(Slow) Inverse DFT of the complex data (omega_i,F_i), i = 0,...,N-1; N must be EVEN.
ft | The frequency spectrum in the (unshifted) format. |
origin | The position of the first data point returned. |
Definition at line 153 of file FT.cpp.
References CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::coord(), f, CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::get_nnodes(), CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::get_nodes_vars(), and CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::get_nvars().
Referenced by idft_with_ishift(), and main().
OneD_Node_Mesh< D_complex > CppNoddy::FT::idft_with_ishift | ( | const OneD_Node_Mesh< D_complex > & | ft, |
double | origin = 0 |
||
) |
A wrapper that calls the 'ishift' method above followed by the 'idft' method.
ft | The frequency spectrum in the (unshifted) format. |
origin | The position of the first data point returned. |
Definition at line 68 of file FT.cpp.
References idft(), and ishift().
Referenced by idft_with_ishift(), and main().
TwoD_Node_Mesh< D_complex > CppNoddy::FT::idft_with_ishift | ( | const TwoD_Node_Mesh< D_complex > & | ft, |
double | origin = 0 |
||
) |
Definition at line 72 of file FT.cpp.
References CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::coord(), CppNoddy::TwoD_Node_Mesh< _Type >::get_nnodes(), CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::get_nodes_vars(), CppNoddy::TwoD_Node_Mesh< _Type >::get_nvars(), CppNoddy::TwoD_Node_Mesh< _Type >::get_xsection_at_ynode(), idft_with_ishift(), CppNoddy::TwoD_Node_Mesh< _Type >::set_nodes_vars(), CppNoddy::TwoD_Node_Mesh< _Type >::xcoord(), CppNoddy::TwoD_Node_Mesh< _Type >::xnodes(), and CppNoddy::TwoD_Node_Mesh< _Type >::ynodes().
OneD_Node_Mesh< D_complex > CppNoddy::FT::ishift | ( | const OneD_Node_Mesh< D_complex > & | ft | ) |
Invert the shif operation to recover a spectrum in the form that is expected by the idft routine.
ft | A previously shifted frequency spectrum. |
Definition at line 31 of file FT.cpp.
References CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::coord(), CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::get_nnodes(), and CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::get_nvars().
Referenced by idft_with_ishift().
OneD_Node_Mesh< D_complex > CppNoddy::FT::shift | ( | const OneD_Node_Mesh< D_complex > & | ft | ) |
Shift the frequency spectrum obtained from dft to give positive and negative freq.
Note: input should have an even number of nodes.
ft | The frequency spectrum in the (unshifted) format. |
Definition at line 15 of file FT.cpp.
References CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::coord(), CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::get_nnodes(), and CppNoddy::OneD_Node_Mesh< _Type, _Xtype >::get_nvars().
Referenced by dft_with_shift(), and main().
© 2012
R.E. Hewitt