Analytical investigation of the rewetting of grooved surfaces