Automated topology optimization for PDE-based problems