Calculating electron cyclotron current drive stabilization of resistive tearing modes in a nonlinear magnetohydrodynamic model