source: anuga_core/source/anuga/pyvolution/test_ghost.py @ 3546

Last change on this file since 3546 was 3514, checked in by duncan, 19 years ago

Hi all,
I'm doing a change in the anuga structure, moving the code to

\anuga_core\source\anuga

After you have done an svn update, the PYTHONPATH has to be changed to;
PYTHONPATH = anuga_core/source/

This is part of changes required to make installation of anuga quicker and reducing the size of our sandpits.

If any imports are broken, try fixing them. With adding anuga. to them for example. If this seems to have really broken things, email/phone me.

Cheers
Duncan

File size: 1.3 KB
Line 
1#!/usr/bin/env python
2
3import unittest
4from math import sqrt
5
6from domain import *
7from anuga.config import epsilon
8from Numeric import allclose, array, ones, Float
9
10
11
12
13class Test_Domain(unittest.TestCase):
14    def setUp(self):
15        pass
16
17
18    def tearDown(self):
19        pass
20
21
22    def test_simple(self):
23        a = [0.0, 0.0]
24        b = [0.0, 2.0]
25        c = [2.0,0.0]
26        d = [0.0, 4.0]
27        e = [2.0, 2.0]
28        f = [4.0,0.0]
29
30        points = [a, b, c, d, e, f]
31        #bac, bce, ecf, dbe, daf, dae
32        vertices = [ [1,0,2], [1,2,4], [4,2,5], [3,1,4]]
33
34        conserved_quantities = ['stage', 'xmomentum', 'ymomentum']
35        other_quantities = ['elevation', 'friction']
36
37        domain = Domain(points, vertices, None,
38                        conserved_quantities, other_quantities)
39        domain.check_integrity()
40
41        for name in conserved_quantities + other_quantities:
42            assert domain.quantities.has_key(name)
43
44
45        assert domain.get_conserved_quantities(0, edge=1) == 0.
46
47
48
49
50#-------------------------------------------------------------
51if __name__ == "__main__":
52    suite = unittest.makeSuite(Test_Domain,'test')
53    runner = unittest.TextTestRunner()
54    runner.run(suite)
Note: See TracBrowser for help on using the repository browser.