A computational study of the doping of by divalent ions ( and ) is presented. The calculations provide information on the energies involved in the doping process, and the consequent lattice relaxation. Predictions of the sites occupied by the dopant ions are made, which are supported by experimental results.