  In this paper, we develop a framework for solving inverse deformation
problems using the FEniCS Project finite element software. We validate our
approach with experimental imaging data acquired from a soft silicone beam
under gravity. In contrast with inverse iterative algorithms that require
multiple solutions of a standard elasticity problem, the proposed method can
compute the undeformed configuration by solving only one modified elasticity
problem. This modified problem has a complexity comparable to the standard one.
The framework is implemented within an open-source pipeline enabling the direct
and inverse deformation simulation directly from imaging data. We use the
high-level Unified Form Language (UFL) of the FEniCS Project to express the
finite element model in variational form and to automatically derive the
consistent Jacobian. Consequently, the design of the pipeline is flexible: for
example, it allows the modification of the constitutive models by changing a
single line of code. We include a complete working example showing the inverse
deformation of a beam deformed by gravity as supplementary material.
