English

Fully and Semi-Automated Shape Differentiation in NGSolve

Optimization and Control 2026-04-01 v2

Abstract

In this paper we present a framework for automated shape differentiation in the finite element software NGSolve. Our approach combines the mathematical Lagrangian approach for differentiating PDE constrained shape functions with the automated differentiation capabilities of NGSolve. The user can decide which degree of automatisation is required and thus allows for either a more custom-like or black-box-like behaviour of the software. We discuss the automatic generation of first and second order shape derivatives for unconstrained model problems as well as for more realistic problems that are constrained by different types of partial differential equations. We consider linear as well as nonlinear problems and also problems which are posed on surfaces. In numerical experiments we verify the accuracy of the computed derivatives via a Taylor test. Finally we present first and second order shape optimisation algorithms and illustrate them for several numerical optimisation examples ranging from nonlinear elasticity to Maxwell's equations.

Keywords

Cite

@article{arxiv.2004.06783,
  title  = {Fully and Semi-Automated Shape Differentiation in NGSolve},
  author = {Peter Gangl and Kevin Sturm and Michael Neunteufel and Joachim Schöberl},
  journal= {arXiv preprint arXiv:2004.06783},
  year   = {2026}
}

Comments

42 pages, 18 figures

R2 v1 2026-06-23T14:51:29.723Z