dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #03323
Re: PyDolfin, extension
Johan Jansson skrev den 18/09-2006 f�de:
> On Mon, Sep 18, 2006 at 09:04:14PM +0200, Ola Skavhaug wrote:
> > I've written some extensions to the NewMesh class in dolfin, such that the
> > lists of cells and vertices are exposted to Python as Numeric.arrays.
> >
> > I haven't debugged the code with respect to memory leaks or other robustness
> > checks, so use it at your own risk :)
> >
> > A simple test script would be:
> >
> > from dolfin import *
> >
> > us = NewUnitSqure(10,10)
> > print us.cells()
> > print us.vetices()
> >
> > The next step on my agenda is to add support for the new mesh in our runtime
> > vtk-plotter, and issue a GPLed version to you guys.
> >
> >
> > Ola
>
> This is excellent. It would be nice to expose containers in general as
> native Python types, this is a nice start.
Sure, I agree that converting the overlapping types to native Python usually
pays off in some way. At least, a more "Pythonic" interface can be achieved.
I guess that it boils down to a design issue. Do you want to adjust the API of
dolfin when exposing it to various languages?
> Johan
>
References