Ola Skavhaug wrote: > 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.
Sounds good, but what is it that CRSGraph needs that SparsityPattern does not already provide? The sparsity pattern is computed as a std::vector< std::set<int> > sparsity_pattern; which presumably should be enough to initialize a CRS matrix. > 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. Just go ahead and implement it (if you need it, see above). /Anders > Ola > _______________________________________________ > DOLFIN-dev mailing list > [email protected] > http://www.fenics.org/mailman/listinfo/dolfin-dev _______________________________________________ DOLFIN-dev mailing list [email protected] http://www.fenics.org/mailman/listinfo/dolfin-dev
