Home | Trees | Indices | Help |
---|
|
1 """ 2 Application class that implements pyFoamRunner 3 """ 4 5 from PyFoamApplication import PyFoamApplication 6 7 from PyFoam.Execution.AnalyzedRunner import AnalyzedRunner 8 from PyFoam.LogAnalysis.BoundingLogAnalyzer import BoundingLogAnalyzer 9 from PyFoam.RunDictionary.SolutionDirectory import SolutionDirectory 10 11 from PyFoam.Execution.ParallelExecution import LAMMachine 124715 description=""" 16 Runs an OpenFoam solver. Needs the usual 3 arguments (<solver> 17 <directory> <case>) and passes them on (plus additional arguments). 18 Output is sent to stdout and a logfile inside the case directory 19 (PyFoamSolver.logfile) The Directory PyFoamSolver.analyzed contains 20 this information: a) Residuals and other information of the linear 21 solvers b Execution time c) continuity information d) bounding of 22 variables 23 """ 24 25 PyFoamApplication.__init__(self,description=description)2628 self.parser.add_option("--procnr",type="int",dest="procnr",default=None,help="The number of processors the run should be started on") 29 self.parser.add_option("--machinefile",dest="machinefile",default=None,help="The machinefile that specifies the parallel machine") 30 self.parser.add_option("--clear-case",action="store_true",default=False,dest="clearCase",help="Clear all timesteps except for the first before running")3133 if self.opts.clearCase: 34 print "Clearing out old timesteps ...." 35 36 cName=self.parser.getArgs()[2] 37 sol=SolutionDirectory(cName) 38 sol.clearResults() 39 40 lam=None 41 if self.opts.procnr!=None or self.opts.machinefile!=None: 42 lam=LAMMachine(machines=self.opts.machinefile,nr=self.opts.procnr) 43 44 run=AnalyzedRunner(BoundingLogAnalyzer(),argv=self.parser.getArgs(),server=True,lam=lam) 45 46 run.start()
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0alpha3 on Thu Mar 29 18:31:36 2007 | http://epydoc.sourceforge.net |