Lagrangian coordinates ---------------------- When equations for the mesh position are formulated, the positions of the mesh nodes become part of the equations, i.e. they become dependent variables. The corresponding interpolated field can be obtained by the variable ``var("mesh")`` (vectorial) or ``var("mesh_x")``, ``var("mesh_y")`` and ``var("mesh_z")`` for the individual components. However, since these are now dependent variables, it is beneficial to also have a fixed coordinate system, i.e. independent variables. These are the so-called *Lagrangian coordinates*, accessible with ``var("lagrangian")`` and ``var("lagrangian_x")``, ``var("lagrangian_y")``, ``var("lagrangian_z")``, respectively (see :py:func:`~pyoomph.expressions.generic.var` for more details). These coordinates are initialized by default with the initial mesh positions, but they do not change when the mesh moves. A mesh node at a coordinate :math:`\vec{x}_0` may move to another position, e.g. :math:`\vec{x}_1`, but it will still have the same Lagrangian coordinate afterwards. In that sense, the Lagrangian coordinates move along with the mesh motion - they are attached to the mesh. Let us denote the Lagrangian coordinates with :math:`\vec{\xi}`, then the Eulerian mesh coordinates :math:`\vec{x}` can be described as a function of :math:`\vec{\xi}` and time :math:`t`, i.e. .. math:: \vec{x}=\vec{x}\left(\vec{\xi},t\right) We can hence formulate equations for the mesh coordinates by describing them by Lagrangian coordinates. To that end, we can also calculate spatial derivatives, e.g. :py:func:`~pyoomph.expressions.generic.grad` and :py:func:`~pyoomph.expressions.div`, with respect to the Lagrangian coordinates instead the Eulerian ones. This is done by adding the keyword argument ``lagrangian=True`` to the calls of :py:func:`~pyoomph.expressions.generic.grad` and :py:func:`~pyoomph.expressions.div`. Likewise, when assembling weak forms, we can also integrate over the Lagrangian domain instead of the Eulerian one by adding the keyword argument ``lagrangian=True`` to the calls of :py:func:`~pyoomph.expressions.generic.weak`.