#include "petscmat.h" #include "petscvec.h" PetscErrorCode MatCreateVecsFFTW(Mat A,Vec *x,Vec *y,Vec *z)Collective on Mat
x | - (optional) input vector of forward FFTW | |
y | - (optional) output vector of forward FFTW |
Note: The parallel layout of output of forward FFTW is always same as the input of the backward FFTW. But parallel layout of the input vector of forward FFTW might not be same as the output of backward FFTW. Also note that we need to provide enough space while doing parallel real transform. We need to pad extra zeros at the end of last dimension. For this reason the one needs to invoke the routine fftw_mpi_local_size_transposed routines. Remember one has to change the last dimension from n to n/2+1 while invoking this routine. The number of zeros to be padded depends on if the last dimension is even or odd. If the last dimension is even need to pad two zeros if it is odd only one zero is needed. Lastly one needs some scratch space at the end of data set in each process. alloc_local figures out how much space is needed, i.e. it figures out the data+scratch space for each processor and returns that.
Level:advanced
Location:src/mat/impls/fft/fftw/fftw.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages