Maintaining and reusing parallel numerical applications is not an easy task. We propose an OO design which enables very good
code reuse for both sequential and parallel linear algebra applications. A linear algebra class library called LAKe is implemented
using our design method. We show how the same code is used to implement both the sequential and the parallel version of the
iterative methods implemented in LAKe. We show that polymorphism is insufficient to achieve our goal and that both genericity
and polymorphism are needed. We propose a new design pattern as a part of the solution. Some numerical experiments validate
our approach and show that efficiency is not sacrified.
Keywords OO design - parallel code reuse - Krylov methods