“…While this approach works well on codes written so as to be amenable to AD such as dolfin-adjoint [19,20], it can otherwise consume large amounts of memory and be extremely challenging to debug [21,22]. The alternative approach is to derive and code the discrete adjoint equations, an established approach in the optimisation literature [23,24], but until recently less discussed in the aeronautics [25,26] and fluid dynamics literature [27,28,29,30].…”