← Back to team overview

dolfin team mailing list archive

Abstract base class for SparsityPattern?

 

Hi,

I'm working on implementing pycc::CRS as a direct sub class of
dolfin::GenericMatrix, and need an abstract base class for sparsity patterns.
For the moment, dolfin::SparsityPattern is not polymorphic, so I can't inherit
from it. The best solution would perhaps be to have a GenericSparsityPattern
defining the public interface for sparsity patterns, and then dolfin can
implement dolfin::SparsityPattern as a concrete subclass, and in PyCC we can
implement a pycc::CRSGraph as another subclass.

Any ideas or future plans for implementing this? The benefit from this
construction would be the possibility of using dolfin/ffc to assemble pdes in
PyCC, such that we can throw our old matrix factories out the door.

Ola


Follow ups