now understands packed geom structure

This commit is contained in:
Philip Eisenlohr 2013-06-27 15:34:37 +00:00
parent 76171eec15
commit 5f347648e1
1 changed files with 9 additions and 3 deletions

View File

@ -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):