/[escript]/trunk/dudley/test/python/run_utilOnDudley.py
ViewVC logotype

Contents of /trunk/dudley/test/python/run_utilOnDudley.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5706 - (show annotations)
Mon Jun 29 03:41:36 2015 UTC (4 years, 2 months ago) by sshaw
File MIME type: text/x-python
File size: 3395 byte(s)
all python files now force use of python3 prints and division syntax to stop sneaky errors appearing in py3 environs
1
2 ##############################################################################
3 #
4 # Copyright (c) 2003-2015 by The University of Queensland
5 # http://www.uq.edu.au
6 #
7 # Primary Business: Queensland, Australia
8 # Licensed under the Open Software License version 3.0
9 # http://www.opensource.org/licenses/osl-3.0.php
10 #
11 # Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 # Development 2012-2013 by School of Earth Sciences
13 # Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 #
15 ##############################################################################
16
17 from __future__ import print_function, division
18
19 __copyright__="""Copyright (c) 2003-2015 by The University of Queensland
20 http://www.uq.edu.au
21 Primary Business: Queensland, Australia"""
22 __license__="""Licensed under the Open Software License version 3.0
23 http://www.opensource.org/licenses/osl-3.0.php"""
24 __url__="https://launchpad.net/escript-finley"
25
26 import esys.escriptcore.utestselect as unittest
27 from esys.escriptcore.testing import *
28 from test_util import Test_util as Test_util
29 from test_util import Test_Util_SpatialFunctions, Test_Util_SpatialFunctions_noGradOnBoundary_noContact
30
31 from esys.escript import *
32 from esys.dudley import Rectangle,Brick,ReadMesh
33 import sys
34 import os
35
36 if HAVE_SYMBOLS:
37 from test_symfuncs import Test_symfuncs
38 else:
39 print("Skipping symbolic tests since sympy is not available")
40 class Test_symfuncs:
41 pass
42
43 try:
44 DUDLEY_TEST_DATA=os.environ['DUDLEY_TEST_DATA']
45 except KeyError:
46 DUDLEY_TEST_DATA='.'
47
48 try:
49 DUDLEY_WORKDIR=os.environ['DUDLEY_WORKDIR']
50 except KeyError:
51 DUDLEY_WORKDIR='.'
52
53 DUDLEY_TEST_MESH_PATH=os.path.join(DUDLEY_TEST_DATA,"data_meshes")
54
55
56 NE=4 # number elements, must be even
57
58 class Test_UtilOnDudley(Test_util,Test_symfuncs):
59 def setUp(self):
60 self.domain =Rectangle(NE,NE+1,1)
61 self.functionspace = FunctionOnBoundary(self.domain) # due to a bug in escript python needs to hold a reference to the domain
62 self.workdir=DUDLEY_WORKDIR
63
64 def tearDown(self):
65 del self.functionspace
66 del self.domain
67
68 class Test_Util_SpatialFunctionsOnDudleyTet2DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
69 def setUp(self):
70 self.order=1
71 self.domain = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet_2D_order1.fly"),optimize=False)
72 def tearDown(self):
73 del self.order
74 del self.domain
75
76
77 class Test_Util_SpatialFunctionsOnDudleyTet3DOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
78 def setUp(self):
79 self.order=1
80 self.domain = ReadMesh(os.path.join(DUDLEY_TEST_MESH_PATH,"tet_3D_order1.fly"),optimize=False)
81 def tearDown(self):
82 del self.order
83 del self.domain
84
85 class Test_Util_SpatialFunctionsOnDudleyRectOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
86 def setUp(self):
87 self.order=1
88 self.domain = Rectangle(n0=NE,n1=NE,order=1)
89 def tearDown(self):
90 del self.order
91 del self.domain
92
93
94 class Test_Util_SpatialFunctionsOnDudleyBrickOrder1(Test_Util_SpatialFunctions_noGradOnBoundary_noContact):
95 def setUp(self):
96 self.order=1
97 self.domain = Brick(n0=NE,n1=NE,n2=NE,order=1)
98 def tearDown(self):
99 del self.order
100 del self.domain
101
102
103
104 if __name__ == '__main__':
105 run_tests(__name__, exit_on_failure=True)
106

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision
svn:mergeinfo /branches/4.0fordebian/dudley/test/python/run_utilOnDudley.py:5567-5588 /branches/diaplayground/dudley/test/python/run_utilOnDudley.py:4940-5147 /branches/lapack2681/finley/test/python/run_utilOnFinley.py:2682-2741 /branches/pasowrap/dudley/test/python/run_utilOnDudley.py:3661-3674 /branches/py3_attempt2/dudley/test/python/run_utilOnDudley.py:3871-3891 /branches/restext/finley/test/python/run_utilOnFinley.py:2610-2624 /branches/ripleygmg_from_3668/dudley/test/python/run_utilOnDudley.py:3669-3791 /branches/stage3.0/finley/test/python/run_utilOnFinley.py:2569-2590 /branches/symbolic_from_3470/dudley/test/python/run_utilOnDudley.py:3471-3974 /branches/symbolic_from_3470/ripley/test/python/dudley/test/python/run_utilOnDudley.py:3517-3974 /release/3.0/finley/test/python/run_utilOnFinley.py:2591-2601 /release/4.0/dudley/test/python/run_utilOnDudley.py:5380-5406 /trunk/ripley/test/python/dudley/test/python/run_utilOnDudley.py:3480-3515

  ViewVC Help
Powered by ViewVC 1.1.26