write the function to generate the connectivity matrix, which stores the connectivity information between pore bodies
fix the problem in PNMmain.cpp