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

Source Code for Module PyFoam.Basics.Helpers

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