## 1 Introduction  
Engineers are constantly pursuing the design of lighter, faster and more efficient structures and mechanisms. Here, we use structural design optimization--and more specifically topology optimization--to design optimal lightweight compliant mechanisms. These flexible structures have the same design goals as more traditional mechanisms, though without joints. Instead, the motion of the mechanism is achieved by elastic deformation. This characteristic presents a number of advantages including no frictional loss, scalability and precision due to lack of backlash [1]. Further, the energy required for movement can be saved as elastic energy, which can be used to move the mechanism back to its original position or to be harvested in the form of electricity, e.g., [PERSON] et al. [2]. The optimal designs achieved via topology optimization have traditionally undergone toilsome derivation of geometries to ensure manufacturability. This can be now (partially) avoided with additive manufacturing techniques in which the optimal results are directly fabricated. As compliant mechanisms are then of one material without joints, it can be seen as being a monolithic design, which reduces manufacturing expense as no assembly is necessary. As compliant mechanisms typically exhibit large displacements and rotations, the standard method of topology optimization with linear elastostatic finite-element analysis (FEA) is deemed to be inadequate in such cases. Further, trajectories of path-generation mechanisms typically do not correlate to linear deformation, which also necessitates nonlinear FEA. Stress must be included as a constraint in the design optimization problem as its values can exceed physical limits, if neglected. In the following, we propose a method for the synthesis of both maximum-displacement and path-generating compliant mechanisms with multilevel stress-constrained topology optimization based on geometrically nonlinear finite-element analysis. Topology optimization is the optimal placement of material, which can trace its origins to the analytical work of [3]. As the design problem is inherently discrete, i.e., material is present or not, the algorithmic handling of this problem is a challenge. Topology optimization in its modern form stems from the homogenization method of [PERSON] and [PERSON] [4] and the Solid Isotropic Material with Penalization (SIMP) by [PERSON] [5]. SIMP \"continualizes\" the design space by allowing for intermediate states of material between full and void, typically controlled via density. Although the continualization of the design space is an efficient solution for the discrete problem, it comes with a number of further problems, including checkerboarding, possible local minima and mesh-dependent results [6]. Further methods have been devised to handle the topology optimization problems, outlined by [PERSON] [7]. Non-gradient-based methods include the Soft Kill Option (SKO) by [PERSON] et al. [8] and the use of hybrid cellular automata (HCA) by [PERSON] [9]. Due to the large number of design variables in topology optimization, first-order algorithms have proven their efficiency, especially in terms of avoiding the forming of the Hessian, as is the case with second-order algorithms. Therefore, the concentration here is on the use of first-order optimization algorithms to ensure efficiency. The first-order optimization algorithm, method of moving asymptotes (MMA), first introduced by [PERSON] [10], is the specific algorithm used here. In contrast to the \"standard\" topology optimization objective of minimum compliance (i.e., minimum strain energy and therefore maximum stiffness), compliant structures are designed for flexibility of one or more degrees of freedom. The first topology optimization approach for the synthesis of compliant mechanisms was introduced by [PERSON] et al. [11], which was followed by [PERSON] [12]. The topology optimization approach for such compliant structures is reviewed by [PERSON] et al. [13].