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

Last change on this file since 24214 was 24214, checked in by bdef, 5 years ago

CHG: syntax cahnge to meet most of Pep8 requirement

File size: 993 bytes
RevLine 
[19049]1#Test Name: SquareBamgMesh
[21408]2import numpy as np
[13437]3import time
4from model import *
5from bamg import *
6
[21408]7
[13437]8#Simple mesh
[23793]9md = bamg(model(), 'domain', '../Exp/Square.exp', 'hmax', 100000.)
10x1 = md.mesh.x
11y1 = md.mesh.y
[13437]12
13#hVertices
[24214]14md = bamg(model(), 'domain', '../Exp/Square.exp', 'hmax', 300000., 'hVertices', np.array([10000., 100000., 400000., 100000.]).reshape(- 1, 1))
[23793]15x2 = md.mesh.x
16y2 = md.mesh.y
[13437]17
18#big mesh
[23793]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.
[17088]25else:
[23793]26 nbewithinrange = 0.
[13437]27
28#Fields and tolerances to track changes
[23793]29field_names = ['x1', 'y1', 'x2', 'y2', 'nbelements', 'elapsed time']
[23692]30# NOTE: Elapsed time tolerance has been increased to 7.0 for this test, but not the MATLBAB one
[23793]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.