Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/processmesh.m =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/processmesh.m (revision 11233) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/plot/processmesh.m (revision 11234) @@ -7,8 +7,11 @@ % See also: PLOTMODEL, PROCESSDATA %some checks +if md.mesh.numberofvertices==0, + error('plot error message: mesh is empty') +end if md.mesh.numberofvertices==md.mesh.numberofelements - 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') + error(['plot error message: the number of elements is the same as the number of nodes...']); end if (isempty(data) | ~isstruct(data)), Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/setmask.m =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/setmask.m (revision 11233) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/setmask.m (revision 11234) @@ -1,5 +1,5 @@ function md=setmask(md,floatingicename,groundedicename) -%GEOGRAPHY - establish boundaries between grounded and floating ice. +%SETMASK - establish boundaries between grounded and floating ice. % % By default, ice is considered grounded. The contour floatingicename defines nodes % for which ice is floating. The contour groundedicename defines nodes inside an floatingice, Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/parameterization/parameterize.m =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/parameterization/parameterize.m (revision 11233) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/parameterization/parameterize.m (revision 11234) @@ -35,15 +35,12 @@ me2=struct('message',me.message,'stack',me.stack); %rename parameter file + me2.message=regexprep(me2.message,[temporaryname '.m'],parametername); for i=1:length(me2.stack)-1, - if (strncmp(fliplr(me2.stack(i).file),fliplr([temporaryname '.m']),length(temporaryname)+2)) - me2.stack(i).file=parametername; - end - if strcmp(me2.stack(i).name,temporaryname), - me2.stack(i).name=parametername; - end - if strcmp(me2.stack(i).name,temporaryname), - %remove parameterize.m error "TemporaryParameterFile" misleading + me2.stack(i).file=regexprep(me2.stack(i).file,[temporaryname '.m'],parametername); + me2.stack(i).name=regexprep(me2.stack(i).name,[temporaryname '.m'],parametername); + if strcmp(me2.stack(i).name,'parameterize'), + %remove error (eval(temporaryname);) misleading me2.stack(i)=[]; end end Index: /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/extrude.m =================================================================== --- /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/extrude.m (revision 11233) +++ /proj/ice/larour/issm-uci-clean/trunk-jpl/src/m/model/extrude.m (revision 11234) @@ -58,9 +58,11 @@ end if numlayers<2, - disp('number of layers should be at least 2. returning initial model...'); - return + error('number of layers should be at least 2'); end +if md.mesh.dimension==3, + error('Cannot extrude a 3d mesh (extrude cannot be called more than once)'); +end %Initialize with the 2d mesh x3d=[];