polishing and now explicitly closing input table.
This commit is contained in:
parent
6e2ca7d595
commit
feae2164fc
|
@ -83,9 +83,9 @@ damask.util.croak('{}: {} points and {} cells...'.format(options.vtk,Npoints,Nce
|
||||||
if filenames == []: filenames = [None]
|
if filenames == []: filenames = [None]
|
||||||
|
|
||||||
for name in filenames:
|
for name in filenames:
|
||||||
try:
|
try: table = damask.ASCIItable(name = name,
|
||||||
table = damask.ASCIItable(name = name,
|
buffered = False,
|
||||||
buffered = False, readonly = True)
|
readonly = True)
|
||||||
except: continue
|
except: continue
|
||||||
damask.util.report(scriptName, name)
|
damask.util.report(scriptName, name)
|
||||||
|
|
||||||
|
@ -133,6 +133,8 @@ for name in filenames:
|
||||||
elif datatype == 'vector': VTKarray[me].InsertNextTuple3(*map(float,theData))
|
elif datatype == 'vector': VTKarray[me].InsertNextTuple3(*map(float,theData))
|
||||||
elif datatype == 'scalar': VTKarray[me].InsertNextValue(float(theData[0]))
|
elif datatype == 'scalar': VTKarray[me].InsertNextValue(float(theData[0]))
|
||||||
|
|
||||||
|
table.input_close() # close input ASCII table
|
||||||
|
|
||||||
# ------------------------------------------ add data ---------------------------------------
|
# ------------------------------------------ add data ---------------------------------------
|
||||||
|
|
||||||
for datatype,labels in active.items(): # loop over scalar,color
|
for datatype,labels in active.items(): # loop over scalar,color
|
||||||
|
|
Loading…
Reference in New Issue