Efficient Solution to the Cavitation Problem in Hydrodynamic Lubrication