modeling and the numerical simulation of switched circuits with the nonsmooth dynamical