use datatype double instead of float for ouputs
This commit is contained in:
parent
c934a6f358
commit
43647fc5e6
|
@ -100,7 +100,7 @@ for geomtype in ['nodebased','ipbased']:
|
||||||
if not findTag(vtkfilename,dataSetTag[geomtype]): # check if data set is already present...
|
if not findTag(vtkfilename,dataSetTag[geomtype]): # check if data set is already present...
|
||||||
vtkfile.write(dataSetTag[geomtype] + ' %i'%len(myData[0])) # ... if not, write keyword
|
vtkfile.write(dataSetTag[geomtype] + ' %i'%len(myData[0])) # ... if not, write keyword
|
||||||
for idx,label in enumerate(table.labels): # write data
|
for idx,label in enumerate(table.labels): # write data
|
||||||
vtkfile.write('\nSCALARS '+label+' float 1\nLOOKUP_TABLE default\n') # all scalar data
|
vtkfile.write('\nSCALARS '+label+' double 1\nLOOKUP_TABLE default\n') # all scalar data
|
||||||
vtkfile.write('\n'.join(map(str,myData[idx])))
|
vtkfile.write('\n'.join(map(str,myData[idx])))
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -145,7 +145,7 @@ for incCount,position in enumerate(locations): # walk through locations
|
||||||
|
|
||||||
with open(outFilename,'a') as myfile:
|
with open(outFilename,'a') as myfile:
|
||||||
myfile.write("POINT_DATA %i\n"%{'nodebased':Nnodes,'ipbased':Ncellnodes}[geomtype])
|
myfile.write("POINT_DATA %i\n"%{'nodebased':Nnodes,'ipbased':Ncellnodes}[geomtype])
|
||||||
myfile.write("VECTORS displacement float\n")
|
myfile.write("VECTORS displacement double\n")
|
||||||
coordinates = {'nodebased':node_displacement,'ipbased':cellnode_displacement}[geomtype]
|
coordinates = {'nodebased':node_displacement,'ipbased':cellnode_displacement}[geomtype]
|
||||||
for n in range({'nodebased':Nnodes,'ipbased':Ncellnodes}[geomtype]):
|
for n in range({'nodebased':Nnodes,'ipbased':Ncellnodes}[geomtype]):
|
||||||
myfile.write("%.8e %.8e %.8e\n"%(coordinates[n][0],coordinates[n][1],coordinates[n][2]))
|
myfile.write("%.8e %.8e %.8e\n"%(coordinates[n][0],coordinates[n][1],coordinates[n][2]))
|
||||||
|
|
Loading…
Reference in New Issue