  We consider the topology optimization problem of a 2d permanent magnet
synchronous machine in magnetostatic operation with demagnetization. This
amounts to a PDE-constrained multi-material design optimization problem with an
additional pointwise state constraint. Using a generic framework we can
incorporate this additional constraint and compute the corresponding
topological derivative. We present and discuss optimization results obtained by
a multi-material level set algorithm.
