Concept
Python
Advanced
40 min
The adjoint method: why 200 derivatives cost two solves, not 201
Afterwards you can derive the adjoint of a linear discretized model, get a gradient in many parameters from two solves, and check it by finite differences.