Dependence of the strain energies on grain orientations in HCP metal films