1 function res = isequal(grid,grid2)
2 %
function res = isequal(grid,grid2)
3 %
function comparing two grids field by field
6 % grid2: the grid we want to compare with
9 % res:
boolean indicating whether the two grids are equal
11 % Bernard Haasdonk 15.2.2011
13 fields = {
'nelements',
'nvertices',
'nneigh',
'A',
'Ainv',
'VI',
'X',
'Y',
'CX',...
14 'CY',
'NBI',
'INB',
'EL',
'DC',
'NX',
'NY',
'ECX',
'ECY',
'SX',
'SY',
'ESX',...
15 'DS',
'hmin',
'alpha',
'JIT'};
18 for i = 1:length(fields)
19 res = res && isequal(getfield(grid,fields{i}),getfield(grid2,fields{i}));