Pass value to a function in a 2n degree Lagrange function spaces

Hello everyone! I want to pass a value of the function u to a function v in the 2 degree Lagrange function spaces V. However, it seems that using the x.array is not correct.

class U():
    def __call__(self, x):
   
        return -50*np.sin(20*x[1])

V = fem.functionspace(domain, ("Lagrange", 2))
u = fem.Function(V)
v = fem.Function(V)
u.interpolate(U())
v.x.array=u.x.array

The error is that: “AttributeError: property ‘array’ of ‘Vector’ object has no setter”

Something like

v.x.array[:]=u.x.array

should work, but I can’t test it because your example is not reproducible.

Thanks! It solves my problem really well!