Nonsmooth Mechanics and Analysis