I am looking for a way to do local sensitivity analysis for PDEs, preferably in Python.
I get the impression that discretizing the equation then treating it as an ODE could work; however, would that be computationally tractable?
Wouldn't there be an efficiency gain in keeping the PDE structure rather than reverting to a (hard) ODE? Especially, allowing adaptive spatial grids (as in this paper that does adjoint sensitivity with adaptive mesh) seems like it would be a huge boost. Is this intuition correct? If yes, is there any prior existing implementation of PDE-specific sensitivity analysis, or should I tweak an ODE one or write from scratch?