fix output error in output geom file.
This commit is contained in:
parent
5cae5c4f0b
commit
b4768013a0
|
@ -51,13 +51,13 @@ for name in filenames:
|
|||
table = damask.ASCIItable(name = name,
|
||||
buffered = False, labeled = False)
|
||||
except: continue
|
||||
table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name else ''))
|
||||
table.croak(damask.util.emph(scriptName)+(': '+name if name else ''))
|
||||
|
||||
# --- interpret header ----------------------------------------------------------------------------
|
||||
|
||||
table.head_read()
|
||||
info,extra_header = table.head_getGeom()
|
||||
|
||||
|
||||
table.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']))),
|
||||
|
@ -112,13 +112,13 @@ for name in filenames:
|
|||
"microstructures\t{microstructures}".format(microstructures=newInfo['microstructures']),
|
||||
])
|
||||
table.head_write()
|
||||
|
||||
|
||||
# --- write microstructure information ------------------------------------------------------------
|
||||
|
||||
formatwidth = int(math.floor(math.log10(microstructure.max())+1))
|
||||
table.data = microstructure.reshape((info['grid'][0],info['grid'][1]*info['grid'][2]),order='F').transpose()
|
||||
table.data = substituted.reshape((info['grid'][0],info['grid'][1]*info['grid'][2]),order='F').transpose()
|
||||
table.data_writeArray('%%%ii'%(formatwidth),delimiter = ' ')
|
||||
|
||||
|
||||
# --- output finalization --------------------------------------------------------------------------
|
||||
|
||||
table.close() # close ASCII table
|
||||
|
|
Loading…
Reference in New Issue