Thermodynamic assessment of the Mg-Ni-Gd system with a general model description the long-period stacking ordered phases