Shape optimization examples
Use a state solve and a shape derivative to evolve a design boundary.
The design is an elastic body's material domain. Compliance and an area penalty define the objective; the state equation supplies displacement and stress. A regularized shape derivative determines the geometry update.
Prerequisites
The elasticity tutorial supplies the state problem. The shape optimization guide derives the derivative, descent sign and regularization conventions. Both examples use MMG and require a hydrated input mesh from the repository's Git LFS resources.
Choose a representation
Start with direct boundary deformation to follow the state, derivative and remeshing steps. Then use the level-set example to study transport and reconstruction of a material interface inside a background domain.
- Shape optimization of a cantilever — A cantilever with an explicitly displaced boundary and remeshing after each update.
- Optimizing a level-set cantilever — A cantilever whose material interface is transported through a signed field and reconstructed by MMG.
Assess an update sequence
Each tutorial provides computed geometry, recorded objectives, output-file descriptions and the complete example source. Compare compliance, material area and their weighted objective at solved states. Check solver status, Jacobian signs and element quality after geometry updates.
The examples use fixed update budgets. The level-set tutorial also records increasing objective steps and a reproduced low-quality triangle after interface reconstruction. These measurements guide the choice of step acceptance, geometric quality controls and stopping criteria for a new application.
Geometry and material fields
- MMG–SWIFT interface fitting — Isolate classification and geometric fitting before coupling a state equation.
- Density optimization — Vary a material coefficient on a fixed domain.