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

Last change on this file was 28272, checked in by jdquinn, 10 months ago

CHG: Adjusted tolerance; clean up

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