source: issm/branches/trunk-larour-NatGeoScience2016/test/NightlyRun/test229.py@ 21243

Last change on this file since 21243 was 21060, checked in by Mathieu Morlighem, 9 years ago

CHG: no more enums in python

File size: 2.6 KB
Line 
1#Test Name: SquareShelfTranForcePos2d
2import numpy
3from model import *
4from triangle import *
5from setmask import *
6from parameterize import *
7from setflowequation import *
8from solve import *
9from MatlabFuncs import *
10
11md=triangle(model(),'../Exp/Square.exp',150000.)
12md=setmask(md,'all','')
13md=parameterize(md,'../Par/SquareShelf.py')
14md=setflowequation(md,'SSA','all')
15md.cluster=generic('name',oshostname(),'np',3)
16
17md.timestepping.time_step=1.
18md.settings.output_frequency=1
19md.timestepping.final_time=4.
20
21#Set up transient
22smb=numpy.ones((md.mesh.numberofvertices,1))*3.6
23smb=numpy.hstack((smb,smb*2.))
24
25md.smb.mass_balance=numpy.vstack((smb,[1.5,3.]))
26md.transient.isthermal=False
27
28md=solve(md,'Transient')
29
30#Fields and tolerances to track changes
31field_names=['Vx1','Vy1','Vel1','Pressure1','Bed1','Surface1','Thickness1','SmbMassBalance1', \
32 'Vx2','Vy2','Vel2','Pressure2','Bed2','Surface2','Thickness2','SmbMassBalance2', \
33 'Vx3','Vy3','Vel3','Pressure3','Bed3','Surface3','Thickness3','SmbMassBalance3', \
34 'Vx4','Vy4','Vel4','Pressure4','Bed4','Surface4','Thickness4','SmbMassBalance4']
35field_tolerances=[1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
36 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
37 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10,\
38 1e-09,1e-09,1e-10,1e-10,1e-10,1e-10,1e-10,1e-10]
39field_values=[\
40 md.results.TransientSolution[0].Vx,\
41 md.results.TransientSolution[0].Vy,\
42 md.results.TransientSolution[0].Vel,\
43 md.results.TransientSolution[0].Pressure,\
44 md.results.TransientSolution[0].Base,\
45 md.results.TransientSolution[0].Surface,\
46 md.results.TransientSolution[0].Thickness,\
47 md.results.TransientSolution[0].SmbMassBalance,\
48 md.results.TransientSolution[1].Vx,\
49 md.results.TransientSolution[1].Vy,\
50 md.results.TransientSolution[1].Vel,\
51 md.results.TransientSolution[1].Pressure,\
52 md.results.TransientSolution[1].Base,\
53 md.results.TransientSolution[1].Surface,\
54 md.results.TransientSolution[1].Thickness,\
55 md.results.TransientSolution[1].SmbMassBalance,\
56 md.results.TransientSolution[2].Vx,\
57 md.results.TransientSolution[2].Vy,\
58 md.results.TransientSolution[2].Vel,\
59 md.results.TransientSolution[2].Pressure,\
60 md.results.TransientSolution[2].Base,\
61 md.results.TransientSolution[2].Surface,\
62 md.results.TransientSolution[2].Thickness,\
63 md.results.TransientSolution[2].SmbMassBalance,\
64 md.results.TransientSolution[3].Vx,\
65 md.results.TransientSolution[3].Vy,\
66 md.results.TransientSolution[3].Vel,\
67 md.results.TransientSolution[3].Pressure,\
68 md.results.TransientSolution[3].Base,\
69 md.results.TransientSolution[3].Surface,\
70 md.results.TransientSolution[3].Thickness,\
71 md.results.TransientSolution[3].SmbMassBalance,\
72 ]
Note: See TracBrowser for help on using the repository browser.