← Back to team overview

dolfin team mailing list archive

Re: STLVectorUInt in PyDOLFIN

 

On Wednesday 04 March 2009 13:34:17 Anders Logg wrote:
> On Wed, Mar 04, 2009 at 01:28:10PM +0100, Johan Hake wrote:
> > On Wednesday 04 March 2009 13:17:37 Garth N. Wells wrote:
> > > When running demo/mesh/intersection/demo.py, I get
> > >
> > >      Traceback (most recent call last):
> > >        File "demo.py", line 33, in <module>
> > >          cells = STLVectorUInt()
> > >      NameError: name 'STLVectorUInt' is not defined
> > >
> > > Any ideas?
> >
> > Should be fixed now
>
> How is the STL integration with Python lists? The optimal thing would
> be if one could write
>
>   cells = omega0.intersection(boundary, False)
>
> instead of
>
>   cells = STLVectorUInt()
>   omega0.intersection(boundary, cells, False)
>
> and cells would be a Python list.

Agree on this. 

Should be doable with the right typemaps.

I can fix it but not right now...

Is this the only place where we use STLVectorFoo? I feel that this type is a 
bit too low level to be used in the python interface, and we should as you 
suggest try to get rid of it.

Johan


Follow ups

References