A PETSc based 3D topology optimization code