A course on damage mechanics