1 |
# $Id$ |
2 |
|
3 |
import os |
4 |
import sys |
5 |
|
6 |
from esys.escript import * |
7 |
from esys.bruce import * |
8 |
|
9 |
""" |
10 |
|
11 |
Some simple tests of Bruce. |
12 |
|
13 |
""" |
14 |
|
15 |
b = Bruce() |
16 |
|
17 |
assert (b.getDescription()=="Bruce") |
18 |
|
19 |
assert (b.isValidFunctionSpaceType(0)) |
20 |
assert (b.isValidFunctionSpaceType(1)) |
21 |
assert ( not (b.isValidFunctionSpaceType(2))) |
22 |
|
23 |
assert (b.getContinuousFunctionCode()==0) |
24 |
assert (b.getFunctionCode()==1) |
25 |
|
26 |
assert (b.getDim()==0) |
27 |
|
28 |
brick = Brick(11,11,11,10,10,10) |
29 |
|
30 |
assert (brick.getDim()==3) |
31 |
|
32 |
brick.getX() |
33 |
brick.getSize() |
34 |
|
35 |
rectangle = Rectangle(11,11,10,10) |
36 |
|
37 |
assert (rectangle.getDim()==2) |
38 |
|
39 |
rectangle.getX() |
40 |
rectangle.getSize() |
41 |
|
42 |
sys.exit(0) |