dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #14034
Re: PyDOLFIN and overloading '='
On Sat, Jun 20, 2009 at 1:10 PM, Garth N. Wells<gnw20@xxxxxxxxx> wrote:
> I tried to do
>
> u0.vector() = u1.vector()
It's not legal in Python to assign to function calls, so the above
syntax isn't possible.
Ola
> where u0 and u1 are both discrete functions, in PyDOLFIN but it doesn't
> work so I'm using
>
> u0.vector().assign( u1.vector() )
>
> Is there a fundamental reason why '=' can't be used or does SWIG just
> need to be told how to overload '=' for vectors?
>
> Garth
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev
>
--
Ola Skavhaug
References