source: issm/trunk-jpl/test/NightlyRun/test1202.py@ 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: EISMINTStress1
[14107]2import numpy
3from model import *
4from triangle import *
5from setmask import *
6from parameterize import *
7from setflowequation import *
8from EnumDefinitions import *
9from solve import *
10from MatlabFuncs import *
11
12"""
[15771]13Test on the stressbalance model and the masstransport in 2d
[14107]14"""
15
16printingflag=False
17
18#tests 3 and 4: using Glen's flow law
19md=model()
20md=triangle(md,'../Exp/SquareEISMINT.exp',3550.)
21md=setmask(md,'all','')
22md=parameterize(md,'../Par/SquareEISMINT.py')
[15566]23md=setflowequation(md,'SSA','all') #SSA's model and 2d
[14107]24
[15566]25#Compute solution for SSA's model
[14107]26md.cluster=generic('name',oshostname(),'np',8)
[21049]27md=solve(md,'StressbalanceSolution')
[14107]28
29#plot results
[15771]30vx=md.results.StressbalanceSolution.Vx
31vy=md.results.StressbalanceSolution.Vy
[14107]32
33#plotmodel(md,'data',vx,'contourlevels',{0,20,40,60,60,100,120,140,160,180,-20,-40,-60,-80,-100,-120,-140,-160,-180}, ...
34# 'contourcolor','k')
35if printingflag:
36 pass
37# set(gcf,'Color','w')
38# printmodel('eismintdiag1vx','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
39# system(['mv eismintdiag1vx.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
40
41#plotmodel(md,'data',vy,'contourlevels',{-100,-200,-300,-400,-500,-600,-700,-800,-900,-1000},...
42# 'contourcolor','k')
43if printingflag:
44 pass
45# set(gcf,'Color','w')
46# printmodel('eismintdiag1vy','png','margin','on','marginsize',25,'frame','off','resolution',2,'hardcopy','off');
47# system(['mv eismintdiag1vy.png ' ISSM_DIR '/website/doc_pdf/validation/Images/EISMINT/IceShelf ']);
48
49#Fields and tolerances to track changes
50field_names =['Vx','Vy']
51field_tolerances=[1e-13,1e-13]
52field_values=[\
53 vx, \
54 vy, \
55 ]
Note: See TracBrowser for help on using the repository browser.