source: issm/oecreview/Archive/11229-11250/ISSM-11233-11234.diff@ 11514

Last change on this file since 11514 was 11514, checked in by Eric.Larour, 13 years ago

11229 to 11268 oecreview

File size: 3.3 KB
RevLine 
[11514]1Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/processmesh.m
2===================================================================
3--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/processmesh.m (revision 11233)
4+++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/processmesh.m (revision 11234)
5@@ -7,8 +7,11 @@
6 % See also: PLOTMODEL, PROCESSDATA
7
8 %some checks
9+if md.mesh.numberofvertices==0,
10+ error('plot error message: mesh is empty')
11+end
12 if md.mesh.numberofvertices==md.mesh.numberofelements
13- error('plot error message: the number of elements is the same as the number of nodes! cannot plot anything with model/plot, use matlab/plot instead')
14+ error(['plot error message: the number of elements is the same as the number of nodes...']);
15 end
16
17 if (isempty(data) | ~isstruct(data)),
18Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/setmask.m
19===================================================================
20--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/setmask.m (revision 11233)
21+++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/setmask.m (revision 11234)
22@@ -1,5 +1,5 @@
23 function md=setmask(md,floatingicename,groundedicename)
24-%GEOGRAPHY - establish boundaries between grounded and floating ice.
25+%SETMASK - establish boundaries between grounded and floating ice.
26 %
27 % By default, ice is considered grounded. The contour floatingicename defines nodes
28 % for which ice is floating. The contour groundedicename defines nodes inside an floatingice,
29Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/parameterization/parameterize.m
30===================================================================
31--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/parameterization/parameterize.m (revision 11233)
32+++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/parameterization/parameterize.m (revision 11234)
33@@ -35,15 +35,12 @@
34 me2=struct('message',me.message,'stack',me.stack);
35
36 %rename parameter file
37+ me2.message=regexprep(me2.message,[temporaryname '.m'],parametername);
38 for i=1:length(me2.stack)-1,
39- if (strncmp(fliplr(me2.stack(i).file),fliplr([temporaryname '.m']),length(temporaryname)+2))
40- me2.stack(i).file=parametername;
41- end
42- if strcmp(me2.stack(i).name,temporaryname),
43- me2.stack(i).name=parametername;
44- end
45- if strcmp(me2.stack(i).name,temporaryname),
46- %remove parameterize.m error "TemporaryParameterFile" misleading
47+ me2.stack(i).file=regexprep(me2.stack(i).file,[temporaryname '.m'],parametername);
48+ me2.stack(i).name=regexprep(me2.stack(i).name,[temporaryname '.m'],parametername);
49+ if strcmp(me2.stack(i).name,'parameterize'),
50+ %remove error (eval(temporaryname);) misleading
51 me2.stack(i)=[];
52 end
53 end
54Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/extrude.m
55===================================================================
56--- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/extrude.m (revision 11233)
57+++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/extrude.m (revision 11234)
58@@ -58,9 +58,11 @@
59 end
60
61 if numlayers<2,
62- disp('number of layers should be at least 2. returning initial model...');
63- return
64+ error('number of layers should be at least 2');
65 end
66+if md.mesh.dimension==3,
67+ error('Cannot extrude a 3d mesh (extrude cannot be called more than once)');
68+end
69
70 %Initialize with the 2d mesh
71 x3d=[];
Note: See TracBrowser for help on using the repository browser.