added connectivity matrix calculation
+ testing in main.F90