The elastic field caused by a general ellipsoidal inclusion and the application to martensite formation