Made velocity calculation conditional for SGP
Added geometry library