-
Notifications
You must be signed in to change notification settings - Fork 0
/
mesher.py
45 lines (43 loc) · 862 Bytes
/
mesher.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import numpy as np
f = open('mesher.txt', 'a')
lscale = np.linspace(5, 72.95, 13)
rscale = np.linspace(5, 72.95, 25)
print len(rscale)
print rscale
lcount = 1
rcount = 1
for i in range(77):
print i
if i < 23:
print('first loop', i)
for j in range(184):
f.write(str(5))
f.write('\n')
elif 21 < i < 34:
print('second loop', i)
for j in range(5):
f.write(str(lscale[lcount]))
f.write('\n')
lcount += 1
for j in range(179):
f.write(str(5))
f.write('\n')
elif 33 < i < 54:
print('third loop', i)
for j in range(5):
f.write(str(72.95))
f.write('\n')
for j in range(179):
f.write(str(5))
f.write('\n')
else:
print('fourth loop', i)
print rscale[rcount]
for j in range(5):
f.write(str(72.95))
f.write('\n')
for j in range(179):
f.write(str(rscale[rcount]))
f.write('\n')
rcount += 1
f.close()