Category : fftw

Recently I’ve been trying to deepen my understanding of the MPI standard and I’ve came across topologies which probably can simplify some parts of my existing code which among other things uses FFTW3 with MPI. It’s a single grid based Schrödinger equation solver, which I’m now extending for multiple grids that should communicate using inter-communicators. ..

Read more

This question builds up on the previous post: FFTW3 segmentation errors while using std::vector container for FFT I cannot localize the problems with my FFT routines, done repeatedly in a loop. I compile using g++ -std=c++17 smoother.cpp -lfftw3_omp -lfftw3f -lfftw3 -lm -fopenmp -lstdc++fs -o smoother.exe The binary files I’m working on are single precision and ..

Read more

i’m trying to port some code from CPU to GPU that includes some FFTs. So, on CPU code some complex array is transformed using fftw_plan_many_r2r for both real and imag parts of it separately. Function foo represents R2R transform routine and called twice for each part of complex array. void foo(vector_double &evg) { int nx ..

Read more

Consider a container for two-dimensional complex-valued arrays #include <vector> #include <array> struct Array2D { typedef std::array<double, 2> complex; int X, Y; std::vector<complex> values; }; and a function that uses FFTW to compute the Fourier transform: #include <fftw3.h> void FourierTransform(const Array2D& source, Array2D *dest) { fftw_plan p = fftw_plan_dft_2d(source.X, source.Y, (fftw_complex*)source.values.data(), (fftw_complex*)dest->values.data(), FFTW_FORWARD, FFTW_ESTIMATE); fftw_execute(p); fftw_destroy_plan(p); ..

Read more

I have a function which does a Hilbert transform on a std::vector containing discrete samples. I have learned that a band pass filter on my samples can increase the quality of the Hilbert Transform. The code of the Hilbert transform function is shown below. How can I add a band pass filter to this function? ..

Read more