← Back to team overview

dolfin team mailing list archive

Re: GenericVector and PyDOLFIN

 

On Wednesday 19 August 2009 17:29:52 Garth N. Wells wrote:
> What's going on behind the scene when I copy one vector to another in
> PyDOLFIN using
>
>      u0.vector()[:] = u.vector()[:]

When I add:

u2 = Function(V)
u2.vector()[:] = u.vector()[:]

# Plot solution
plot(u2)

In a the Poisson demo it works fine.

This type of slice only uses the assignment operator. Other slices might not 
work. Have not checked.

Johan

> ? The issue is that it doesn't work in parallel.
>
> Garth
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev


Follow ups

References