Paleostress inversion