Non-smooth contact dynamics approach of cohesive materials