Automatic Differentiation of coupled System

We are looking into automatic differentiation of a coupled system for the purpose of optimization. For example, finding the gradient of some objective function with a PDE constraint where the PDE is solved by a system coupled with preCICE.

I was wondering if something like this has been done or discussed since I haven’t found anything on it. This would involve something like ADOL-C with AMPI, at least when MPI is used as the communication layer in preCICE.

1 Like


to my knowledge there has been no combination of preCICE and automatic differentiation so far. Looking at our past workshops or community projects, I also do not really find a good fit.

The FEniCS community offers some resources on automatic differentiation (be aware of Restrictions on using adapter for 3D cases · Issue #149 · precice/fenics-adapter · GitHub). For OpenFOAM there also seems to be some work on automatic differentiation.

If you want to get started in this direction: Using one of our tutorials and modifying it to your needs is usually a good approach for a first prototype.

I’m aware that this is probably not too much help, but maybe it still helps you getting started.


1 Like

The scientific computing group in Kaiserslautern does a lot of automatic differentiation for CFD. To my knowledge, they mainly work with SU2 though an I am not sure if the use preCICE for coupling.

I think @mattfrei has been working with the group and with preICE, but I am not sure if he did anything w.r.t. to automatic differentiation and optimisation.

Maybe it is worthwhile to have a look into the work of the group from Kaiserslautern.

1 Like

SU2 uses AD for Adjoint Optimization, thats right.

Regarding coupling, as far as I know, the group does not use preCICE, but there is an adapter to preCICE for SU2.

Since there is SU2 internal coupling, also with AD, it is probably a good starting point for further investigations, also with preCICE.