Software for Numerical Methods for Partial Differential Equations

This software was developed for and by the students in CS 615, Numerical Methods for Partial Differential Equations in the Spring semester of 2000. Its goal is to implement the finite element method in two dimensions. It is written in Scheme, and uses some features of Gambit-C, the Scheme->C compiler written by Marc Feeley. It uses Meroon, developed by Christian Queinnec, as its object system. (The version of Meroon we used is available here.) The last two files are the files used to build this index page.

Note: This software is a work in progress. While much of it works as intended, much of it has not yet even been tested.

The software is relatively fast. For example, the sparse-matrix/vector multiply code runs in 10 cycles per flop on our Compaq DS20 clone (dual 500 MHz 21264s with 4 megabyte caches) after compiling the C code generated by Gambit-C with gcc-2.95.1 with the options "-mcpu=ev6 -O2 -mieee -fPIC -fno-math-errno". The -fno-math-errno option, backported from the development compiler, causes the compiler to not set ERRNO if sqrt returns a NaN. The same code written in C , with the same matrix structure, the same compiler, and the same compiler options, has exactly the same performance.

Note added later in course: Jason Gower wrote code to number the vertices, and hence the linear elements, along a space-filling curve. The new connectivity pattern is in connectivity2.gz. With this connectivity pattern, the scheme code runs in 8.25 cycles/flop, which is again just as fast as the C version.

Note: The performance of the code changes daily. Final results will be posted at the end of the course.

The code is coming along nicely and passes the tests in final-tests.scm. Note that with the infrastructure that we have built, it is trivial to compute things like the L2 and H1 norms of the error.

Timing and accuracy results are now available for the multigrid code applied to problems of varying difficulty in the file mg-results. Some results on bigger problems can be found in mg-results2.

Timing and accuracy results are now available for the conjugate-gradient code applied to problems of varying difficulty in the file cg-results.

The file parabolic.scm contains a solver for parabolic differential equations, and the file mmoc.scm contains a solver for transport-dominated diffusion problems.

A gzipped tarball of all the sources can be found here. A short article describing the process of software development can be found here.

meroon.tgz

Changelog

all.scm

utilities.scm

random.scm

sort.scm

linear-algebra.scm

sparse-linear-algebra.scm

points.scm

geometry.scm

geometry-code.scm

linear-elements.scm

linear-elements-code.scm

problem-descriptions.scm

conjugate-gradient.scm

intergrid.scm

multigrid.scm

parabolic.scm

mmoc.scm

obstacle.scm

polygon.scm

final-tests.scm

final-tests-obstacle.scm

test.scm

test-parabolic.scm

test-mmoc.scm

tex.scm

html-lib.scm

describe.scm