source:
issm/oecreview/Archive/12678-13393/ISSM-12959-12960.diff@
21726
Last change on this file since 21726 was 13394, checked in by , 13 years ago | |
---|---|
File size: 2.8 KB |
-
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkfield.m
135 135 field2=reshape(field,prod(size(field)),1); 136 136 if any(field2<lowerbound), 137 137 md = checkmessage(md,getfieldvalue(options,'message',... 138 ['field ''' fieldname ''' should have values above ' num2str(lowerbound )]));138 ['field ''' fieldname ''' should have values above ' num2str(lowerbound(1,1))])); 139 139 end 140 140 end 141 141 if exist(options,'>') … … 143 143 field2=reshape(field,prod(size(field)),1); 144 144 if any(field2<=lowerbound), 145 145 md = checkmessage(md,getfieldvalue(options,'message',... 146 ['field ''' fieldname ''' should have values above ' num2str(lowerbound )]));146 ['field ''' fieldname ''' should have values above ' num2str(lowerbound(1,1))])); 147 147 end 148 148 end 149 149 … … 153 153 field2=reshape(field,prod(size(field)),1); 154 154 if any(field2>upperbound), 155 155 md = checkmessage(md,getfieldvalue(options,'message',... 156 ['field ''' fieldname ''' should have values below ' num2str(upperbound )]));156 ['field ''' fieldname ''' should have values below ' num2str(upperbound(1,1))])); 157 157 end 158 158 end 159 159 if exist(options,'<') … … 161 161 field2=reshape(field,prod(size(field)),1); 162 162 if any(field2>=upperbound), 163 163 md = checkmessage(md,getfieldvalue(options,'message',... 164 ['field ''' fieldname ''' should have values below ' num2str(upperbound )]));164 ['field ''' fieldname ''' should have values below ' num2str(upperbound(1,1))])); 165 165 end 166 166 end 167 167 -
u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/mesh.m
86 86 md = checkfield(md,'mesh.elementonsurface','size',[md.mesh.numberofelements 1],'values',[0 1]); 87 87 md = checkfield(md,'mesh.vertexonbed','size',[md.mesh.numberofvertices 1],'values',[0 1]); 88 88 md = checkfield(md,'mesh.vertexonsurface','size',[md.mesh.numberofvertices 1],'values',[0 1]); 89 if (md.mesh.dimension==3), 90 md = checkfield(md,'mesh.z','>=',md.geometry.bed,'message','''mesh.z'' should be above the bed'); 91 md = checkfield(md,'mesh.z','<=',md.geometry.surface,'message','''mesh.z'' should be below the ice surface'); 92 end 89 93 if (md.mesh.dimension==2), 90 94 md = checkfield(md,'mesh.average_vertex_connectivity','>=',9,'message','''mesh.average_vertex_connectivity'' should be at least 9 in 2d'); 91 95 else
Note:
See TracBrowser
for help on using the repository browser.