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

Last change on this file since 13663 was 13663, checked in by Mathieu Morlighem, 12 years ago

CHG: cosmetics on matlab file (model -> model(); Enum -> Enum())

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