  The conditions for the entry of vortices into type-II superconductors being
in the Meissner and/or mixed state, are studied by both numerical and
analytical solution of the Ginzburg-Landau equations. A modulation instability
of the superconducting order parameter is shown to occur when the kinematic
momentum (or supervelocity) of the condensate reaches a threshold value at the
superconductor edge or surface. Due to this instability, vortices start to
nucleate at the edge or surface and then penetrate deeper into the sample. It
is found that the presence of surface defects causes a noticeable drop of the
first penetration field and leads to a qualitative change of the magnetization
curve. Based on these results a simple phenomenological model of the edge or
surface barrier, taking into account the effect of surface defects, is
suggested.
