Computing strain fields from discrete displacement fields in 2D-solids