Changeset 9674
- Timestamp:
- 09/07/11 16:22:22 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/classes/model/model.m
r9661 r9674 308 308 if isfield(structmd,'numberofgrids'), md.numberofnodes=structmd.numberofgrids; end 309 309 if isfield(structmd,'numberofgrids2d'), md.numberofnodes2d=structmd.numberofgrids2d; end 310 if isfield(structmd,'gridonhutter'), md.nodeonhutter=structmd.gridonhutter; end311 if isfield(structmd,'gridonmacayeal'), md.nodeonmacayeal=structmd.gridonmacayeal; end312 if isfield(structmd,'gridonpattyn'), md.nodeonpattyn=structmd.gridonpattyn; end313 if isfield(structmd,'gridonstokes'), md.nodeonstokes=structmd.gridonstokes; end314 310 if isfield(structmd,'uppergrids'), md.uppernodes=structmd.uppergrids; end 315 311 if isfield(structmd,'lowergrids'), md.lowernodes=structmd.lowergrids; end … … 317 313 if isfield(structmd,'gridonsurface'), md.nodeonsurface=structmd.gridonsurface; end 318 314 if isfield(structmd,'extractedgrids'), md.extractednodes=structmd.extractedgrids; end 319 if isfield(structmd,'gridoniceshelf'), md.nodeoniceshelf=structmd.gridoniceshelf; end 320 if isfield(structmd,'gridonicesheet'), md.nodeonicesheet=structmd.gridonicesheet; end 321 if isfield(structmd,'gridonwater'), md.nodeonwater=structmd.gridonwater; end 322 if isfield(structmd,'gridonnuna'), md.nodeonnuna=structmd.gridonnuna; end 315 if isfield(structmd,'gridoniceshelf'), md.mask.vertexonfloatingice=structmd.gridoniceshelf; end 316 if isfield(structmd,'gridonicesheet'), md.mask.vertexongroundedice=structmd.gridonicesheet; end 317 if isfield(structmd,'gridonwater'), md.mask.vertexonwater=structmd.gridonwater; end 323 318 if isfield(structmd,'gridonboundary'), md.nodeonboundary=structmd.gridonboundary; end 324 319 if isfield(structmd,'petscoptions'), md.solver=structmd.petscoptions; end … … 332 327 if isfield(structmd,'drag_p'), md.friction.p=structmd.drag_p; end 333 328 if isfield(structmd,'drag_q'), md.friction.q=structmd.drag_q; end 334 if isfield(structmd,'numrifts'), md.rifts.numrifts=structmd.numrifts; end 329 if isfield(structmd,'numrifts'), 330 md.rifts=rifts; %Rifts already existed as a struct in a previous version 331 md.rifts.numrifts=structmd.numrifts; 332 end 335 333 if isfield(structmd,'rifts'), md.rifts.riftstruct=structmd.rifts; end 336 334 if isfield(structmd,'riftproperties'), md.rifts.riftproperties=structmd.riftproperties; end … … 362 360 if isfield(structmd,'penalties'), md.prognostic.vertex_pairing=structmd.penalties; end 363 361 if isfield(structmd,'penalty_offset'), md.prognostic.penalty_factor=structmd.penalty_offset; end 364 if isfield(structmd,'rheology_B'), md.materials.rheology_B=structmd.B; end 365 if isfield(structmd,'rheology_n'), md.materials.rheology_n=structmd.n; end 366 if isfield(structmd,'elementoniceshelf'), md.mask.elementonfloatingice=structmd.elementoniceshelf; end 362 if isfield(structmd,'rheology_B'), md.materials.rheology_B=structmd.rheology_B; end 363 if isfield(structmd,'rheology_n'), md.materials.rheology_n=structmd.rheology_n; end 364 if isfield(structmd,'elementoniceshelf'), 365 md.mask=mask(); %maks already existed in a previous version 366 md.mask.elementonfloatingice=structmd.elementoniceshelf; 367 end 367 368 if isfield(structmd,'elementonicesheet'), md.mask.elementongroundedice=structmd.elementonicesheet; end 368 369 if isfield(structmd,'elementonwater'), md.mask.elementonwater=structmd.elementonwater; end … … 418 419 pos=find(structmd.elements_type==61); md.elements_type(pos,end)=7; 419 420 end 420 if is numeric(structmd.rheology_law),421 if isfield(structmd,'rheology_law') & isnumeric(structmd.rheology_law), 421 422 if (structmd.rheology_law==272), md.materials.rheology_law='None'; end 422 423 if (structmd.rheology_law==368), md.materials.rheology_law='Paterson'; end 423 424 if (structmd.rheology_law==369), md.materials.rheology_law='Arrhenius'; end 424 425 end 425 if is numeric(structmd.groundingline_migration),426 if isfield(structmd,'groundingline_migration') & isnumeric(structmd.groundingline_migration), 426 427 if (structmd.groundingline_migration==272), md.groundingline.migration='None'; end 427 428 if (structmd.groundingline_migration==273), md.groundingline.migration='AgressiveMigration'; end … … 434 435 end 435 436 if ismember(structmd.cm_responses(end,end),[165:170 383 388 389]), 436 pos=find(structmd.cm_responses==166) ,md.control_type(pos)=101;437 pos=find(structmd.cm_responses==167) ,md.control_type(pos)=102;438 pos=find(structmd.cm_responses==168) ,md.control_type(pos)=103;439 pos=find(structmd.cm_responses==169) ,md.control_type(pos)=104;440 pos=find(structmd.cm_responses==170) ,md.control_type(pos)=105;441 pos=find(structmd.cm_responses==165) ,md.control_type(pos)=201;442 pos=find(structmd.cm_responses==389) ,md.control_type(pos)=501;443 pos=find(structmd.cm_responses==388) ,md.control_type(pos)=502;444 pos=find(structmd.cm_responses==382) ,md.control_type(pos)=503;437 pos=find(structmd.cm_responses==166); md.control_type(pos)=101; 438 pos=find(structmd.cm_responses==167); md.control_type(pos)=102; 439 pos=find(structmd.cm_responses==168); md.control_type(pos)=103; 440 pos=find(structmd.cm_responses==169); md.control_type(pos)=104; 441 pos=find(structmd.cm_responses==170); md.control_type(pos)=105; 442 pos=find(structmd.cm_responses==165); md.control_type(pos)=201; 443 pos=find(structmd.cm_responses==389); md.control_type(pos)=501; 444 pos=find(structmd.cm_responses==388); md.control_type(pos)=502; 445 pos=find(structmd.cm_responses==382); md.control_type(pos)=503; 445 446 end 446 447
Note:
See TracChangeset
for help on using the changeset viewer.