The paper presents a workflow for adjusting parameters or inputs in mathematical models described by partial differential equations. For linear equations, the method differentiates through a linear-system solver; for nonlinear equations, it uses a connection between FEniCS and PyTorch. Automatic differentiation calculates the gradients needed for optimization without requiring researchers to manually derive every auxiliary equation.

The authors apply the workflow to stationary and time-dependent problems, using finite-difference and finite-element discretizations. Their examples include Poisson problems, fluid–structure interaction, parameter estimation, control of a system's right-hand side, initial conditions and boundary conditions, as well as neural-network models that represent unknown quantities.