Changeset 9840
- Timestamp:
- 09/19/11 14:24:27 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/model/model.m
r9786 r9840 133 133 if isfield(structmd,'accumulation'), md.surfaceforcings.mass_balance=structmd.accumulation; end 134 134 if isfield(structmd,'accumulation_rate'), md.surfaceforcings.mass_balance=structmd.accumulation_rate; end 135 if isfield(structmd,'numberofgrids'), md.mesh.numberofvertices s=structmd.numberofgrids; end136 if isfield(structmd,'numberofgrids2d'), md.mesh.numberofvertices s2d=structmd.numberofgrids2d; end137 if isfield(structmd,'uppergrids'), md. uppernodes=structmd.uppergrids; end138 if isfield(structmd,'lowergrids'), md. lowernodes=structmd.lowergrids; end139 if isfield(structmd,'gridonbed'), md. nodeonbed=structmd.gridonbed; end140 if isfield(structmd,'gridonsurface'), md. nodeonsurface=structmd.gridonsurface; end135 if isfield(structmd,'numberofgrids'), md.mesh.numberofvertices=structmd.numberofgrids; end 136 if isfield(structmd,'numberofgrids2d'), md.mesh.numberofvertices2d=structmd.numberofgrids2d; end 137 if isfield(structmd,'uppergrids'), md.mesh.uppervertex=structmd.uppergrids; end 138 if isfield(structmd,'lowergrids'), md.mesh.lowervertex=structmd.lowergrids; end 139 if isfield(structmd,'gridonbed'), md.mesh.vertexonbed=structmd.gridonbed; end 140 if isfield(structmd,'gridonsurface'), md.mesh.vertexonsurface=structmd.gridonsurface; end 141 141 if isfield(structmd,'extractedgrids'), md.mesh.extractedvertices=structmd.extractedgrids; end 142 142 if isfield(structmd,'gridoniceshelf'), md.mask.vertexonfloatingice=structmd.gridoniceshelf; end … … 205 205 if isfield(structmd,'ishutter'), md.flowequation.ishutter=structmd.ishutter; end 206 206 if isfield(structmd,'isstokes'), md.flowequation.isstokes=structmd.isstokes; end 207 if isfield(structmd,'elements_type'), md.flowequation.element_equation=structmd. mesh.elements_type; end207 if isfield(structmd,'elements_type'), md.flowequation.element_equation=structmd.elements_type; end 208 208 if isfield(structmd,'vertices_type'), md.flowequation.vertex_equation=structmd.vertices_type; end 209 209 if isfield(structmd,'eps_rel'), md.steadystate.reltol=structmd.eps_rel; end … … 260 260 if isfield(structmd,'nodeonsurface'), md.mesh.vertexonsurface=structmd.nodeonsurface; end 261 261 if isfield(structmd,'nodeonbed'), md.mesh.vertexonbed=structmd.nodeonbed; end 262 if isfield(structmd,'elements2d'), md.mesh.elements2d=structmd. mesh.elements2d; end262 if isfield(structmd,'elements2d'), md.mesh.elements2d=structmd.elements2d; end 263 263 if isfield(structmd,'y2d'), md.mesh.y2d=structmd.y2d; end 264 264 if isfield(structmd,'x2d'), md.mesh.x2d=structmd.x2d; end 265 if isfield(structmd,'elements'), md.mesh.elements=structmd. mesh.elements; end266 if isfield(structmd,'edges'), md.mesh.edges=structmd. mesh.edges; end265 if isfield(structmd,'elements'), md.mesh.elements=structmd.elements; end 266 if isfield(structmd,'edges'), md.mesh.edges=structmd.edges; end 267 267 if isfield(structmd,'y'), md.mesh.y=structmd.y; end 268 268 if isfield(structmd,'x'), md.mesh.x=structmd.x; end … … 278 278 end 279 279 if isfield(structmd,'spcvelocity'), 280 md. spcvx=NaN*ones(md.mesh.numberofvertices,1);281 md. spcvy=NaN*ones(md.mesh.numberofvertices,1);282 md. spcvz=NaN*ones(md.mesh.numberofvertices,1);283 pos=find(structmd.spcvelocity(:,1)); md. spcvx(pos)=structmd.spcvelocity(pos,4);284 pos=find(structmd.spcvelocity(:,2)); md. spcvy(pos)=structmd.spcvelocity(pos,5);285 pos=find(structmd.spcvelocity(:,3)); md. spcvz(pos)=structmd.spcvelocity(pos,6);280 md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1); 281 md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1); 282 md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1); 283 pos=find(structmd.spcvelocity(:,1)); md.diagnostic.spcvx(pos)=structmd.spcvelocity(pos,4); 284 pos=find(structmd.spcvelocity(:,2)); md.diagnostic.spcvy(pos)=structmd.spcvelocity(pos,5); 285 pos=find(structmd.spcvelocity(:,3)); md.diagnostic.spcvz(pos)=structmd.spcvelocity(pos,6); 286 286 end 287 287 if isfield(structmd,'spcvelocity'), 288 md. spcvx=NaN*ones(md.numberofnodes,1);289 md. spcvy=NaN*ones(md.numberofnodes,1);290 md. spcvz=NaN*ones(md.numberofnodes,1);291 pos=find(structmd.spcvelocity(:,1)); md. spcvx(pos)=structmd.spcvelocity(pos,4);292 pos=find(structmd.spcvelocity(:,2)); md. spcvy(pos)=structmd.spcvelocity(pos,5);293 pos=find(structmd.spcvelocity(:,3)); md. spcvz(pos)=structmd.spcvelocity(pos,6);288 md.diagnostic.spcvx=NaN*ones(md.mesh.numberofvertices,1); 289 md.diagnostic.spcvy=NaN*ones(md.mesh.numberofvertices,1); 290 md.diagnostic.spcvz=NaN*ones(md.mesh.numberofvertices,1); 291 pos=find(structmd.spcvelocity(:,1)); md.diagnostic.spcvx(pos)=structmd.spcvelocity(pos,4); 292 pos=find(structmd.spcvelocity(:,2)); md.diagnostic.spcvy(pos)=structmd.spcvelocity(pos,5); 293 pos=find(structmd.spcvelocity(:,3)); md.diagnostic.spcvz(pos)=structmd.spcvelocity(pos,6); 294 294 end 295 295 if ismember(structmd.pressureload(end,end),[118 119 120]), … … 298 298 pos=find(structmd.pressureload(:,end)==119); md.pressureload(pos,end)=2; 299 299 end 300 if (structmd. mesh.elements_type(end,end)>100),301 pos=find(structmd. mesh.elements_type==59); md.mesh.elements_type(pos,end)=0;302 pos=find(structmd. mesh.elements_type==55); md.mesh.elements_type(pos,end)=1;303 pos=find(structmd. mesh.elements_type==56); md.mesh.elements_type(pos,end)=2;304 pos=find(structmd. mesh.elements_type==60); md.mesh.elements_type(pos,end)=3;305 pos=find(structmd. mesh.elements_type==62); md.mesh.elements_type(pos,end)=4;306 pos=find(structmd. mesh.elements_type==57); md.mesh.elements_type(pos,end)=5;307 pos=find(structmd. mesh.elements_type==58); md.mesh.elements_type(pos,end)=6;308 pos=find(structmd. mesh.elements_type==61); md.mesh.elements_type(pos,end)=7;300 if (structmd.elements_type(end,end)>100), 301 pos=find(structmd.elements_type==59); md.mesh.elements_type(pos,end)=0; 302 pos=find(structmd.elements_type==55); md.mesh.elements_type(pos,end)=1; 303 pos=find(structmd.elements_type==56); md.mesh.elements_type(pos,end)=2; 304 pos=find(structmd.elements_type==60); md.mesh.elements_type(pos,end)=3; 305 pos=find(structmd.elements_type==62); md.mesh.elements_type(pos,end)=4; 306 pos=find(structmd.elements_type==57); md.mesh.elements_type(pos,end)=5; 307 pos=find(structmd.elements_type==58); md.mesh.elements_type(pos,end)=6; 308 pos=find(structmd.elements_type==61); md.mesh.elements_type(pos,end)=7; 309 309 end 310 310 if isfield(structmd,'rheology_law') & isnumeric(structmd.rheology_law), … … 345 345 end 346 346 if ~isfield(structmd,'diagnostic_ref'); 347 md.diagnostic _ref=NaN*ones(md.mesh.numberofvertices2d,6);347 md.diagnostic.referential=NaN*ones(md.mesh.numberofvertices2d,6); 348 348 end 349 349 end% }}}
Note:
See TracChangeset
for help on using the changeset viewer.