function grid = init_grid(grid)
% function grid = init_grid(grid)
%
% This function initializes the grid
%
% Dr. A. I. Hanna (2007)
grid.num_ctrl_pts = size(grid.control_pts,1);
grid.vert = [grid.control_pts; grid.centroids];
grid.num_vert = size(grid.vert,1);


grid.adj_mat = zeros(grid.num_vert);
grid.len_mat = zeros(grid.num_vert);
grid.num_regions = size(grid.centroids,1);


grid.spring.centroid_start = grid.num_ctrl_pts;
grid.spring.region_ctrl_pt_ind = [];
grid.spring.adj_mat = grid.adj_mat;
grid.spring.len_mat = grid.len_mat;
grid.spring.vert = grid.vert;
grid.spring.region_ctrl_pt_ind = grid.region_ctrl_pt_ind;
return;