Elastic constants of EuF2 and SrCl2