Wavefront sensing based on the inverted Hartmann sensor