pyroteus / opt_adapt

PDE-constrained optimisation using mesh adaptive methods
0 stars 1 forks source link

Prepare for order 2 methods #6

Closed jwallwork23 closed 2 years ago

jwallwork23 commented 2 years ago

We would like to implement some order 2 optimisation methods such as BFGS. In order to do that, we need to be able to keep track of Hessian approximations, as well as the current and previous values of controls, QoIs and gradients.

This PR is the first step towards that. It switches the output of the step function so that it is comprised of dictionaries. This means that we can add later additional items in the order 2 case. The input arguments are also reordered, so that we can flexibly pass *args of different sizes