On Saturday 20 June 2009 13:10:46 Garth N. Wells wrote:
I tried to do
u0.vector() = u1.vector()
where u0 and u1 are both discrete functions, in PyDOLFIN but it doesn't
work so I'm using
u0.vector().assign( u1.vector() )
This is the correct way to do it. Assignment operators are just ignored for
the dynamically typed languges supported by SWIG. We therefore rename the
foo.operator= to foo.assign.
However for the Vector and Matrix interfaces we also support the numpy
lookalike assignment:
v[:] = u
and
A[:,:] = B
I have talked to Anders about removing both v.assign and v.set(double *)
and "force" the PyDOLFIN users to use the numpy assignments.