Finished local-to-global map! And D-matrix function is moved to the structured grids-file.