Fix strain and stress computation and add tests.