|
Last change
on this file since 21877 was 21877, checked in by Mathieu Morlighem, 8 years ago |
|
CHG: no more geometrical metric
|
|
File size:
872 bytes
|
| Rev | Line | |
|---|
| [19049] | 1 | #Test Name: SquareBamgMesh
|
|---|
| [21408] | 2 | import numpy as np
|
|---|
| [13437] | 3 | import time
|
|---|
| 4 | from model import *
|
|---|
| [21408] | 5 | from socket import gethostname
|
|---|
| [13437] | 6 | from bamg import *
|
|---|
| 7 |
|
|---|
| [21408] | 8 |
|
|---|
| [13437] | 9 | #Simple mesh
|
|---|
| [21877] | 10 | md=bamg(model(),'domain','../Exp/Square.exp','hmax',100000.)
|
|---|
| [13437] | 11 | x1=md.mesh.x
|
|---|
| 12 | y1=md.mesh.y
|
|---|
| 13 |
|
|---|
| 14 | #hVertices
|
|---|
| [21877] | 15 | md=bamg(model(),'domain','../Exp/Square.exp','hmax',300000.,'hVertices',np.array([10000.,100000.,400000.,100000.]).reshape(-1,1))
|
|---|
| [13437] | 16 | x2=md.mesh.x
|
|---|
| 17 | y2=md.mesh.y
|
|---|
| 18 |
|
|---|
| 19 | #big mesh
|
|---|
| 20 | t0=time.time()
|
|---|
| [21877] | 21 | md=bamg(model(),'domain','../Exp/Square.exp','hmax',3000.)
|
|---|
| [13437] | 22 | nbelements=md.mesh.numberofelements
|
|---|
| 23 | elapsedtime=time.time()-t0
|
|---|
| [17088] | 24 | if nbelements>267895-50 and nbelements<267895+50:
|
|---|
| 25 | nbewithinrange = 1.
|
|---|
| 26 | else:
|
|---|
| 27 | nbewithinrange = 0.
|
|---|
| [13437] | 28 |
|
|---|
| 29 | #Fields and tolerances to track changes
|
|---|
| 30 | field_names =['x1','y1','x2','y2','nbelements','elapsed time']
|
|---|
| [17011] | 31 | field_tolerances=[2e-9,2e-9,1e-13,1e-13,1e-13,4.0]
|
|---|
| [13437] | 32 | field_values=[\
|
|---|
| 33 | x1, y1,\
|
|---|
| 34 | x2, y2,\
|
|---|
| [17088] | 35 | nbewithinrange,elapsedtime,\
|
|---|
| [13437] | 36 | ]
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.