function [g1] = getGid(gx,gy,max_row_idx)

g1=(gy + (gx-1)*max_row_idx );
% g1=(gx + (gy-1)*max_row_idx );






