In 1D the syntax for a Fourier Transform is essentially the same as it
is in LATTICEEASY, except that you must include the parameters
` my_rank` amd

`fftr1(&(f[fld][1]),N,1,my_rank,numprocs);`

In 2D and 3D CLUSTEREASY uses the Fourier Transform package FFTW, so
the syntax for a Fourier Transform is different. First, you must
declare a variable of type rfftwnd_mpi_plan to store the ``plan''
that FFTW uses to calculate the Fourier Transform. Next you must
create this plan with the command

`<my_plan_name> = rfftw3d_mpi_create_plan(MPI_COMM_WORLD, N, N, N, FFTW_REAL_TO_COMPLEX, FFTW_ESTIMATE);`

(In 2D you would write ``2d'' instead of ``3d'' and only include the
argument ` N` twice.) If you are planning to do a forward
transform and an inverse transform you will need a separate plan for
each, and for the inverse plan you should write ``COMPLEX_TO_REAL''
instead of ``REAL_TO_COMPLEX.'' You do not need a separate plan for
each field, or for the fields and derivatives. Finally, to take the
Fourier Transform you execute the command

`rfftwnd_mpi(<my_plan_name>, 1, &(f[fld][1][0][0]), NULL, FFTW_NORMAL_ORDER);`

In 2D you would simply write

Go to The LATTICEEASY Home Page

Go to Gary Felder's Home Page

Send email to Gary Felder at gfelder@email.smith.edu

Send email to Igor Tkachev at Igor.Tkachev@cern.ch

This documentation was generated on 2008-01-21