f = Function(Q) g = Function(Q) f.vector()[:] = g.vector() #does this work in parallel? f.vector()[:] = g.vector()[:] f.vector().set_local(g.vector().array()) f.assign(g) #apparently this would break pointers to f.split()
I have tested this quite thoroughly and in my experience the fastest approach is none of the above, rather
f.vector().zero() f.vector().axpy(1.0, g.vector())
All of the methods should work in parallel afaik.