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

Last change on this file since 23692 was 23692, checked in by jdquinn, 6 years ago

CHG: Increased elapsed time tolerance for Python version of test 119 only

File size: 968 bytes
RevLine 
[19049]1#Test Name: SquareBamgMesh
[21408]2import numpy as np
[13437]3import time
4from model import *
[21408]5from socket import gethostname
[13437]6from bamg import *
7
[21408]8
[13437]9#Simple mesh
[21877]10md=bamg(model(),'domain','../Exp/Square.exp','hmax',100000.)
[13437]11x1=md.mesh.x
12y1=md.mesh.y
13
14#hVertices
[21877]15md=bamg(model(),'domain','../Exp/Square.exp','hmax',300000.,'hVertices',np.array([10000.,100000.,400000.,100000.]).reshape(-1,1))
[13437]16x2=md.mesh.x
17y2=md.mesh.y
18
19#big mesh
20t0=time.time()
[21877]21md=bamg(model(),'domain','../Exp/Square.exp','hmax',3000.)
[13437]22nbelements=md.mesh.numberofelements
23elapsedtime=time.time()-t0
[17088]24if nbelements>267895-50 and nbelements<267895+50:
25 nbewithinrange = 1.
26else:
27 nbewithinrange = 0.
[13437]28
29#Fields and tolerances to track changes
30field_names =['x1','y1','x2','y2','nbelements','elapsed time']
[23692]31# NOTE: Elapsed time tolerance has been increased to 7.0 for this test, but not the MATLBAB one
32field_tolerances=[2e-9,2e-9,1e-13,1e-13,1e-13,7.0]
[13437]33field_values=[\
34 x1, y1,\
35 x2, y2,\
[17088]36 nbewithinrange,elapsedtime,\
[13437]37 ]
Note: See TracBrowser for help on using the repository browser.