now understands packed geom structure
This commit is contained in:
parent
76171eec15
commit
5f347648e1
|
@ -142,9 +142,15 @@ for file in files:
|
|||
|
||||
i = 0
|
||||
for line in content:
|
||||
d = map(int,line.split())
|
||||
s = len(d)
|
||||
microstructure[i:i+s] = d # read microstructure indices
|
||||
items = line.split()
|
||||
if len(items) > 2:
|
||||
if items[1].lower() == 'of': items = [int(items[2])]*int(items[0])
|
||||
elif items[1].lower() == 'to': items = xrange(int(items[0]),1+int(items[2]))
|
||||
else: items = map(int,items)
|
||||
else: items = map(int,items)
|
||||
|
||||
s = len(items)
|
||||
microstructure[i:i+s] = items # read microstructure indices
|
||||
i += s
|
||||
|
||||
for i in xrange(N):
|
||||
|
|
Loading…
Reference in New Issue