The aim with this thesis is to investigate how we can create unifiedinterfaces to some key software components that are needed whensolving partial differential equations. Two particular components areaddressed here: sparse matrices and visualization. We want theinterfaces to be simple to use, preferably with a Matlab-likesyntax. We also want the interfaces to be "thin" in the sense that theinterface code is small and provides access to core functionalityonly, not all nice-to-have options that one can think of. Theinterfaces are written in Python , a scripting language with asimple, clean and easy-to-use syntax, great software developmentflexibility, rapidly growing popularity, and rich libraries for bothnumerical and administrative tasks. The idea is to use Python to writethe main algorithm for solving PDEs and thereby steer underlyingnumerical software.
Chapter 1 presents a matrix library for storage, factorization, and"solve" operations. The goal is to have a unified interfaceto many different types of matrix formats, mainly sparse matrixformats, where the various formats typically have the core numerics inwidely different packages (BLAS, LAPACK, PySparse, for instance). PDEsolvers written in Python can then work with one API for creatingmatrices and solving linear systems. This idea is not new and has beenexplored in many C++ libraries, e.g., Diffpack , DOLFIN  andGLAS . The new contribution in this thesis is to have such aninterface in Python and explore some of Python's flexibility. Wealso have a more heterogeneous collection of underlying matrixlibraries than what the cited C++ packages aim at. Python is slow fornumber crunching so it is crucial to perform the factorization andsolve operations in compiled Fortran, C or C++ libraries. The PyACTSproject  has a goal quite similar to ours, but is aimed at thetools in the ACTS collection only (ScaLAPACK, SuperLU, Hyper, tomention some). A natural future extension of our matrix library willbe to incorporate PyACTS. This will also provide support for parallelcomputing. The present thesis is limited to serial computing only.
At the end of Chapter 1 we explore the matrix library for solvingdiffusion equations. In particular, we compare the the efficiency ofthe traditional ADI methods with sparse matrix factorization-basedsolution techniques.
Chapter 2 deals with a unified interface, called Easyviz, tovisualization packages, both for curve plotting and for 2D/3Dvisualization of scalar and vector fields. The interface calls upvarious plotting packages, some simple and easy-to-install likeGnuplot and some more comprehensive like VTK and Matplotlib. TheEasyviz syntax almost coincides with that of Matlab, thus making iteasy for students and researchers trained in Matlab to start plottingwith a Python-based platform. Or in other words, one can useMatlab-like syntax for accessing a wide range of visualizationtools. In this way, PDE solvers can visualize the solutions with acode independent of the underlying plotting package that actuallyproduces the plots. Chapter 2 acts as a tutorial for Easyviz and hasbeen written together with my supervisor Hans Petter Langtangen.
The focus of this thesis has been on developing reusable and stablesoftware and to document this software such that it can readily beapplied by students and scientists.