1 | #Test Name: SquareShelfConstrainedRestartTranSSA2d
|
---|
2 | from model import *
|
---|
3 | from triangle import *
|
---|
4 | from setmask import *
|
---|
5 | from parameterize import *
|
---|
6 | from setflowequation import *
|
---|
7 | from EnumDefinitions import *
|
---|
8 | from solve import *
|
---|
9 | from MatlabFuncs import *
|
---|
10 | from massfluxatgate import massfluxatgate
|
---|
11 | from generic import generic
|
---|
12 | import copy
|
---|
13 |
|
---|
14 | md=triangle(model(),'../Exp/Square.exp',150000.)
|
---|
15 | md=setmask(md,'all','')
|
---|
16 | md=parameterize(md,'../Par/SquareShelfConstrained.py')
|
---|
17 | md=setflowequation(md,'SSA','all')
|
---|
18 | md.cluster=generic('name',oshostname(),'np',1)
|
---|
19 | md.transient.requested_outputs=['IceVolume','TotalSmb']
|
---|
20 |
|
---|
21 | md.verbose=verbose('solution',1);
|
---|
22 | md.settings.recording_frequency=5
|
---|
23 |
|
---|
24 | # time steps and resolution
|
---|
25 | md.timestepping.final_time=8
|
---|
26 |
|
---|
27 | md=solve(md,TransientSolutionEnum())
|
---|
28 | md2=copy.deepcopy(md)
|
---|
29 | md=solve(md,TransientSolutionEnum(),'restart',1)
|
---|
30 |
|
---|
31 | #Fields and tolerances to track changes
|
---|
32 | field_names =['Vx1','Vy1','Vel1','TotalSmb1','Bed1','Surface1','Thickness1','Volume1','Vx2','Vy2','Vel2','TotalSmb2','Bed2','Surface2','Thickness2','Volume2','Vx3','Vy3','Vel3','TotalSmb3','Bed3','Surface3','Thickness3','Volume3'];
|
---|
33 | field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
|
---|
34 | 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
|
---|
35 | 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,\
|
---|
36 | 1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
|
---|
37 | field_values=[\
|
---|
38 | md2.results.TransientSolution[5].Vx-md.results.TransientSolution[0].Vx,\
|
---|
39 | md2.results.TransientSolution[5].Vy-md.results.TransientSolution[0].Vy,\
|
---|
40 | md2.results.TransientSolution[5].Vel-md.results.TransientSolution[0].Vel,\
|
---|
41 | md2.results.TransientSolution[5].TotalSmb-md.results.TransientSolution[0].TotalSmb,\
|
---|
42 | md2.results.TransientSolution[5].Base-md.results.TransientSolution[0].Base,\
|
---|
43 | md2.results.TransientSolution[5].Surface-md.results.TransientSolution[0].Surface,\
|
---|
44 | md2.results.TransientSolution[5].Thickness-md.results.TransientSolution[0].Thickness,\
|
---|
45 | md2.results.TransientSolution[5].IceVolume-md.results.TransientSolution[0].IceVolume,\
|
---|
46 | md2.results.TransientSolution[6].Vx-md.results.TransientSolution[1].Vx,\
|
---|
47 | md2.results.TransientSolution[6].Vy-md.results.TransientSolution[1].Vy,\
|
---|
48 | md2.results.TransientSolution[6].Vel-md.results.TransientSolution[1].Vel,\
|
---|
49 | md2.results.TransientSolution[6].TotalSmb-md.results.TransientSolution[1].TotalSmb,\
|
---|
50 | md2.results.TransientSolution[6].Base-md.results.TransientSolution[1].Base,\
|
---|
51 | md2.results.TransientSolution[6].Surface-md.results.TransientSolution[1].Surface,\
|
---|
52 | md2.results.TransientSolution[6].Thickness-md.results.TransientSolution[1].Thickness,\
|
---|
53 | md2.results.TransientSolution[6].IceVolume-md.results.TransientSolution[1].IceVolume,\
|
---|
54 | md2.results.TransientSolution[7].Vx-md.results.TransientSolution[2].Vx,\
|
---|
55 | md2.results.TransientSolution[7].Vy-md.results.TransientSolution[2].Vy,\
|
---|
56 | md2.results.TransientSolution[7].Vel-md.results.TransientSolution[2].Vel,\
|
---|
57 | md2.results.TransientSolution[7].TotalSmb-md.results.TransientSolution[2].TotalSmb,\
|
---|
58 | md2.results.TransientSolution[7].Base-md.results.TransientSolution[2].Base,\
|
---|
59 | md2.results.TransientSolution[7].Surface-md.results.TransientSolution[2].Surface,\
|
---|
60 | md2.results.TransientSolution[7].Thickness-md.results.TransientSolution[2].Thickness,\
|
---|
61 | md2.results.TransientSolution[7].IceVolume-md.results.TransientSolution[2].IceVolume\
|
---|
62 | ]
|
---|
63 |
|
---|