S. Ober-Blöbaum, M. Tao, M. Cheng, H. Owhadi, and J. E. Marsden, “Variational integrators for electric circuits,” Journal of Computational Physics, vol. 242, pp. 498–530, 2013.