source: issm/trunk-jpl/test/NightlyRun/test119.py@ 21877

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
Line 
1#Test Name: SquareBamgMesh
2import numpy as np
3import time
4from model import *
5from socket import gethostname
6from bamg import *
7
8
9#Simple mesh
10md=bamg(model(),'domain','../Exp/Square.exp','hmax',100000.)
11x1=md.mesh.x
12y1=md.mesh.y
13
14#hVertices
15md=bamg(model(),'domain','../Exp/Square.exp','hmax',300000.,'hVertices',np.array([10000.,100000.,400000.,100000.]).reshape(-1,1))
16x2=md.mesh.x
17y2=md.mesh.y
18
19#big mesh
20t0=time.time()
21md=bamg(model(),'domain','../Exp/Square.exp','hmax',3000.)
22nbelements=md.mesh.numberofelements
23elapsedtime=time.time()-t0
24if nbelements>267895-50 and nbelements<267895+50:
25 nbewithinrange = 1.
26else:
27 nbewithinrange = 0.
28
29#Fields and tolerances to track changes
30field_names =['x1','y1','x2','y2','nbelements','elapsed time']
31field_tolerances=[2e-9,2e-9,1e-13,1e-13,1e-13,4.0]
32field_values=[\
33 x1, y1,\
34 x2, y2,\
35 nbewithinrange,elapsedtime,\
36 ]
Note: See TracBrowser for help on using the repository browser.