/[escript]/trunk/finley/test/python/testframe.py
ViewVC logotype

Contents of /trunk/finley/test/python/testframe.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1809 - (show annotations)
Thu Sep 25 06:43:44 2008 UTC (11 years, 3 months ago) by ksteube
File MIME type: text/x-python
File size: 1852 byte(s)
Copyright updated in all python files

1
2 ########################################################
3 #
4 # Copyright (c) 2003-2008 by University of Queensland
5 # Earth Systems Science Computational Center (ESSCC)
6 # http://www.uq.edu.au/esscc
7 #
8 # Primary Business: Queensland, Australia
9 # Licensed under the Open Software License version 3.0
10 # http://www.opensource.org/licenses/osl-3.0.php
11 #
12 ########################################################
13
14 __copyright__="""Copyright (c) 2003-2008 by University of Queensland
15 Earth Systems Science Computational Center (ESSCC)
16 http://www.uq.edu.au/esscc
17 Primary Business: Queensland, Australia"""
18 __license__="""Licensed under the Open Software License version 3.0
19 http://www.opensource.org/licenses/osl-3.0.php"""
20 __url__="http://www.uq.edu.au/esscc/escript-finley"
21
22 """
23 frame to ran a single test out of the Test_util suite
24 """
25
26 import unittest
27 from esys.escript import *
28 from esys.escript.linearPDEs import LinearPDE
29 from esys.finley import Rectangle, JoinFaces, Brick
30
31 import numarray
32 FINLEY_TEST_MESH_PATH="data_meshes/"
33
34 NE=1 # number of element in each spatial direction (must be even)
35
36 class Test_X(unittest.TestCase):
37 RES_TOL=1.e-7
38 ABS_TOL=1.e-8
39 DEBUG=True
40 def setUp(self):
41 self.domain = Rectangle(n0=NE,n1=NE,l0=0.5,order=1)
42
43 def test_setCoefficient_y_reduced_Scalar_using_y(self):
44 d=self.domain.getDim()
45 mypde=LinearPDE(self.domain,numSolutions=3,debug=self.DEBUG)
46 mypde.setValue(y=Scalar(1.,ReducedFunctionOnBoundary(self.domain)))
47 coeff=mypde.getCoefficientOfGeneralPDE("y_reduced")
48 self.failUnlessEqual((coeff.getShape(),coeff.getFunctionSpace(),mypde.getNumEquations()),((),ReducedFunctionOnBoundary(self.domain),1))
49
50 if __name__ == '__main__':
51 suite = unittest.TestSuite()
52 suite.addTest(unittest.makeSuite(Test_X))
53 s=unittest.TextTestRunner(verbosity=2).run(suite)
54
55

  ViewVC Help
Powered by ViewVC 1.1.26