fixed nasty ABS that caused wrong packing for 1,2,1,1,1,... and the like

This commit is contained in:
Philip Eisenlohr 2016-12-25 12:39:49 -05:00
parent f6513842e0
commit 49eb7aa1be
1 changed files with 7 additions and 7 deletions

View File

@ -36,11 +36,11 @@ for name in filenames:
table.head_read()
info,extra_header = table.head_getGeom()
damask.util.croak(['grid a b c: %s'%(' x '.join(map(str,info['grid']))),
'size x y z: %s'%(' x '.join(map(str,info['size']))),
'origin x y z: %s'%(' : '.join(map(str,info['origin']))),
'homogenization: %i'%info['homogenization'],
'microstructures: %i'%info['microstructures'],
damask.util.croak(['grid a b c: {}'.format(' x '.join(map(str,info['grid']))),
'size x y z: {}'.format(' x '.join(map(str,info['size']))),
'origin x y z: {}'.format(' : '.join(map(str,info['origin']))),
'homogenization: {}'.format(info['homogenization']),
'microstructures: {}'.format(info['microstructures']),
])
errors = []
@ -81,7 +81,7 @@ for name in filenames:
else: items = map(int,items)
for current in items:
if abs(current - former) == 1 and abs(start-former) == reps - 1:
if abs(current - former) == 1 and (start - current) == reps*(former - current):
compressType = 'to'
reps += 1
elif current == former and start == former: