10
0
mirror of https://gitlab.com/scemama/irpf90.git synced 2024-11-09 07:33:43 +01:00

Improved instability factor print

This commit is contained in:
Anthony Scemama 2015-01-31 10:43:46 +01:00
parent 564c4f4e62
commit c0db2be01d

View File

@ -96,7 +96,7 @@ def do_print(var):
print >>file, ".SH Instability factor" print >>file, ".SH Instability factor"
fo = len(var.children) fo = len(var.children)
fi = len(var.parents) fi = len(var.parents)
print >>file, 100.* (fi / (fi+fo+.000001) ), "%" print >>file, "%5.1f %%"%(100.* (fi / (fi+fo+.000001) ))
print >>file, ".br" print >>file, ".br"
file.close() file.close()
@ -141,7 +141,7 @@ def do_print_subroutines(sub):
print >>file, ".SH Instability factor" print >>file, ".SH Instability factor"
fo = len(sub.needs)+len(sub.calls)+len(sub.touches) fo = len(sub.needs)+len(sub.calls)+len(sub.touches)
fi = len(sub.called_by) fi = len(sub.called_by)
print >>file, 100.* (fi / (fi+fo+.000001) ), "%" print >>file, "%5.1f %%"%(100.* (fi / (fi+fo+.000001) ))
print >>file, ".br" print >>file, ".br"
file.close() file.close()