A matlab script solving a linear complementarity problem:
A*u = f + B*eta, u'*eta=0, u>=0, 0<=eta<=1
appearing in lubrication with cavitation.
The script depends on LCPSolve.m also found at the matlab file central: http://www.mathworks.com/matlabcentral/fileexchange/41485
The maximum number of pivots passed to LCPSolve is no specified as the number of degrees of freedoms N, to make sure that the pivoting is not prematurely truncated.
Fixed spelling of title:
Updated the expressions for boundary conditions by subtracting the cavitation pressure pc: