In numerical science it is often more difficult to develop parallel applications than equivalent sequential applications. A reasonable strategy to many is first to develop a sequential version, then make it parallel.
Diffpack and PETSc are two software libraries that simplifies this task.
Though both libraries share the same goal, their focus are different. Diffpack is a complete framework for solving partial differential equations, while PETSc is mainly concerned with solving linear equations.
By extending Diffpack with PETSc we get access to more linear solvers and preconditioners, while keeping the flexibility of Diffpack as a complete framework.
In this Master Thesis we look at how we can extend Diffpack with PETSc linear solvers and preconditioners.
To be able to extend Diffpack with PETSc, we developed methods for converting the matrices and vectors between Diffpack and PETSc. Though the methods apply to scalar equations on a parallel computer, they can be generalized to handle vector equations and support a sequential computer. The thesis ends with experiments on the Poisson equation, where we measured solution time and overhead.
The experiments give indication that PETSc can in some cases outperform Diffpack, despite the overhead involved with conversion between the libraries.