shear wave speed calculation algorithms