Piecewise-smooth Dynamical Systems