dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #06442
Re: pydolfin and DefaultVector
On Mon, Mar 10, 2008 at 02:47:37PM +0100, Ola Skavhaug wrote:
> Ola Skavhaug skrev den 10/03-2008 følgende:
> > Hi,
> >
> > it seems like we have some trouble when Vector::vec() returns a DefaultVector
> > in the Python interface to DOLFIN. By some reason, swig doesn't see that the
> > DefaultVector is simply either a PETScVector or a uBlasVector. Hence, the
> > returned vector is not usable from PyDOLFIN.
> >
> > Does anyone have a solution to this? I have tried to use typedefs to get
> > around, but no luck so far.
> >
> > Ola
>
> I found a fix. We must include the dolfin/default_la_types.h in the swig
> interface files. Is there a reason this file is omitted in the
> dolfin_headers.h file?
>
> Ola
No, just that I didn't think it was needed.
Note that dolfin_headers.py is generated using the script generate.py,
so don't edit it directly (edit src/la/dolfin_la.h instead).
--
Anders
References