Added in/outlink matrix to grid geometry.

Added node_inlink_matrix and node_outlink_matrix to grid geometry.