Null space optimizer
nullspace_optimizer is a package implementing the null space algorithm for nonlinear constrained optimization based on the publication [11] Feppon, F., Allaire, G. and Dapogny, C. Null space gradient flows for constrained optimization with applications to shape optimization (2020). ESAIM: COCV, 26 90 (Open Access). HAL preprint hal-01972915.
(abstract)
(bibtex)
Abstract:
The purpose of this article is to introduce a gradient-flow
algorithm for solving generic equality or inequality constrained
optimization problems, which is suited for shape optimization applications.
We rely on a variant of the Ordinary Differential Equation (ODE) approach
proposed by Yamashita for equality constrained problems: the search
direction is a combination of a null space step and a range space step,
which are aimed to reduce the value of the minimized objective function and
the violation of the constraints, respectively. Our first contribution is
to propose an extension of this ODE approach to optimization problems
featuring both equality and inequality constraints. In the literature, a
common practice consists in reducing inequality constraints to equality
constraints by the introduction of additional slack variables. Here, we
rather solve their local combinatorial character by computing the
projection of the gradient of the objective function onto the cone of
feasible directions. This is achieved by solving a dual quadratic
programming subproblem whose size equals the number of active or violated
constraints, and which allows to identify the inequality constraints which
should remain tangent to the optimization trajectory. Our second
contribution is a formulation of our gradient flow in the context
of-infinite-dimensional-Hilbert space settings. This allows to extend the
method to quite general optimization sets equipped with a suitable manifold
structure, and notably to sets of shapes as it occurs in shape optimization
with the framework of Hadamard's boundary variation method. The cornerstone
of this latter setting is the classical operation of extension and
regularization of shape derivatives. Some numerical comparisons on simple
academic examples are performed to illustrate the behavior of our
algorithm. Its numerical efficiency and ease of implementation are finally
demonstrated on more realistic shape optimization problems.
@article{feppon2020optim,
author = {{Feppon, F.} and {Allaire, G.} and {Dapogny, C.}},
doi = {10.1051/cocv/2020015},
journal = {ESAIM: COCV},
pages = {90},
title = {Null space gradient flows for constrained optimization with applications to shape optimization},
url = {https://doi.org/10.1051/cocv/2020015},
volume = 26,
year = 2020
}
Some optimization trajectories obtained with the open-source implementation of our algorithm on a demonstrative test case.
The package is suitable for being used for topology optimization but it can also potentially be applied to rather general constrained optimization problems. See this page for a quick introduction to the algorithm.
PyMedit
PyMedit is a python package which allows to conveniently process triangle or tetrahedral meshes and solution files in the INRIA .mesh and .sol file formats.
A finite element mesh generated by PyMedit.
The library is interfaced with Mmg and advect
and mshdist
from the ISCD toolbox for convenient remeshing, advection or signed distance function computation in python.
PyFreeFEM
PyFreeFEM is a package which allows to interface FreeFEM scripts with python. PyFreeFEM parses special instructions added to a FreeFEM script and converts it into a proper .edp file executable by FreeFEM, which itself can be run from python. It also includes functions to read and write FreeFEM arrays or sparse matrices in the numpy format.