Demos

Jupyter notebook examples in the demos/ directory:

Poisson Equation

Stationary Poisson equation on a unit square. Computes gradients of a tracking-type objective w.r.t. the source term f, the diffusion coefficient \(\nu\), and the Dirichlet boundary values.

https://github.com/unistuttgart-cmcs/dolfinx-graph-ad/blob/main/demos/poisson.ipynb
Heat Equation

Time-dependent heat equation solved with backward Euler. Demonstrates adjoint backpropagation through multiple time steps to compute sensitivities w.r.t. the initial condition.

https://github.com/unistuttgart-cmcs/dolfinx-graph-ad/blob/main/demos/heat_equation.ipynb
Linear Elasticity

3D cantilever beam under gravity. Computes gradients of the deformation energy w.r.t. the Lame parameters \(\lambda\) and \(\mu\).

https://github.com/unistuttgart-cmcs/dolfinx-graph-ad/blob/main/demos/linear_elasticity.ipynb
Stokes Flow

Stokes flow around a cylindrical obstacle using P2-P1 Taylor-Hood elements. Computes gradients of viscous dissipation w.r.t. the viscosity and the obstacle boundary condition.

https://github.com/unistuttgart-cmcs/dolfinx-graph-ad/blob/main/demos/stokes.ipynb