Magnetoconvection and thermal coupling of the Earth's core and mantle