source: issm/trunk-jpl/test/NightlyRun/test1203.m@ 21049

Last change on this file since 21049 was 21049, checked in by agscott1, 9 years ago

CHG: Replaced Enums with Strings in matlab and python. Updated corresponding cpp code.

File size: 1.7 KB
RevLine 
[19049]1%Test Name: EISMINTStress2
[15771]2%Test on the stressbalance model and the masstransport in 2d
[5606]3printingflag=false;
[5089]4
[14107]5%test 5 and 6:
[13663]6md=model();
[13670]7md=triangle(md,'../Exp/SquareEISMINT.exp',5100.); %test3
[9641]8md=setmask(md,'all','');
[5089]9md=parameterize(md,'../Par/SquareEISMINT.par');
[15566]10md=setflowequation(md,'SSA','all'); %SSA's model and 2d
[5089]11
12%Impose a non zero velocity on the upper boundary condition (y=max(y))
[9734]13pos=find(md.mesh.y==max(md.mesh.y));
[15771]14md.stressbalance.spcvy(pos)=400.*(((md.mesh.x(pos)-100000.)/25000.).^2-ones(size(pos,1),1)).*heaviside((1.+eps)*ones(size(pos,1),1)-((md.mesh.x(pos)-100000.)/25000.).^2);
[5089]15
[15566]16%Compute solution for SSA's model
[8630]17md.cluster=generic('name',oshostname(),'np',8);
[21049]18md=solve(md,'StressbalanceSolution');
[5089]19
[15771]20vx=(md.results.StressbalanceSolution.Vx);
21vy=(md.results.StressbalanceSolution.Vy);
[5089]22
23%plot results
[5422]24plotmodel(md,'data',vx,'contourlevels',{0,20,40,60,80,100,-20,-40,-60,-80,-100},...
[5304]25 'contourcolor','k')
[14107]26if printingflag,
[5422]27 set(gcf,'Color','w')
28 printmodel('eismintdiag2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
[6255]29 system(['mv eismintdiag2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
[5422]30end
[5304]31plotmodel(md,'data',vy,'contourlevels',{-100,-200,-300,-400,-500,-600,-700,-800,-900,-1000},...
[5422]32 'contourcolor','k')
[14107]33if printingflag,
[5422]34 set(gcf,'Color','w')
35 printmodel('eismintdiag2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
[6255]36 system(['mv eismintdiag2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
[5422]37end
[5098]38
39%Fields and tolerances to track changes
40field_names ={'Vx','Vy'};
41field_tolerances={1e-13,1e-13};
42field_values={...
43 vx, ...
44 vy, ...
45 };
Note: See TracBrowser for help on using the repository browser.