/[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 1375 - (show annotations)
Wed Jan 9 00:15:05 2008 UTC (12 years, 8 months ago) by gross
File MIME type: text/x-python
File size: 1803 byte(s)
bug in interpolation at reduced face elements fixed.
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 """
18 frame to ran a single test out of the Test_util suite
19 """
20
21 __copyright__=""" Copyright (c) 2006 by ACcESS MNRF
22 http://www.access.edu.au
23 Primary Business: Queensland, Australia"""
24 __license__="""Licensed under the Open Software License version 3.0
25 http://www.opensource.org/licenses/osl-3.0.php"""
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