[petsc-dev] [petsc4py] Extending the Mat extension type

Matthew Knepley knepley at gmail.com
Mon Oct 29 10:40:31 CDT 2012


On Mon, Oct 29, 2012 at 11:15 AM, Lisandro Dalcin <dalcinl at gmail.com> wrote:

> On 29 October 2012 09:46, Florian Rathgeber <florian.rathgeber at gmail.com>
> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > [Apologies if this should have gone to petsc-users instead]
> >
>
> I think this list is perfectly fine for the subject of your request.
>
> > I'd like to extend petsc4py's Mat extension type to expose
> > MatCreateSeqAIJWithArrays and MatGetArray/MatRestoreArray to python,
> > ideally via attributes/methods directly on the extension type.
> >
>
> A minor issue with MatGetArray/MatRestoreArray is to properly support
> AIJ and DENSE matrices.


Don't do this. We have changed the interface so that it is specific to the
subtypes:

  http://www.mcs.anl.gov/petsc/documentation/changes/dev.html

     Matt


> > I know these shouldn't normally be used and reading this thread [1]
> > I'm assuming Lisandro doesn't currently have any plans for adding
> > either of those to petsc4py?
> >
>
> I would love to add them, the only issue is that I'm not sure about
> how to support all the various sparse matrix formats.
>
> We could start by only supporting AIJ matrices. If you can help with
> an initial patch, I can continue to refine it.
>
> Are you using petsc-3.3? We can add the required support in branch
> release-3.3 of petsc4py, then make a new patch release.
>
>
> --
> Lisandro Dalcin
> ---------------
> CIMEC (INTEC/CONICET-UNL)
> Predio CONICET-Santa Fe
> Colectora RN 168 Km 472, Paraje El Pozo
> 3000 Santa Fe, Argentina
> Tel: +54-342-4511594 (ext 1011)
> Tel/Fax: +54-342-4511169
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20121029/93bb5993/attachment.html>


More information about the petsc-dev mailing list