output vector and scalar data only if atom-array

is nonempty - for vtk integrity
This commit is contained in:
Stefan A
2012-05-15 09:24:23 +02:00
parent 0970fb17e2
commit c65ba3ee02

View File

@ -332,6 +332,11 @@ def particleGran(file,atoms,names,n_values):
print >>f,1,i
print >>f,"POINT_DATA",len(atoms)
if len(atoms) == 0:
print >> f
f.close()
return
# print VECTORS
for key in vectors.keys():
@ -369,7 +374,6 @@ def particleGran(file,atoms,names,n_values):
print >>f, atom[scalars[key]]
print >>f
f.close()
def findScalarsAndVectors(names):