Code to implement 2d gravity basin inversion

Uses damping, smoothness, total variation and L-curve.