1 | """
|
---|
2 | == == == == == == == == == == == == == == == == == == ==
|
---|
3 | Auto generated python script for ISSM: test216.m
|
---|
4 | Created on 2012-09-27 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 | from numpy import *
|
---|
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/SquareHole.exp','../Exp/Rifts.exp',50000)
|
---|
24 | md=meshprocessrifts(md,'../Exp/Square.exp')
|
---|
25 | md=setmask(md,'all','')
|
---|
26 | md=parameterize(md,'../Par/SquareShelf.py')
|
---|
27 | md=setflowequation(md,'macayeal','all')
|
---|
28 | md.cluster=generic('name',oshostname(),'np',3)
|
---|
29 |
|
---|
30 |
|
---|
31 | # rift settings
|
---|
32 |
|
---|
33 | md.rifts.riftstruct.fill=MelangeEnum()
|
---|
34 | md.rifts.riftstruct.fraction=0
|
---|
35 | md.diagnostic.rift_penalty_lock=2
|
---|
36 | md.diagnostic.rift_penalty_threshold=0
|
---|
37 | md.rifts.riftstruct.fractionincrement=.1
|
---|
38 | md=solve(md,DiagnosticSolutionEnum())
|
---|
39 |
|
---|
40 |
|
---|
41 | # Fields and tolerances to track changes
|
---|
42 |
|
---|
43 | field_names =['Vx','Vy','Vel','Pressure']
|
---|
44 | field_tolerances=[1e-11,1e-11,1e-11,1e-11]
|
---|
45 | field_values=[\
|
---|
46 | md.results['DiagnosticSolution'][1]['Vx'],\
|
---|
47 | md.results['DiagnosticSolution'][1]['Vy'],\
|
---|
48 | md.results['DiagnosticSolution'][1]['Vel'],\
|
---|
49 | md.results['DiagnosticSolution'][1]['Pressure'],\
|
---|
50 | ]
|
---|