Assigned Wednesday, Oct. 21, 2008, due Wednesday, Oct. 28, 2008
In this assignment you will create a 2D Fast Poisson solver using FFTW based 2D discrete sin transform routines.
Additional files you will need for this assignment :
In the FFTWinterface repository are the following files:
fftw3_sin1d.h fftw3_sin1d.cpp |
C++ interface to the FFTW 1-dimensional sin transform routines. |
fftw3_sin2d.h fftw3_sin2d.cpp |
C++ interface to the FFTW 2-dimensional sin transform routines. |
fftw3_sin1dTest.cpp fftw3_sin2dTest.cpp |
Test codes for 1-dimensional and 2-dimensional sin transform routines. |
LaplaceOp1dD.h LaplaceOp1dD.cpp |
1D Laplace operator routines. Both the forward and inverse operator (the latter being computed using the 1-dimensional sin transform). |
LaplaceOp1dDTest.cpp | Test codes for 1D Laplace operator routines. |
[1] Download the FFTWinterface codes. Obtain and install the FFTW libraries -- see Obtaining FFTW Libraries for details.
[2]
Test your installation by compiling and then running one or more of the test codes in FFTWinterface. To be successful, you will have to take additional steps to include the fftw3 routines.
On Windows Machines:
You will need to
PATH=%PATH%;Path to the folder containing libfftw3-3.dll
Path to the folder containing libfftw3-3.dll
is the location of the folder containing libfftw3-3.dll (sample screen shot). If you used the standard MS Windows "extract all" option to unzip the file containing the dll's then this will be the path specifying the folder fftw-3.1.2-dll (note that it is "-dll" in the folder name and not ".dll").
UCLA Math
Unix/Linux machines and other Unix/Linux machines where fftw3 libraries were pre-installed:
To use the libraries, you just need to link to the fftw3 library, e.g. add -lfftw3 to your compilation/linking command. (It's a small "ell" and not a 1, before fftw3).
On Unix/Linux machines where you have installed the fftw3 libraries:
To use the libraries, you need to specify the directory where you installed fftw3 library files and the name of the fftw3 library by adding
-L pathToLibFileDirectory
and
-lfftw3
to your compilation/linking command. (It's a small "ell" and not a 1, before fftw3). The "-L" option indicates to the compiler the directory where the library files are found.
[3] Write and then test a routine that uses the 2-dimensional sin transform routines to solve the discrete five-point Laplace equation with Dirichlet boundary conditions.