Regulation of 1DOF linear mechanical systems to a contact configuration for smooth or non-smooth impacts