Dolfin-adjoint: Automatic adjoint models for FEniCS