|
1 | 1 | # - getVolumeMap (pyTree) - |
2 | 2 | import Generator.PyTree as G |
3 | 3 | import Converter.PyTree as C |
4 | | -import KCore.test as T |
| 4 | +import KCore.test as test |
5 | 5 |
|
6 | 6 | # 3D structured |
7 | 7 | a = G.cart((0.,0.,0.), (0.1,0.1,0.2), (10,10,3)) |
|
13 | 13 | t[2][1] = C.addState(t[2][1], 'Mach', 0.6) |
14 | 14 | t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.) |
15 | 15 | t = G.getVolumeMap(t) |
16 | | -T.testT(t,1) |
| 16 | +test.testT(t,1) |
17 | 17 |
|
18 | 18 | # 2D structured |
19 | 19 | a = G.cart((0.,0.,0.), (0.1,0.1,0.2), (10,10,1)) |
20 | 20 | t = C.newPyTree(['Base',2]); t[2][1][2].append(a) |
21 | 21 | t[2][1] = C.addState(t[2][1], 'Mach', 0.6) |
22 | 22 | t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.) |
23 | 23 | t = G.getVolumeMap(t) |
24 | | -T.testT(t,2) |
| 24 | +test.testT(t,2) |
25 | 25 |
|
26 | 26 | # 2D unstructured quad |
27 | 27 | a = G.cartHexa((0.,0.,0.), (0.1,0.1,0.2), (10,10,1)) |
28 | 28 | t = C.newPyTree(['Base',2]); t[2][1][2].append(a) |
29 | 29 | t[2][1] = C.addState(t[2][1], 'Mach', 0.6) |
30 | 30 | t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.) |
31 | 31 | t = G.getVolumeMap(t) |
32 | | -T.testT(t,3) |
| 32 | +test.testT(t,3) |
33 | 33 |
|
34 | 34 | # 3D unstructured hexa |
35 | 35 | a = G.cartHexa((0.,0.,0.), (0.1,0.1,0.2), (10,10,10)) |
36 | 36 | t = C.newPyTree(['Base']); t[2][1][2].append(a) |
37 | 37 | t[2][1] = C.addState(t[2][1], 'Mach', 0.6) |
38 | 38 | t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.) |
39 | 39 | t = G.getVolumeMap(t) |
40 | | -T.testT(t,4) |
| 40 | +test.testT(t,4) |
41 | 41 |
|
42 | 42 | # 2D unstructured tri |
43 | 43 | a = G.cartTetra((0.,0.,0.), (0.1,0.1,0.2), (10,10,1)) |
44 | 44 | t = C.newPyTree(['Base',2]); t[2][1][2].append(a) |
45 | 45 | t[2][1] = C.addState(t[2][1], 'Mach', 0.6) |
46 | 46 | t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.) |
47 | 47 | t = G.getVolumeMap(t) |
48 | | -T.testT(t,5) |
| 48 | +test.testT(t,5) |
49 | 49 |
|
50 | 50 | # 3D unstructured tetra |
51 | 51 | a = G.cartTetra((0.,0.,0.), (0.1,0.1,0.2), (10,10,10)) |
52 | 52 | t = C.newPyTree(['Base']); t[2][1][2].append(a) |
53 | 53 | t[2][1] = C.addState(t[2][1], 'Mach', 0.6) |
54 | 54 | t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.) |
55 | 55 | t = G.getVolumeMap(t) |
56 | | -T.testT(t,6) |
| 56 | +test.testT(t,6) |
0 commit comments