1 |
# $Id:$ |
2 |
""" |
3 |
frame to ran a single test out of the Test_util suite |
4 |
""" |
5 |
|
6 |
__copyright__=""" Copyright (c) 2006 by ACcESS MNRF |
7 |
http://www.access.edu.au |
8 |
Primary Business: Queensland, Australia""" |
9 |
__license__="""Licensed under the Open Software License version 3.0 |
10 |
http://www.opensource.org/licenses/osl-3.0.php""" |
11 |
import unittest |
12 |
from esys.escript import * |
13 |
from esys.escript.pdetools import Projector |
14 |
from esys.finley import Rectangle |
15 |
# from test_pdetools import Test_pdetools |
16 |
|
17 |
NE=6 |
18 |
import numarray |
19 |
class Test_LinearPDEOnFinleyHex2DOrder1(unittest.TestCase): |
20 |
RES_TOL=1.e-7 |
21 |
ABS_TOL=1.e-8 |
22 |
def setUp(self): |
23 |
self.domain = Rectangle(NE,NE,1) |
24 |
def tearDown(self): |
25 |
del self.domain |
26 |
def testProjector_rank3_fast_reduced_with_reduced_input(self): |
27 |
for i in range(800): |
28 |
print i,i |
29 |
f=ContinuousFunction(self.domain) |
30 |
x=f.getX() |
31 |
h=Lsup(self.domain.getSize()) |
32 |
p=Projector(self.domain, reduce=True,fast=True) |
33 |
# td_ref=numarray.array([[[111.,112.],[121,122.]],[[211.,212.],[221,222.]]]) |
34 |
a=Data([1.,1.],ReducedFunction(self.domain)) |
35 |
# Lsup(a) |
36 |
td=p(a) |
37 |
# self.failUnless(Lsup(td-td_ref)<Lsup(td_ref)*h,"value wrong") |
38 |
|
39 |
if __name__ == '__main__': |
40 |
suite = unittest.TestSuite() |
41 |
suite.addTest(unittest.makeSuite(Test_LinearPDEOnFinleyHex2DOrder1)) |
42 |
s=unittest.TextTestRunner(verbosity=2).run(suite) |
43 |
|
44 |
|