Supporting Files


Plot Program

A Unix plot program that you could use if you have none is

~dommelen/bin/xyplot

In order to use this plot program, your plot file must have a certain structure. As an example, suppose you want to plot a piecewise linear curve going through the points (0,0), (1,1), (2,4), and (3,9) and also two individual symbols, one at (4,4) and one at (8,8). The plot file would look as follows:

4
0,0
1,1
2,4
3,9
-2
4,4
8,8

Note that the first set of points is preceded by the total number of points, 4. The second set is preceded by minus the total number of points, -2. The general rule is that if we want a piecewise linear curve through the points, we precede them by the positive point count, and if we want the points shown as discrete points, we precede by minus the point count. We can add more curves to the input file as needed.

Assuming your plot file is called plot.dat, to plot it, enter

~dommelen/bin/xyplot plot.dat

Xyplot will ask for labels, a title, and more; just hit return until it asks for a device to use. Device 1 produces a screen plot if you are using x-windows or x-win32. Devices 2 and 3 produce plot file dump.ps that can be printed on various lab printers. You can also look at dump.ps using ghostview under x-windows or x-win32, or if you have ghostview installed on your PC.


Exact Solution

The exact solution can be found from solving the problem using separation of variables and then numerically summing the eigenfuctions. Functions that do so are:


Tridiagonal Solver

The following functions or subroutines solve a tridiagonal system of equations given the equation coefficients and right hand side.


Fourier Coefficients

The following functions or subroutines find the Fourier coefficients of your solution at a given time. Note that they require that the solution is copied into aone-dimensional array.


Return