Ocean waves in contact with rocks