A contact solver suitable for finite elements