FFT_3D Function

public function FFT_3D(signal, method, threads) result(result)

Perform a 3D Fast Fourier Transform on a signal

This function takes a signal and performs a Fourier Transform using the specified method. The available methods are:

  • "FFTW_FFT_3D": Fast Fourier Transform using FFTW
  • "FFTW_FFT_3D" + threads: Fast Fourier Transform using FFTW with multithreading

Arguments

Type IntentOptional Attributes Name
complex(kind=dp), intent(inout), dimension(:, :, :) :: signal
character(len=*), intent(in) :: method
integer, intent(in), optional :: threads

Return Value complex(kind=dp), dimension(size(signal, 1), size(signal, 2), size(signal, 3))


Calls

proc~~fft_3d~~CallsGraph proc~fft_3d FFT_3D fftw_cleanup fftw_cleanup proc~fft_3d->fftw_cleanup fftw_cleanup_threads fftw_cleanup_threads proc~fft_3d->fftw_cleanup_threads fftw_destroy_plan fftw_destroy_plan proc~fft_3d->fftw_destroy_plan fftw_execute_dft fftw_execute_dft proc~fft_3d->fftw_execute_dft fftw_init_threads fftw_init_threads proc~fft_3d->fftw_init_threads fftw_plan_dft_3d fftw_plan_dft_3d proc~fft_3d->fftw_plan_dft_3d fftw_plan_with_nthreads fftw_plan_with_nthreads proc~fft_3d->fftw_plan_with_nthreads

Source Code

    function FFT_3D(signal, method, threads) result(result)

        complex(dp), dimension(:, :, :), intent(inout) :: signal
        character(*), intent(in) :: method
        integer, optional, intent(in) :: threads
        complex(dp), dimension(size(signal, 1), size(signal, 2), size(signal, 3)) :: result

        if (method == "FFTW_FFT_3D" .and. .not. present(threads)) then
            result = FFTW_FFT_3D(signal)
        else if (method == "FFTW_FFT_3D" .and. present(threads)) then
            result = FFTW_FFT_3D_threads(signal, threads)
        else
            stop "ERROR : Wrong method for FFT_2D"
        end if

    end function FFT_3D