This PR updates the adjoint solver by introducing a Linear Variational Solver to handle adjoint equations. It also addresses an issue arising when the Jacobian is constant and the tape recomputation is required after updating an equation parameter (a common scenario in optimisation solvers).
I have executed tests to compare computation time and memory usage between the master branch and this current branch. The tests consider three time-dependent cases:
Nonlinear: Navier-Stokes and Burger's equations (5 subsequent functional recomputation and gradient calculation)
Linear: FWI optimisation (5 iteration) and Heat equation (5 subsequent functional recomputation and gradient calculation)
The test scripts are available here, and the plots comparing this branch with the master branch are shown below.
Feel free to add your review to anyone interested in this PR.
Description
This PR updates the adjoint solver by introducing a Linear Variational Solver to handle adjoint equations. It also addresses an issue arising when the Jacobian is constant and the tape recomputation is required after updating an equation parameter (a common scenario in optimisation solvers).
I have executed tests to compare computation time and memory usage between the master branch and this current branch. The tests consider three time-dependent cases:
Nonlinear: Navier-Stokes and Burger's equations (5 subsequent functional recomputation and gradient calculation)
Linear: FWI optimisation (5 iteration) and Heat equation (5 subsequent functional recomputation and gradient calculation)
The test scripts are available here, and the plots comparing this branch with the master branch are shown below.
Feel free to add your review to anyone interested in this PR.