source: issm/oecreview/Archive/16554-17801/ISSM-17208-17209.diff@ 17802

Last change on this file since 17802 was 17802, checked in by Mathieu Morlighem, 11 years ago

Added archives

File size: 2.7 KB
RevLine 
[17802]1Index: ../trunk-jpl/test/NightlyRun/test336.py
2===================================================================
3--- ../trunk-jpl/test/NightlyRun/test336.py (revision 17208)
4+++ ../trunk-jpl/test/NightlyRun/test336.py (revision 17209)
5@@ -7,7 +7,7 @@
6 from solve import *
7 from MatlabFuncs import *
8
9-md=triangle(model(),'../Exp/Square.exp',150000.)
10+md=triangle(model(),'../Exp/Square.exp',100000.)
11 md=setmask(md,'','')
12 md=parameterize(md,'../Par/SquareSheetConstrained.py')
13 md=setflowequation(md,'SSA','all')
14@@ -19,33 +19,52 @@
15 md.transient.isthermal=False
16 md.transient.isgroundingline=False
17 md.transient.isgia=False
18-md.transient.islevelset=True
19+md.transient.islevelset=False
20
21 # init levelset function
22 ymin=numpy.min(md.mesh.y)
23 ymax=numpy.max(md.mesh.y)
24 xmin=min(md.mesh.x)
25 xmax=max(md.mesh.x)
26-xmed=(xmax+xmin)/2
27-ymed=(ymax+ymin)/2
28-distx=numpy.absolute(md.mesh.x.reshape(-1,1)-xmed)
29-disty=numpy.absolute(md.mesh.y.reshape(-1,1)-ymed)
30-md.mask.ice_levelset=numpy.maximum(distx,disty)-1.e5
31+xmed=(xmax+xmin)/2.
32+ymed=(ymax+ymin)/2.
33+md.mask.ice_levelset=numpy.sqrt(numpy.power(md.mesh.x-xmed,2.)+numpy.power(md.mesh.y-ymed,2.)) - (xmax-xmin)/3.
34
35+# set spcs
36+mask=1.*numpy.ones((md.mesh.numberofvertices,1))
37+nrverts=md.mesh.elements.shape[1]
38+for i in range(0,md.mesh.numberofelements):
39+ elt=numpy.copy(md.mesh.elements[i])
40+ elt-=1
41+ isiceinelement=False
42+ for iv in range(0,nrverts):
43+ if(md.mask.ice_levelset[elt[iv]]<=0.):
44+ isiceinelement=True
45+ if(isiceinelement):
46+ for iv in range(0,nrverts):
47+ mask[elt[iv]]=2.
48+
49+v=0.
50+for i in range(0,md.mesh.numberofvertices):
51+ if(mask[i]==1.):
52+ md.stressbalance.spcvx[i]=v
53+ md.stressbalance.spcvy[i]=v
54+ md.stressbalance.spcvz[i]=v
55+
56 md=solve(md,TransientSolutionEnum())
57
58 #Fields and tolerances to track changes
59 field_names =['Vx','Vy','Vel','Pressure','MaskIceLevelset']
60-field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]
61+field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13,1e-13]#,1e-13,1e-13]
62 field_values=[\
63 md.results.TransientSolution[0].Vx,\
64 md.results.TransientSolution[0].Vy,\
65 md.results.TransientSolution[0].Vel,\
66 md.results.TransientSolution[0].Pressure,\
67- md.results.TransientSolution[0].MaskIceLevelset,\
68+# md.results.TransientSolution[0].MaskIceLevelset,\
69 md.results.TransientSolution[1].Vx,\
70 md.results.TransientSolution[1].Vy,\
71 md.results.TransientSolution[1].Vel,\
72 md.results.TransientSolution[1].Pressure,\
73- md.results.TransientSolution[1].MaskIceLevelset,\
74+# md.results.TransientSolution[1].MaskIceLevelset,\
75 ]
76Index: ../trunk-jpl/test/Archives/Archive336.nc
77===================================================================
78Cannot display: file marked as a binary type.
79svn:mime-type = application/octet-stream
Note: See TracBrowser for help on using the repository browser.