source: issm/oecreview/Archive/12678-13393/ISSM-12959-12960.diff

Last change on this file was 13394, checked in by Mathieu Morlighem, 13 years ago

Added 12678-13393

File size: 2.8 KB
RevLine 
[13394]1Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkfield.m
2===================================================================
3--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkfield.m (revision 12959)
4+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/utils/consistency/checkfield.m (revision 12960)
5@@ -135,7 +135,7 @@
6 field2=reshape(field,prod(size(field)),1);
7 if any(field2<lowerbound),
8 md = checkmessage(md,getfieldvalue(options,'message',...
9- ['field ''' fieldname ''' should have values above ' num2str(lowerbound)]));
10+ ['field ''' fieldname ''' should have values above ' num2str(lowerbound(1,1))]));
11 end
12 end
13 if exist(options,'>')
14@@ -143,7 +143,7 @@
15 field2=reshape(field,prod(size(field)),1);
16 if any(field2<=lowerbound),
17 md = checkmessage(md,getfieldvalue(options,'message',...
18- ['field ''' fieldname ''' should have values above ' num2str(lowerbound)]));
19+ ['field ''' fieldname ''' should have values above ' num2str(lowerbound(1,1))]));
20 end
21 end
22
23@@ -153,7 +153,7 @@
24 field2=reshape(field,prod(size(field)),1);
25 if any(field2>upperbound),
26 md = checkmessage(md,getfieldvalue(options,'message',...
27- ['field ''' fieldname ''' should have values below ' num2str(upperbound)]));
28+ ['field ''' fieldname ''' should have values below ' num2str(upperbound(1,1))]));
29 end
30 end
31 if exist(options,'<')
32@@ -161,7 +161,7 @@
33 field2=reshape(field,prod(size(field)),1);
34 if any(field2>=upperbound),
35 md = checkmessage(md,getfieldvalue(options,'message',...
36- ['field ''' fieldname ''' should have values below ' num2str(upperbound)]));
37+ ['field ''' fieldname ''' should have values below ' num2str(upperbound(1,1))]));
38 end
39 end
40
41Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/mesh.m
42===================================================================
43--- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/mesh.m (revision 12959)
44+++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/m/classes/mesh.m (revision 12960)
45@@ -86,6 +86,10 @@
46 md = checkfield(md,'mesh.elementonsurface','size',[md.mesh.numberofelements 1],'values',[0 1]);
47 md = checkfield(md,'mesh.vertexonbed','size',[md.mesh.numberofvertices 1],'values',[0 1]);
48 md = checkfield(md,'mesh.vertexonsurface','size',[md.mesh.numberofvertices 1],'values',[0 1]);
49+ if (md.mesh.dimension==3),
50+ md = checkfield(md,'mesh.z','>=',md.geometry.bed,'message','''mesh.z'' should be above the bed');
51+ md = checkfield(md,'mesh.z','<=',md.geometry.surface,'message','''mesh.z'' should be below the ice surface');
52+ end
53 if (md.mesh.dimension==2),
54 md = checkfield(md,'mesh.average_vertex_connectivity','>=',9,'message','''mesh.average_vertex_connectivity'' should be at least 9 in 2d');
55 else
Note: See TracBrowser for help on using the repository browser.