Computer simulation of wave collapses in the nonlinear Schrödinger equation