Hi,
Should be make a generic solver base class:
class Solver {
virtual uint solve(const GenericMatrix& A, GenericVector& x, const
GenericVector& b) = 0;
};
The class LinearSolver is using Matrix and Vector now, and I think it should
be safe to change this to a more generic interface. Alternatively, the Solver
class could be named:
GenericLinearSolver
LinearSolver
GenericSolver
Similarly, we could have GenericPreconditioner:
class GenericPreconditioner {
virtual void update(const GenericMatrix& A) = 0;
virtual void apply(GenericVector& x, const GenericVector& b) const = 0;
};
Implementing these interfaces in DOLFIN should be simple; simply add the
methods and use dynamic_cast to call existing functionality.
Ola
_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev