We consider the formation of defects in a nonequilibrium second-order phase transition induced by an instantaneous quench to zero temperature in a type II superconductor. We perform a full nonlinear simulation where we follow the evolution in time of the local order parameter field. We determine how far into the phase transition theoretical estimates of the defect density based on the Gaussian approximation yield a reliable prediction for the actual density. We also characterize quantitatively some aspects of the out of equilibrium phase transition.