Re: [Dolfin] std::vector& in Python

2011-02-22 Thread Garth N. Wells
On 22/02/11 17:49, Anders Logg wrote: > On Tue, Feb 22, 2011 at 05:38:24PM +, Garth N. Wells wrote: >> >> >> On 22/02/11 17:35, Johan Hake wrote: >>> What is the signature? >>> >>> Have you tried using: >>> >>> PY_SEQUENCE_OF_SCALARS_TO_VECTOR_OF_PRIMITIVES(TYPE, >>>

Re: [Dolfin] std::vector& in Python

2011-02-22 Thread Anders Logg
On Tue, Feb 22, 2011 at 05:38:24PM +, Garth N. Wells wrote: > > > On 22/02/11 17:35, Johan Hake wrote: > > What is the signature? > > > > Have you tried using: > > > > PY_SEQUENCE_OF_SCALARS_TO_VECTOR_OF_PRIMITIVES(TYPE, > > TYPE_UPPER, > >

Re: [Dolfin] std::vector& in Python

2011-02-22 Thread Johan Hake
On Tuesday February 22 2011 09:38:24 Garth N. Wells wrote: > On 22/02/11 17:35, Johan Hake wrote: > > What is the signature? > > > > Have you tried using: > > PY_SEQUENCE_OF_SCALARS_TO_VECTOR_OF_PRIMITIVES(TYPE, > > > > TYPE_UPPER, > >

Re: [Dolfin] std::vector& in Python

2011-02-22 Thread Garth N. Wells
On 22/02/11 17:35, Johan Hake wrote: > What is the signature? > > Have you tried using: > > PY_SEQUENCE_OF_SCALARS_TO_VECTOR_OF_PRIMITIVES(TYPE, > TYPE_UPPER, > ARG_NAME, >

Re: [Dolfin] std::vector& in Python

2011-02-22 Thread Johan Hake
What is the signature? Have you tried using: PY_SEQUENCE_OF_SCALARS_TO_VECTOR_OF_PRIMITIVES(TYPE, TYPE_UPPER, ARG_NAME, TYPE_NAME,

[Dolfin] std::vector& in Python

2011-02-22 Thread Garth N. Wells
I tried to use a function in MeshEditor from the Python interface, but failed because it expects a const std::vector&. What's the status of wrapping small std::vectors? Should it work, or should the C++ interface be changed to use a dolfin::Array? Garth ___