Skip to content

Commit e12bb1c

Browse files
Merge pull request #538 from vincentcasseau/dev-minor
All: minor, correct import of KCore.test
2 parents 4934cbd + a15eac1 commit e12bb1c

17 files changed

+82
-82
lines changed

Cassiopee/Converter/test/convertArray2Array3D_t1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
import Generator as G
55
import Converter.Array3D
6-
import KCore.test as T
6+
import KCore.test as test
77

88
a = G.cart( (0,0,0), (0.1, 0.2, 1.), (11, 4, 1))
99
b = Converter.Array3D.convertArrays2Arrays3D([a])
1010
c = Converter.Array3D.convertArrays3D2Arrays(b)
11-
T.testA(c, 1)
11+
test.testA(c, 1)

Cassiopee/Converter/test/convertArray3D2Array_t1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
import Generator as G
55
import Converter.Array3D
6-
import KCore.test as T
6+
import KCore.test as test
77

88
a = G.cart( (0,0,0), (0.1, 0.2, 1.), (11, 4, 2))
99
b = Converter.Array3D.convertArrays2Arrays3D([a])
1010
c = Converter.Array3D.convertArrays3D2Arrays(b)
11-
T.testA(c, 1)
11+
test.testA(c, 1)

Cassiopee/Converter/test/diffArrays_t1.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# - diffArrays -
22
import Converter as C
33
import Generator as G
4-
import KCore.test as T
4+
import KCore.test as test
55

66
ni = 11; nj = 11; nk = 11
77

@@ -21,7 +21,7 @@
2121
b = C.initVars(b, "R", 1.12)
2222

2323
ret = C.diffArrays([a], [b])
24-
T.testA(ret, 1)
24+
test.testA(ret, 1)
2525

2626
# Test avec des coordonnees differentes
2727
a = G.cart( (0.2,0.3,0), (1,1,1), (ni,nj,nk) )
@@ -37,12 +37,12 @@
3737
b = C.initVars(b, "Q", 1.03)
3838

3939
ret = C.diffArrays([a], [b])
40-
T.testA(ret, 2)
40+
test.testA(ret, 2)
4141

4242
# Test sans coordonnees
4343
a = C.array('F,G',ni,nj,nk)
4444
b = C.array('F,G',ni,nj,nk)
4545
b = C.initVars(b, "F", 1.2)
4646

4747
ret = C.diffArrays([a], [b])
48-
T.testA(ret, 3)
48+
test.testA(ret, 3)

Cassiopee/Converter/test/diffArrays_t2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# - diffArrays en non structure tetra -
22
import Converter as C
33
import Generator as G
4-
import KCore.test as T
4+
import KCore.test as test
55

66
ni = 11; nj = 11; nk = 11
77

@@ -21,7 +21,7 @@
2121
b = C.initVars(b, "R", 1.12)
2222

2323
ret = C.diffArrays([a], [b])
24-
T.testA(ret, 1)
24+
test.testA(ret, 1)
2525

2626
# Test avec des coordonnees differentes
2727
a = G.cartTetra( (0.2,0.3,0), (1,1,1), (ni,nj,nk) )
@@ -37,12 +37,12 @@
3737
b = C.initVars(b, "Q", 1.03)
3838

3939
ret = C.diffArrays([a], [b])
40-
T.testA(ret, 2)
40+
test.testA(ret, 2)
4141

4242
# Test sans coordonnees
4343
np = 12; ne = 9
4444
a = C.array('F,G',np,ne,'QUAD')
4545
b = C.array('F,G',np,ne,'QUAD')
4646
b = C.initVars(b, "F", 1.2)
4747
ret = C.diffArrays([a], [b])
48-
T.testA(ret, 3)
48+
test.testA(ret, 3)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
# - getMaxLength(pyTree) -
22
import Generator.PyTree as G
33
import Converter.PyTree as C
4-
import KCore.test as T
4+
import KCore.test as test
55

66
a = G.cart((0.,0.,0.), (0.1,0.1,0.1), (11,11,11))
77
a = G.enforcePlusX(a,1e-6,(5,50))
88
a = C.addBC2Zone(a, 'wall1','BCWall','jmin')
99
a = C.fillEmptyBCWith(a,'overlap','BCOverlap')
1010
a = C.initVars(a,'F',1.); a = C.initVars(a,'centers:G',1.)
1111
a = G.getMaxLength(a)
12-
T.testT(a,1)
12+
test.testT(a,1)
1313
#
1414
# TEST NON STRUCTURE ELT BASIQUE
1515
a = G.cart((0.,0.,0.), (0.1,0.1,0.1), (11,11,11))
1616
a = G.enforcePlusX(a,1e-6,(5,50))
1717
a = C.convertArray2Tetra(a)
1818
a = C.initVars(a,'F',1.); a = C.initVars(a,'centers:G',1.)
1919
a = G.getMaxLength(a)
20-
T.testT(a,2)
20+
test.testT(a,2)
2121
#
2222
# TEST NON STRUCTURE NGON
2323
a = G.cart((0.,0.,0.), (0.1,0.1,0.1), (11,11,11))
@@ -26,4 +26,4 @@
2626
a = G.cartNGon((0.,0.,0.), (0.1,0.1,0.1), (11,11,11))
2727
a = C.initVars(a,'F',1.); a = C.initVars(a,'centers:G',1.)
2828
a = G.getMaxLength(a)
29-
T.testT(a,3)
29+
test.testT(a,3)
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# - getOrthogonalityMap (pyTree) -
22
import Generator.PyTree as G
33
import Converter.PyTree as C
4-
import KCore.test as T
4+
import KCore.test as test
55

66
# Test 3D structure
77
a = G.cylinder((0.,0.,0.), 0.5, 1., 360., 0., 10., (50,50,10))
@@ -13,17 +13,17 @@
1313
a = C.initVars(a,'Density',1.); a = C.initVars(a,'centers:cellN',1.)
1414
a = G.getOrthogonalityMap(a)
1515
t = C.newPyTree(['Base']); t[2][1][2].append(a)
16-
T.testT(t, 1)
16+
test.testT(t, 1)
1717

1818
# Test 2D structure
1919
a = G.cart((0.,0.,0.), (0.1,0.1,0.2), (10,10,1))
2020
a = C.addBC2Zone(a, 'wall1','BCWall','imin')
2121
a = C.initVars(a,'Density',1.); a = C.initVars(a,'centers:cellN',1.)
2222
t = G.getOrthogonalityMap(a)
23-
T.testT(t, 2)
23+
test.testT(t, 2)
2424

2525
# Test 2D structure
2626
a = G.cart((0.,0.,0.), (0.1,0.1,0.2), (1,10,1))
2727
a = C.initVars(a,'Density',1.); a = C.initVars(a,'centers:cellN',1.)
2828
t = G.getOrthogonalityMap(a)
29-
T.testT(t, 3)
29+
test.testT(t, 3)
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# - getVolumeMap (pyTree) -
22
import Generator.PyTree as G
33
import Converter.PyTree as C
4-
import KCore.test as T
4+
import KCore.test as test
55

66
# 3D structured
77
a = G.cart((0.,0.,0.), (0.1,0.1,0.2), (10,10,3))
@@ -13,44 +13,44 @@
1313
t[2][1] = C.addState(t[2][1], 'Mach', 0.6)
1414
t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.)
1515
t = G.getVolumeMap(t)
16-
T.testT(t,1)
16+
test.testT(t,1)
1717

1818
# 2D structured
1919
a = G.cart((0.,0.,0.), (0.1,0.1,0.2), (10,10,1))
2020
t = C.newPyTree(['Base',2]); t[2][1][2].append(a)
2121
t[2][1] = C.addState(t[2][1], 'Mach', 0.6)
2222
t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.)
2323
t = G.getVolumeMap(t)
24-
T.testT(t,2)
24+
test.testT(t,2)
2525

2626
# 2D unstructured quad
2727
a = G.cartHexa((0.,0.,0.), (0.1,0.1,0.2), (10,10,1))
2828
t = C.newPyTree(['Base',2]); t[2][1][2].append(a)
2929
t[2][1] = C.addState(t[2][1], 'Mach', 0.6)
3030
t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.)
3131
t = G.getVolumeMap(t)
32-
T.testT(t,3)
32+
test.testT(t,3)
3333

3434
# 3D unstructured hexa
3535
a = G.cartHexa((0.,0.,0.), (0.1,0.1,0.2), (10,10,10))
3636
t = C.newPyTree(['Base']); t[2][1][2].append(a)
3737
t[2][1] = C.addState(t[2][1], 'Mach', 0.6)
3838
t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.)
3939
t = G.getVolumeMap(t)
40-
T.testT(t,4)
40+
test.testT(t,4)
4141

4242
# 2D unstructured tri
4343
a = G.cartTetra((0.,0.,0.), (0.1,0.1,0.2), (10,10,1))
4444
t = C.newPyTree(['Base',2]); t[2][1][2].append(a)
4545
t[2][1] = C.addState(t[2][1], 'Mach', 0.6)
4646
t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.)
4747
t = G.getVolumeMap(t)
48-
T.testT(t,5)
48+
test.testT(t,5)
4949

5050
# 3D unstructured tetra
5151
a = G.cartTetra((0.,0.,0.), (0.1,0.1,0.2), (10,10,10))
5252
t = C.newPyTree(['Base']); t[2][1][2].append(a)
5353
t[2][1] = C.addState(t[2][1], 'Mach', 0.6)
5454
t = C.initVars(t,'Density',2.); t = C.initVars(t,'centers:cellN',1.)
5555
t = G.getVolumeMap(t)
56-
T.testT(t,6)
56+
test.testT(t,6)

Cassiopee/Post/test/computeCurl_t1.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import Converter as C
33
import Post as P
44
import Generator as G
5-
import KCore.test as T
5+
import KCore.test as test
66

77
def F(x,y,z):
88
return 12*y*y + 4
@@ -20,7 +20,7 @@ def DF(y):
2020
p1 = P.computeCurl(m1,['u','v','w']) # defined on centers
2121
m = C.node2Center(m)
2222
p1 = C.addVars([m,p1])
23-
T.testA([p1], 1)
23+
test.testA([p1], 1)
2424

2525
# Test 2D
2626
ni = 30; nj = 40; nk = 1
@@ -29,8 +29,8 @@ def DF(y):
2929
m = C.initVars(m,'v',0.)
3030
m2 = C.initVars(m,'w',0.)
3131
p2 = P.computeCurl(m2,['u','v','w']) # defined on centers
32-
T.testA([p2], 2)
32+
test.testA([p2], 2)
3333

3434
# test sur une liste
3535
P = P.computeCurl([m1,m2],['u','v','w']) # defined on centers
36-
T.testA(P, 3)
36+
test.testA(P, 3)

Cassiopee/Post/test/computeCurl_t2.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import Converter as C
33
import Post as P
44
import Generator as G
5-
import KCore.test as T
5+
import KCore.test as test
66

77
def F(x,y,z): return 12*y*y + 4
88

@@ -16,7 +16,7 @@ def DF(y): return -24.*y
1616
m = C.initVars(m,'w',0.)
1717
m = C.initVars(m,'sol',DF,['y'])
1818
p = P.computeCurl(m, ['u','v','w']) # defined on centers
19-
T.testA([p], 1)
19+
test.testA([p], 1)
2020

2121
# cas 3D tetra
2222
ni = 30; nj = 40; nk = 3
@@ -26,7 +26,7 @@ def DF(y): return -24.*y
2626
m = C.initVars(m,'w',0.)
2727
m = C.initVars(m,'sol',DF,['y'])
2828
p = P.computeCurl(m,['u','v','w']) # defined on centers
29-
T.testA([p], 2)
29+
test.testA([p], 2)
3030

3131
# cas 3D penta
3232
ni = 30; nj = 40; nk = 3
@@ -36,7 +36,7 @@ def DF(y): return -24.*y
3636
m = C.initVars(m,'w',0.)
3737
m = C.initVars(m,'sol',DF,['y'])
3838
p = P.computeCurl(m,['u','v','w']) # defined on centers
39-
T.testA([p], 3)
39+
test.testA([p], 3)
4040

4141
# cas 2D QUAD
4242
ni = 30; nj = 40; nk = 1
@@ -46,7 +46,7 @@ def DF(y): return -24.*y
4646
m = C.initVars(m,'w',0.)
4747
m = C.initVars(m,'sol',DF,['y'])
4848
p = P.computeCurl(m,['u','v','w']) # defined on centers
49-
T.testA([p], 4)
49+
test.testA([p], 4)
5050

5151
# cas 2D tri
5252
ni = 30; nj = 40; nk = 1
@@ -56,7 +56,7 @@ def DF(y): return -24.*y
5656
m = C.initVars(m,'w',0.)
5757
m = C.initVars(m,'sol',DF,['y'])
5858
p = P.computeCurl(m,['u','v','w']) # defined on centers
59-
T.testA([p], 5)
59+
test.testA([p], 5)
6060

6161
# cas 3D NGON
6262
ni = 30; nj = 40; nk = 3
@@ -66,4 +66,4 @@ def DF(y): return -24.*y
6666
m = C.initVars(m,'w',0.)
6767
m = C.initVars(m,'sol',DF,['y'])
6868
p = P.computeCurl(m,['u','v','w']) # defined on centers
69-
T.testA([p], 6)
69+
test.testA([p], 6)

Cassiopee/Post/test/computeDiv_t1.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import Converter as C
33
import Post as P
44
import Generator as G
5-
import KCore.test as T
5+
import KCore.test as test
66

77
def Fx(x,y,z): return 2*x+x*y
88
def Fy(x,y,z): return 4.*y
@@ -15,7 +15,7 @@ def Fz(x,y,z): return x*y+z*z
1515
m = C.initVars(m, 'veloY', Fy, ['x','y','z'])
1616
m = C.initVars(m, 'veloZ', Fz, ['x','y','z'])
1717
p = P.computeDiv(m, ['veloX','veloY','veloZ']) # p is defined on centers
18-
T.testA([p], 1)
18+
test.testA([p], 1)
1919

2020
# cas 2D structure
2121
ni = 10; nj = 20; nk = 1
@@ -24,7 +24,7 @@ def Fz(x,y,z): return x*y+z*z
2424
m2 = C.initVars(m2, 'veloY', Fy, ['x','y','z'])
2525
m2 = C.initVars(m2, 'veloZ', Fz, ['x','y','z'])
2626
p2 = P.computeDiv(m2, ['veloX','veloY','veloZ']) # p is defined on centers
27-
T.testA([p2], 2)
27+
test.testA([p2], 2)
2828

2929
# cas 2D structure (xz)
3030
ni = 10; nj = 1; nk = 20
@@ -33,7 +33,7 @@ def Fz(x,y,z): return x*y+z*z
3333
m21 = C.initVars(m21, 'veloY', Fy, ['x','y','z'])
3434
m21 = C.initVars(m21, 'veloZ', Fz, ['x','y','z'])
3535
p21 = P.computeDiv(m21, ['veloX','veloY','veloZ']) # p is defined on centers
36-
T.testA([p21], 21)
36+
test.testA([p21], 21)
3737

3838
# cas 2D structure (yz)
3939
ni = 1; nj = 10; nk = 20
@@ -42,8 +42,8 @@ def Fz(x,y,z): return x*y+z*z
4242
m22 = C.initVars(m22, 'veloY', Fy, ['x','y','z'])
4343
m22 = C.initVars(m22, 'veloZ', Fz, ['x','y','z'])
4444
p22 = P.computeDiv(m22, ['veloX','veloY','veloZ']) # p is defined on centers
45-
T.testA([p22], 22)
45+
test.testA([p22], 22)
4646

4747
# test sur une liste
4848
P = P.computeDiv([m,m2], ['veloX','veloY','veloZ']) # p is defined on centers
49-
T.testA(P, 3)
49+
test.testA(P, 3)

0 commit comments

Comments
 (0)