I've had similar problems with the ALE.move()
function. My knowledge of FEniCS is limited, but I think that multiplying u
by some constant changes the type
of the function. If you take type(u)
and type(dx)
then you'll see that they're different kinds of Python objects.
This approach usually works for me:
V = VectorFunctionSpace(mesh0, "CG", 1)
du = project(1.0/steps*u,V)
ALE.move(mesh0,du)
Alternatively, you can try this if you want to avoid the project()
function:
V = VectorFunctionSpace(mesh0, "CG", 1)
du = Function(V)
du.vector()[:] = 1.0/steps*u.vector()
ALE.move(mesh0,du)