# ALE.move not working on IntervalMesh

**URL:** <https://fenicsproject.discourse.group/t/ale-move-not-working-on-intervalmesh/8907>\
**Category:** mesh\
**Created:** [August 3, 2022, 7:27pm UTC](https://fenicsproject.discourse.group/t/ale-move-not-working-on-intervalmesh/8907 "2022-08-03T19:27:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lerthedc](https://yyz2.discourse-cdn.com/free1/user_avatar/fenicsproject.discourse.group/lerthedc/32/3921_2.png) [@lerthedc](https://fenicsproject.discourse.group/u/lerthedc)\
**Post date:** [August 3, 2022, 7:27pm UTC](https://fenicsproject.discourse.group/t/ale-move-not-working-on-intervalmesh/8907/1 "2022-08-03T19:27:17Z")

</div>

Hello,

I have DOLFIN version: 2019.2.0.dev0 and I’m trying to change the size of my 1d mesh at each time step. I have gotten ALE.move to work on a 2D mesh, but when I try to adapt the code to a 1D mesh it gives me a runtime error. There appears to be an issue with interpolating the expression onto the function, but I am not sure. This is a minimal code to reproduce the error:

```auto
import dolfin

mesh = dolfin.UnitIntervalMesh(4)

u = dolfin.Function(dolfin.VectorFunctionSpace(mesh, "CG", 1))
u.interpolate(dolfin.Expression("2*x[0]", degree=1))
dolfin.ALE.move(mesh, u)

```

gives me this error:

```auto
Untitled-1 in <module>
      <a href='untitled:Untitled-1?line=6'>7</a> 
      <a href='untitled:Untitled-1?line=7'>8</a> u = dolfin.Function(dolfin.VectorFunctionSpace(mesh, "CG", 1))
----> <a href='untitled:Untitled-1?line=8'>9</a> u.interpolate(dolfin.Expression("2*x[0]", degree=1))
      <a href='untitled:Untitled-1?line=9'>10</a> dolfin.ALE.move(mesh, u)
     <a href='untitled:Untitled-1?line=10'>11</a> dolfin.plot(mesh)

/usr/lib/petsc/lib/python3/dist-packages/dolfin/function/function.py in interpolate(self, u)
    379 def interpolate(self, u):
    380 if isinstance(u, ufl.Coefficient):
--> 381 self._cpp_object.interpolate(u._cpp_object)
    382 else:
    383 self._cpp_object.interpolate(u)

RuntimeError: 

*** -------------------------------------------------------------------------
*** DOLFIN encountered an error. If you are not able to resolve this issue
*** using the information listed below, you can ask for help at
***
*** fenics-support@googlegroups.com
***
*** Remember to include the error message listed below and, if possible,
...
*** 
*** DOLFIN version: 2019.2.0.dev0
*** Git changeset: unknown
*** -------------------------------------------------------------------------

```

---

<div class="post-metadata">

**Author:** ![kamensky](https://avatars.discourse-cdn.com/v4/letter/k/e95f7d/32.png) [@kamensky](https://fenicsproject.discourse.group/u/kamensky)\
**Post date:** [August 3, 2022, 10:09pm UTC](https://fenicsproject.discourse.group/t/ale-move-not-working-on-intervalmesh/8907/2 "2022-08-03T22:09:25Z")

</div>

You need to provide a tuple of scalar `Expression`s to interpolate into a `VectorFunctionSpace`, even in 1D. The following modification works:

```python
#u.interpolate(dolfin.Expression("2*x[0]", degree=1))
u.interpolate(dolfin.Expression(("2*x[0]",), degree=1))

```
