Fast topology optimization for transient mechanical problems