A Variational Formulation of Dissipative Quasicontinuum Methods