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

Last change on this file since 10976 was 10976, checked in by Mathieu Morlighem, 13 years ago

removed all PatchToVec not needed anymore as default is md.settings.results_as_patches = 0

File size: 1.6 KB
Line 
1%Test on the diagnostic model and the prognostic in 2d
2printingflag=false;
3
4%test 5 and 6 :
5md=model;
6md=setmesh(md,'../Exp/SquareEISMINT.exp',5100); %test3
7md=setmask(md,'all','');
8md=parameterize(md,'../Par/SquareEISMINT.par');
9md=setflowequation(md,'macayeal','all'); %MacAyeal's model and 2d
10
11%Impose a non zero velocity on the upper boundary condition (y=max(y))
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);
14
15%Compute solution for MacAyeal's model
16md.cluster=generic('name',oshostname(),'np',8);
17md=solve(md,DiagnosticSolutionEnum);
18
19vx=(md.results.DiagnosticSolution.Vx);
20vy=(md.results.DiagnosticSolution.Vy);
21
22%plot results
23plotmodel(md,'data',vx,'contourlevels',{0,20,40,60,80,100,-20,-40,-60,-80,-100},...
24 'contourcolor','k')
25if printingflag,
26 set(gcf,'Color','w')
27 printmodel('eismintdiag2vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
28 system(['mv eismintdiag2vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
29end
30plotmodel(md,'data',vy,'contourlevels',{-100,-200,-300,-400,-500,-600,-700,-800,-900,-1000},...
31 'contourcolor','k')
32if printingflag,
33 set(gcf,'Color','w')
34 printmodel('eismintdiag2vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
35 system(['mv eismintdiag2vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
36end
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.