dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #06276
Re: Python wrapper for IntersectionDetector
On Sat, Feb 16, 2008 at 12:02:58AM +0100, cosby@xxxxxxxxx wrote:
> > On Fri, Feb 15, 2008 at 12:31:25PM +0100, Kristen Kaasbjerg wrote:
> >> Hi again,
> >>
> >> is there a reason that the IntersectionDetector class
> >> haven't been wrapped to python ?
> >
> > The reason is very simple. The Python interface is maintained by
> > myself and Ola Skavhaug and we haven't used IntersectionDetector.
> >
> >> Would it be too optimistic just to add
> >>
> >> %include "dolfin/IntersectionDetector.h"
> >>
> >> in the dolfin_headers.h file and then hope that it will
> >> work ?
> >
> > dolfin_headers.h is generated by generate.py from all the dolfin_foo.h
> > headers in the src/kernel/foo/ directories. Try adding it in the
> > appropriate dolfin_foo.h file, then run generate.py and reuild
> > (remembering to touch dolfin.i).
> >
> >> All the input arguments for its public function have
> >> been wrapped, so I don't see why this would go wrong ?
> >
> > Try it out and tell me if it works and then we can add it.
>
> Worked perfectly as long as you have gts installed! Just one
> tiny problem; IntersectionDetector has no destructor so on termination
> of python SWIG reports:
> swig/python detected a memory leak of type 'dolfin::IntersectionDetector
> *', no destructor found.
>
> Fairly easy to fix I guess.
>
> Kristen
ok, it's been added.
--
Anders
References