1 | """
|
---|
2 | == == == == == == == == == == == == == == == == == == ==
|
---|
3 | Auto generated python script for ISSM: test3002.m
|
---|
4 | Created on 2012-09-25 via translateToPy.py Ver 1.0 by mikep
|
---|
5 | == == == == == == == == == == == == == == == == == == ==
|
---|
6 |
|
---|
7 | Matlab script conversion into python
|
---|
8 | translateToPy.py Author: Michael Pellegrin
|
---|
9 | translateToPy.py Date: 09/24/12
|
---|
10 | == == == == == == == == == == == == == == == == == == ==
|
---|
11 | """
|
---|
12 |
|
---|
13 | from MatlabFuncs import *
|
---|
14 | from model import *
|
---|
15 | from EnumDefinitions import *
|
---|
16 | import numpy
|
---|
17 | from triangle import *
|
---|
18 | from setmask import *
|
---|
19 | from parameterize import *
|
---|
20 | from setflowequation import *
|
---|
21 | from solve import *
|
---|
22 |
|
---|
23 | md=triangle(model(),'../Exp/Square.exp',180000)
|
---|
24 | md=setmask(md,'all','')
|
---|
25 | md=parameterize(md,'../Par/SquareShelfConstrained.py')
|
---|
26 | md.extrude(3,2.)
|
---|
27 | md=setflowequation(md,'macayeal','all')
|
---|
28 | md.cluster=generic('name',oshostname(),'np',3)
|
---|
29 | md.autodiff.isautodiff=true
|
---|
30 | md=solve(md,DiagnosticSolutionEnum())
|
---|
31 |
|
---|
32 |
|
---|
33 | # Fields and tolerances to track changes
|
---|
34 |
|
---|
35 | field_names =['Vx','Vy','Vz','Vel','Pressure']
|
---|
36 | field_tolerances=[1e-13,1e-13,1e-13,1e-13,1e-13]
|
---|
37 | field_values=[\
|
---|
38 | md.results['DiagnosticSolution'][1]['Vx'],\
|
---|
39 | md.results['DiagnosticSolution'][1]['Vy'],\
|
---|
40 | md.results['DiagnosticSolution'][1]['Vz'],\
|
---|
41 | md.results['DiagnosticSolution'][1]['Vel'],\
|
---|
42 | md.results['DiagnosticSolution'][1]['Pressure'],\
|
---|
43 | ]
|
---|