petsc-3.7.1 2016-05-15
Report Typos and Errors

MatCreateVecsFFTW

Get vector(s) compatible with the matrix, i.e. with the parallel layout determined by FFTW

Synopsis

#include "petscmat.h" 
#include "petscvec.h"   
PetscErrorCode MatCreateVecsFFTW(Mat A,Vec *x,Vec *y,Vec *z)
Collective on Mat Many br

Input Parameter

A -the matrix Many br

Output Parameter

x - (optional) input vector of forward FFTW Many br
y - (optional) output vector of forward FFTW Many br
z -(optional) output vector of backward FFTW Many br

Many br

Note: The parallel layout of output of forward FFTW is always same as the input Many brof the backward FFTW. But parallel layout of the input vector of forward Many brFFTW might not be same as the output of backward FFTW. Many brAlso note that we need to provide enough space while doing parallel real transform. Many brWe need to pad extra zeros at the end of last dimension. For this reason the one needs to Many brinvoke the routine fftw_mpi_local_size_transposed routines. Remember one has to change the Many brlast dimension from n to n/2+1 while invoking this routine. The number of zeros to be padded Many brdepends on if the last dimension is even or odd. If the last dimension is even need to pad two Many brzeros if it is odd only one zero is needed. Many brLastly one needs some scratch space at the end of data set in each process. alloc_local Many brfigures out how much space is needed, i.e. it figures out the data+scratch space for Many breach processor and returns that. Many br

See Also

MatCreateFFTW()

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