Ab initio study of the structural and elastic properties of spinels MgX2O4(X = Al, Ga, In) under pressure