1 |
# |
2 |
# $Id:$ |
3 |
# |
4 |
####################################################### |
5 |
# |
6 |
# Copyright 2003-2007 by ACceSS MNRF |
7 |
# Copyright 2007 by University of Queensland |
8 |
# |
9 |
# http://esscc.uq.edu.au |
10 |
# Primary Business: Queensland, Australia |
11 |
# Licensed under the Open Software License version 3.0 |
12 |
# http://www.opensource.org/licenses/osl-3.0.php |
13 |
# |
14 |
####################################################### |
15 |
# |
16 |
|
17 |
__copyright__=""" Copyright (c) 2006 by ACcESS MNRF |
18 |
http://www.access.edu.au |
19 |
Primary Business: Queensland, Australia""" |
20 |
__license__="""Licensed under the Open Software License version 3.0 |
21 |
http://www.opensource.org/licenses/osl-3.0.php""" |
22 |
import unittest |
23 |
import tempfile |
24 |
|
25 |
from esys.escript import * |
26 |
from esys.finley import Rectangle |
27 |
import sys |
28 |
import os |
29 |
from test_objects import Test_Dump, Test_SetDataPointValue |
30 |
from test_objects import Test_Domain |
31 |
|
32 |
try: |
33 |
FINLEY_WORKDIR=os.environ['FINLEY_WORKDIR'] |
34 |
except KeyError: |
35 |
FINLEY_WORKDIR='.' |
36 |
|
37 |
NE=4 # number elements, must be even |
38 |
class Test_DomainOnFinley(Test_Domain): |
39 |
def setUp(self): |
40 |
self.domain =Rectangle(NE,NE+1,2) |
41 |
def tearDown(self): |
42 |
del self.domain |
43 |
class Test_DataOpsOnFinley(Test_Dump): # , Test_SetDataPointValue): |
44 |
def setUp(self): |
45 |
self.domain =Rectangle(NE,NE+1,2) |
46 |
self.domain_with_different_number_of_samples =Rectangle(2*NE,NE+1,2) |
47 |
self.domain_with_different_number_of_data_points_per_sample =Rectangle(2*NE,NE+1,2,integrationOrder=2) |
48 |
self.domain_with_different_sample_ordering =Rectangle(1,(NE+1)*NE,2) |
49 |
self.filename_base=FINLEY_WORKDIR |
50 |
|
51 |
def tearDown(self): |
52 |
del self.domain |
53 |
del self.domain_with_different_number_of_samples |
54 |
del self.domain_with_different_number_of_data_points_per_sample |
55 |
del self.domain_with_different_sample_ordering |
56 |
|
57 |
if __name__ == '__main__': |
58 |
suite = unittest.TestSuite() |
59 |
suite.addTest(unittest.makeSuite(Test_DataOpsOnFinley)) |
60 |
suite.addTest(unittest.makeSuite(Test_DomainOnFinley)) |
61 |
s=unittest.TextTestRunner(verbosity=2).run(suite) |
62 |
if not s.wasSuccessful(): sys.exit(1) |
63 |
|