Petrophysicists use acoustic and density measurements of rocks to compute their mechanical properties and strength. They measure the compressional (P) wave velocity of sound through the rock and the shear (S) wave velocity and use these with the density of the rock to compute the rock's compressive strength, which is the compressive stress that causes a rock to fail, and the rocks' flexibility, which is the relationship between stress and deformation for a rock. Converted-wave analysis is also determines the subsurface lithology and porosity.