CppNoddy  0.92
Loading...
Searching...
No Matches
FT.h
Go to the documentation of this file.
1/// \file FT.h
2/// A spec for a collection of Fourier methods that act on Noddy containers
3
4#ifndef FT_H
5#define FT_H
6
7#include <OneD_Node_Mesh.h>
8#include <TwoD_Node_Mesh.h>
9#include <Types.h>
10
11namespace CppNoddy {
12 /// Some algorithms associated with Fourier transforms of CppNoddy container data.
13 namespace FT {
14
15 /// Shift the frequency spectrum obtained from dft to give positive and negative freq.
16 /// Note: input should have an even number of nodes.
17 /// \param ft The frequency spectrum in the (unshifted) format.
18 /// \return The frequency spectrum in the (shifted) format.
19 /// -(N/2)domega,...,-domega,0,domega,...,(N/2-1)*domega
21
22 /// Invert the shif operation to recover a spectrum in the form that is expected
23 /// by the idft routine.
24 /// \param ft A previously shifted frequency spectrum.
25 /// \return The frequency spectrum in the (unshifted) format.
26 /// 0,domega,...,(N/2)*domega, (N/2+1)*domega,...,(N-1)*domega.
28
29 /// A wrapper that calls the 'dft' method above followed by the 'shift' method.
30 /// \return The Fourier transform in "frequency" space (omega_i,F_i).
31 /// The N frequencies are
32 /// omega_i = -(N/2)*domega, ..., -domega , 0 , +domega, ... ,+(N/2-1)*domega.
34
36
37 /// A wrapper that calls the 'ishift' method above followed by the 'idft' method.
38 /// \param ft The frequency spectrum in the (unshifted) format.
39 /// \param origin The position of the first data point returned.
40 /// \return The inversion data (origin+x_i, f_i).
42
44
45 /// (Slow) DFT of the real data (x_i,f_i), i = 0, ... N-1; N must be EVEN.
46 /// \param f The data to be (discrete) Fourier transformed.
47 /// \return The Fourier transform in "frequency" space (omega_i,F_i).
48 /// The N frequencies are omega_i = 0, domega,..., (N-1)*domega.
49 /// The SECOND half of the spectrum provides the -ve frequencies (as in MATLAB).
51
52 /// (Slow) Inverse DFT of the complex data (omega_i,F_i), i = 0,...,N-1; N must be EVEN.
53 /// \param ft The frequency spectrum in the (unshifted) format.
54 /// \param origin The position of the first data point returned.
55 /// \return The inversion data (origin+x_i, f_i).
56 OneD_Node_Mesh<D_complex> idft( const OneD_Node_Mesh<D_complex>& ft, double origin = 0 );
57
58 }
59
60} // end namespace
61
62#endif // FT_H
@ f
Definition: BVPBerman.cpp:15
A specification for a one dimensional mesh object.
A specification for a two dimensional mesh object.
Some standard typedefs.
A one dimensional mesh utility object.
A two dimensional mesh utility object.
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.
Definition: FT.cpp:88
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.
Definition: FT.cpp:48
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.
Definition: FT.cpp:68
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.
Definition: FT.cpp:15
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.
Definition: FT.cpp:31
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.
Definition: FT.cpp:153
A collection of OO numerical routines aimed at simple (typical) applied problems in continuum mechani...

© 2012

R.E. Hewitt