rbmatlab 0.10.01
|
00001 function res = isequal(grid,grid2) 00002 %function res = isequal(grid,grid2) 00003 % function comparing two grids field by field 00004 % 00005 % parameters: 00006 % grid2: the grid we want to compare with 00007 % 00008 % Return values: 00009 % res: boolean indicating whether the two grids are equal 00010 00011 % Bernard Haasdonk 15.2.2011 00012 00013 fields = {'nelements','nvertices','nneigh','A','Ainv','VI','X','Y','CX',... 00014 'CY','NBI','INB','EL','DC','NX','NY','ECX','ECY','SX','SY','ESX',... 00015 'DS','hmin','alpha','JIT'}; 00016 00017 res = 1; 00018 for i = 1:length(fields) 00019 res = res && isequal(getfield(grid,fields{i}),getfield(grid2,fields{i})); 00020 end 00021