Changeset 1102
- Timestamp:
- 06/25/09 17:35:45 (15 years ago)
- Location:
- issm/trunk/src/m/classes/public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/public/parameterize.m
r27 r1102 35 35 catch me, 36 36 system('rm TemporaryParameterFile.m'); 37 38 %remove last error misleading 37 39 me2=struct('message',me.message,'stack',me.stack); 40 me2.stack(end)=[]; 41 42 %rename parameter file 38 43 for i=1:length(me2.stack) 39 44 if (length(me2.stack(i).file)>=24 & strcmp(me2.stack(i).file(end-23:end),'TemporaryParameterFile.m')) … … 44 49 end 45 50 end 51 52 %throw error message 46 53 rethrow(me2); 47 54 end -
issm/trunk/src/m/classes/public/thicknessevolution.m
r1097 r1102 10 10 11 11 if (length(md.vx)~=md.numberofgrids)|(length(md.vy)~=md.numberofgrids) 12 error( 'thicknessevolution error message: velocity empty')12 error(['thicknessevolution error message: vx and vy should have a length of ' num2str(md.numberofgrids)]) 13 13 end 14 14 15 15 %load some variables (it is much faster if the variab;es are loaded from md once for all) 16 16 numberofelements=md.numberofelements; 17 H= md.thickness;18 vx= md.vx;19 vy= md.vy;17 H=averaging(md,md.thickness,3); 18 vx=averaging(md,md.vx,3); 19 vy=averaging(md,md.vy,3); 20 20 index=md.elements; 21 21 x=md.x; y=md.y; … … 39 39 40 40 %compute dhdt=div(Hu) 41 Hvx=H.*vx; Hvy=H.*vy; 42 dhdt=-sum(Hvx(index).*alpha,2)-sum(Hvy(index).*beta,2); 41 dhdt=(vx(index)*summation).*sum( H(index).*alpha,2) + (vy(index)*summation).*sum(H(index).*beta,2) ... 42 + ( H(index)*summation).*sum(vx(index).*alpha,2) + ( H(index)*summation).*sum(vy(index).*beta,2); 43 dhdt=-dhdt;
Note:
See TracChangeset
for help on using the changeset viewer.