implement of resistive MHD equations