Stable numerical methodology for variational inequalities with application in quantitative finance and computational mechanics