Multicycle generalization of relaxation-based algorithms for circuit and system simulation