Structural optimization with $\tt{FreeFem++}$

The aim of this paper is to show that relatively small, simple, and efficient shape optimization routines can be written using the free finite element software $\tt{FreeFem++}$. This is illustrated by the implementation of two classical methods: the boundary variation method and the homogenization one. Even though these routines are simple enough so that their implementation can be assigned (partially or totally) as homework to graduate students, they yield results accurate enough to be useful tools for engineers or researchers.