Last change
on this file since 16970 was 16970, checked in by Mathieu Morlighem, 11 years ago |
CHG: updated python script
|
File size:
773 bytes
|
Rev | Line | |
---|
[13437] | 1 | import numpy
|
---|
| 2 | import time
|
---|
| 3 | from model import *
|
---|
| 4 | from bamg import *
|
---|
| 5 | from MatlabFuncs import *
|
---|
| 6 |
|
---|
| 7 | #Simple mesh
|
---|
[16970] | 8 | md=bamg(model(),'domain','../Exp/Square.exp','hmax',100000.,'rand',False)
|
---|
[13437] | 9 | x1=md.mesh.x
|
---|
| 10 | y1=md.mesh.y
|
---|
| 11 |
|
---|
| 12 | #hVertices
|
---|
[16970] | 13 | md=bamg(model(),'domain','../Exp/Square.exp','hmax',300000.,'hVertices',numpy.array([10000.,100000.,400000.,100000.]).reshape(-1,1),'rand',False)
|
---|
[13437] | 14 | x2=md.mesh.x
|
---|
| 15 | y2=md.mesh.y
|
---|
| 16 |
|
---|
| 17 | #big mesh
|
---|
| 18 | t0=time.time()
|
---|
[16970] | 19 | md=bamg(model(),'domain','../Exp/Square.exp','hmax',3000.,'rand',False)
|
---|
[13437] | 20 | nbelements=md.mesh.numberofelements
|
---|
| 21 | elapsedtime=time.time()-t0
|
---|
| 22 |
|
---|
| 23 | #Fields and tolerances to track changes
|
---|
| 24 | field_names =['x1','y1','x2','y2','nbelements','elapsed time']
|
---|
[16938] | 25 | field_tolerances=[2e-9,2e-9,1e-13,1e-13,1e-13,1.5]
|
---|
[13437] | 26 | field_values=[\
|
---|
| 27 | x1, y1,\
|
---|
| 28 | x2, y2,\
|
---|
| 29 | nbelements,elapsedtime,\
|
---|
| 30 | ]
|
---|
Note:
See
TracBrowser
for help on using the repository browser.