[5089] | 1 | %Test on the diagnostic model and the prognostic in 2d
|
---|
[5606] | 2 | printingflag=false;
|
---|
[5089] | 3 |
|
---|
| 4 | %test 5 and 6 :
|
---|
[13663] | 5 | md=model();
|
---|
[11014] | 6 | md=triangle(md,'../Exp/SquareEISMINT.exp',5100); %test3
|
---|
[9641] | 7 | md=setmask(md,'all','');
|
---|
[5089] | 8 | md=parameterize(md,'../Par/SquareEISMINT.par');
|
---|
[9664] | 9 | md=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] | 12 | pos=find(md.mesh.y==max(md.mesh.y));
|
---|
| 13 | md.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] | 16 | md.cluster=generic('name',oshostname(),'np',8);
|
---|
[13663] | 17 | md=solve(md,DiagnosticSolutionEnum());
|
---|
[5089] | 18 |
|
---|
[10976] | 19 | vx=(md.results.DiagnosticSolution.Vx);
|
---|
| 20 | vy=(md.results.DiagnosticSolution.Vy);
|
---|
[5089] | 21 |
|
---|
| 22 | %plot results
|
---|
[5422] | 23 | plotmodel(md,'data',vx,'contourlevels',{0,20,40,60,80,100,-20,-40,-60,-80,-100},...
|
---|
[5304] | 24 | 'contourcolor','k')
|
---|
[5422] | 25 | if 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] | 29 | end
|
---|
[5304] | 30 | plotmodel(md,'data',vy,'contourlevels',{-100,-200,-300,-400,-500,-600,-700,-800,-900,-1000},...
|
---|
[5422] | 31 | 'contourcolor','k')
|
---|
| 32 | if 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] | 36 | end
|
---|
[5098] | 37 |
|
---|
| 38 | %Fields and tolerances to track changes
|
---|
| 39 | field_names ={'Vx','Vy'};
|
---|
| 40 | field_tolerances={1e-13,1e-13};
|
---|
| 41 | field_values={...
|
---|
| 42 | vx, ...
|
---|
| 43 | vy, ...
|
---|
| 44 | };
|
---|