cashocs: A Computational, Adjoint-Based Shape Optimization and Optimal Control Software
Sebastian Blauth
TL;DR
PDE-constrained optimization is challenging due to manual adjoint and derivative derivations. cashocs provides a discretized, continuous adjoint framework with automatic differentiation to generate the required adjoint systems and shape derivatives, all within the FEniCS ecosystem for a user-friendly Python interface. Key contributions include automated adjoint/shape-derivative construction, discretization-consistent optimization algorithms, and a remeshing capability for shape optimization, enabling mesh-independent convergence. The software supports a broad class of problems and is applicable to industrial and scientific contexts, including nonlinear and parameter-identification tasks in engineering.
Abstract
The solution of optimization problems constrained by partial differential equations (PDEs) plays an important role in many areas of science and industry. In this work we present cashocs, a new software package written in Python, which automatically solves such problems in the context of optimal control and shape optimization. The software cashocs implements a discretization of the continuous adjoint approach, which derives the necessary adjoint systems and (shape) derivatives in an automated fashion. As cashocs is based on the finite element software FEniCS, it inherits its simple, high-level user interface. This makes it straightforward to define and solve PDE constrained optimization problems with our software. In this paper, we discuss the design and functionalities of cashocs and also demonstrate its straightforward usability and applicability.
