Package PyFoam :: Package Basics :: Module Helpers
[hide private]
[frames] | no frames]

Source Code for Module PyFoam.Basics.Helpers

 1  """Utility functions""" 
 2   
 3  from os import listdir 
 4   
5 -def getLinearNames(d):
6 """get a list of all the files with information about the 7 residuals of the linear solver (only the ones without _2 etc 8 9 d - the directory""" 10 names=[] 11 for f in listdir(d): 12 tmp=f.split("_") 13 if len(tmp)>1: 14 if tmp[0]=="linear": 15 name=tmp[1] 16 if names.count(name)==0: 17 names.append(name) 18 19 return names
20