Ignore:
Timestamp:
07/29/10 12:42:22 (15 years ago)
Author:
seroussi
Message:

Validation tests ISMIP-HOM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/test/Validation/ISMIP/TestA/runme.m

    r899 r4883  
    1212md=extrude(md,10,1);
    1313
    14 %Create dirichlet on the bed on top of the borders
    15 pos=find(md.gridonbed);
    16 md.gridondirichlet_diag(pos)=1;
    17 
    1814md=setelementstype(md,'pattyn','all');
    1915%md=setelementstype(md,'pattyn','all','stokes','all');
    2016
    2117%Create dirichlet on the bed only
    22 md.gridondirichlet_diag=zeros(md.numberofgrids,1);
     18md.spcvelocity=zeros(md.numberofgrids,6);
    2319pos=find(md.gridonbed);
    24 md.gridondirichlet_diag(pos)=1;
     20md.spcvelocity(pos,1:2)=1;
    2521
    2622%Create MPCs to have periodic boundary conditions
    27 posx=find(md.x==0);
    28 posx2=find(md.x==max(md.x));
    29 
    30 posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same grids two times
    31 posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
    32 
    33 md.penalties=[posx,posx2;posy,posy2];
     23%posx=find(md.x==0);
     24%posx2=find(md.x==max(md.x));
     25%
     26%posy=find(md.y==0 & md.x~=0 & md.x~=max(md.x)); %Don't take the same grids two times
     27%posy2=find(md.y==max(md.y) & md.x~=0 & md.x~=max(md.x));
     28%
     29%md.penalties=[posx,posx2;posy,posy2];
    3430
    3531%Compute the diagnostic
    36 md=solve(md,'analysis_type','diagnostic','package','ice');
     32md=solve(md,'analysis_type',DiagnosticSolutionEnum);
     33vx=zeros(md.numberofgrids,1);
     34vx(md.results.DiagnosticSolution.Vx.index)=md.results.DiagnosticSolution.Vx.value;
     35vy=zeros(md.numberofgrids,1);
     36vy(md.results.DiagnosticSolution.Vy.index)=md.results.DiagnosticSolution.Vy.value;
     37vz=zeros(md.numberofgrids,1);
     38vz(md.results.DiagnosticSolution.Vz.index)=md.results.DiagnosticSolution.Vz.value;
    3739
    38 plotmodel(md,'data',md.results.diagnostic.vx,'data',md.results.diagnostic.vy,'data',md.results.diagnostic.vz,'layer#all',md.numlayers,'contourlevels',{9.2,18.4,27.6,46,73.6,82.8},'contourlevels',{0,-1.2,-0.9,-0.6,-0.3,1.2},'contourlevels',{-5.2,-3.9,-1.3,0,1.3,3.9,5.2})
     40plotmodel(md,'data',vx,'data',vy,'data',vz,'layer#all',md.numlayers,'contourlevels',{9.2,18.4,27.6,46,73.6,82.8},'contourlevels',{0,-1.2,-0.9,-0.6,-0.3,1.2},'contourlevels',{-5.2,-3.9,-1.3,0,1.3,3.9,5.2})
Note: See TracChangeset for help on using the changeset viewer.