1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatCreateVecsFFTW.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>MatCreateVecsFFTW</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.7.5 2017-01-01</b></div>
<div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.7.5 v3.7.5 docs/manualpages/Mat/MatCreateVecsFFTW.html "><small>Report Typos and Errors</small></a></div>
<A NAME="MatCreateVecsFFTW"><H1>MatCreateVecsFFTW</H1></A>
Get vector(s) compatible with the matrix, i.e. with the parallel layout determined by FFTW
<H3><FONT COLOR="#CC3333">Synopsis</FONT></H3>
<PRE>
#include "petscmat.h"
#include "petscvec.h"
PetscErrorCode MatCreateVecsFFTW(Mat A,Vec *x,Vec *y,Vec *z)
</PRE>
Collective on <A HREF="../Mat/Mat.html#Mat">Mat</A>
<P>
<H3><FONT COLOR="#CC3333">Input Parameter</FONT></H3>
<DT><B>A </B> -the matrix
<br>
<P>
<H3><FONT COLOR="#CC3333">Output Parameter</FONT></H3>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>x </B></TD><TD>- (optional) input vector of forward FFTW
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>y </B></TD><TD>- (optional) output vector of forward FFTW
</TD></TR></TABLE>
<DT><B>z </B> -(optional) output vector of backward FFTW
<br>
</TABLE>
<P>
<P>
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.
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
MatCreateFFTW()
<BR><P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>advanced
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/mat/impls/fft/fftw/fftw.c.html#MatCreateVecsFFTW">src/mat/impls/fft/fftw/fftw.c</A>
<BR><A HREF="./index.html">Index of all Mat routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
</BODY></HTML>
|