Changeset 9183
- Timestamp:
- 08/04/11 14:35:30 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified issm/trunk/src/m/model/ismodelselfconsistent.m ΒΆ
r9182 r9183 730 730 %}}} 731 731 %checkforcing {{{1 732 function checkforcing(md,fieldname) 733 734 eval(['field=md.' fieldname ';']); 735 if size(field,1)==md.numberofnodes, 736 if ~size(field,2)==1, 737 message(['model not consistent: model ' md.name ': ' fieldname ' should have only one column as there are md.numberofnodes lines']); 738 end 739 elseif size(field,1)==md.numberofnodes+1 740 if any(field(end,:)~=sort(field(end,:))), 741 message(['model not consistent: model ' md.name ': ' fieldname ' columns should be chronological']); 742 end 743 if any(field(end,1:end-1)==field(end,2:end)), 744 message(['model not consistent: model ' md.name ': ' fieldname ' columns must not contain duplicate timesteps']); 745 end 746 else 747 message(['model not consistent: model ' md.name ': ' fieldname ' should have md.numberofnodes or md.numberofnodes+1 lines']); 732 function checkforcing(md,fields) 733 734 for i=1:length(fields), 735 eval(['field=md.' fields{i} ';']); 736 if size(field,1)==md.numberofnodes, 737 if ~size(field,2)==1, 738 message(['model not consistent: model ' md.name ': ' fieldname ' should have only one column as there are md.numberofnodes lines']); 739 end 740 elseif size(field,1)==md.numberofnodes+1 741 if any(field(end,:)~=sort(field(end,:))), 742 message(['model not consistent: model ' md.name ': ' fieldname ' columns should be chronological']); 743 end 744 if any(field(end,1:end-1)==field(end,2:end)), 745 message(['model not consistent: model ' md.name ': ' fieldname ' columns must not contain duplicate timesteps']); 746 end 747 else 748 message(['model not consistent: model ' md.name ': ' fieldname ' should have md.numberofnodes or md.numberofnodes+1 lines']); 749 end 748 750 end 749 751 end
Note:
See TracChangeset
for help on using the changeset viewer.