  In moving mesh methods, the underlying mesh is dynamically adapted without
changing the connectivity of the mesh. We specifically consider the generation
of meshes which are adapted to a scalar monitor function through
equidistribution. Together with an optimal transport condition, this leads to a
Monge-Amp\`ere equation for a scalar mesh potential. We adapt an existing
finite element scheme for the standard Monge-Amp\`ere equation to this mesh
generation problem; this is a mixed finite element scheme, in which an extra
discrete variable is introduced to represent the Hessian matrix of second
derivatives. The problem we consider has additional nonlinearities over the
basic Monge-Amp\`ere equation due to the implicit dependence of the monitor
function on the resulting mesh. We also derive the equivalent
Monge-Amp\`ere-like equation for generating meshes on the sphere. The finite
element scheme is extended to the sphere, and we provide numerical examples.
All numerical experiments are performed using the open-source finite element
framework Firedrake.
