# Large scale topology optimization code using PETSc

The code (or framework) presented on this page is a fully parallel framework for conducting very large scale topology optimziation on structured grids [1]. The framework is build upon PETSc [4] (download from here) and we recommend ParaView [5] for visualization of the optimized design (download from here - must be version 4.0 or newer)

Besides the main program file, the code contains the following building blocks for topology optimization:

- TopOpt class containing mesh and optimization parameters.
- Physics class containing a 3D linear elasticity solver and objective, constraint and sensitivity computations.
- Filter class containing both standard and PDE based filters.
- MMA class with a simple, fully parallel implementation the method of moving asymptotes.
- IO class and Python script converters.

Examples obtained using the framework:

Optimization history for a 3D cantilever beam modelled with 130 million elements and 395 million state degree of freedom. Note that the visualization merely thresholds the design, i.e. no smoothening has been performed! The design was computed in 4 hours and 20 minuttes using 2000 cores (100 nodes each with 2 Intel-Xeon E5-2650 ten-core CPUs) and a total of 2000 design cycles. |

MBB Beam in 3D with 113 million elements and 348 million state degree of freedom. |
Rotation of the MBB beam design. |

Design of a Michell sphere, i.e. a box loaded in pure torsion. |
Rotating view of the Michell sphere. |

Unit cell of an optimized 3D isotropic micro- |
3x3x3 unit cells of an optimized 3D isotropic micro- |

[1] N. Aage, E. Andreassen, B. S. Lazarov ( 2014), Topology optimization using PETSc: An easy-to-use, fully parallel, open source topology optimization framework, Structural and Multidisciplinary Optimization, Online, DOI 10.1007/s00158-014-1157-0 (download preprint here).

[2] Aage N, Lazarov B (2013) Parallel framework for topology optimization using the method of moving asymptotes. Structural and Multidisciplinary Optimization 47(4):493–505, DOI 10.1007/s00158-012-0869-2