Previous talks at the SCCS Colloquium

Rebecca Brydon: Implementation of an adjoint solver in Julia using automatic differentiation for seismic wave equations

SCCS Colloquium |


A basic benchmark setup for simulating earthquakes is the Layer-Over-Halfspace (LOH1), where the the elastic wave equation models the stress-velocity inside two sub-domains: a shallow top layer and a large half space below. Common problems in seismology are for example: detecting the depth of soil layers, approximating the material parameters or determining the origin of an earthquake. All these parameters can be determined by solving an an 'Optimal Control Problem'. For example, if the origin Q of an earthquake is to be determined, a gradient based optimization routine would start with an initial guess on Q that also satisfies the PDE problem, which is the optimization restraint. The cost function 'J' of the optimization problem is defined as the norm between a target solution, which could be a real-world measurement, and a simulated solution which is dependent on the model parameters. In order to compute a new guess, that reduces the cost, the gradient of the cost function 'J' w.r.t. the parameter Q is required. As the cost function is a composite function, the total derivative DJ/DQ depends on the parameter and also on the PDE solution. The second dependency makes things more complex, as in most cases there is no functional representation of the PDE solution which would be directly differentiated.

A solution is to compute the derivative via the adjoint equation of the PDE. In this thesis two approaches for computing the total derivative are compared. The first approach derives the adjoint equation analytically and then is discretized using the DG method. For the simple test equation, the advection and elastic wave, it is possible to set up the adjoint operator in TerraDG. However, as this is not the case for more complex equations, the second ansatz uses Automatic Differentiation to differentiate an already discrete forward solver. A prototype adjoint solver is implemented in TerraDG using the Automatic Differentiation (AD) packages provided by Julia. For comparison the hyperbolic model equations are also implemented in FEniCS, an open-source finite element solver which provides a python interface. The dolfin-adjoint package provides additional methods, also following the AD ansatz, to derive the adjoint of a forward model implemented with FEniCS. For both implementations different parameter optimization are run using the benchmark LOH1 setup and the accuracy vs. the computation time analysed.

Keywords: Adjoint equation, Automatic Differentiation, Julia, ForwardDiff, FEniCS, Dolfin-Adjoint, Seismology, Hyperbolic Equations, Advection, Elastic wave, LOH1

Master's thesis talk (CSE). Rebecca is advised by Lukas Krenz and Dr. Anne Reinarz and examined by Prof. Michael Bader.