Exemplo n.º 1
0
description="""\
Plots the residuals generated by the tools
pyFoamStandardLogAnalyzer.py, pyFoamSteadyRunner.py or
pyFoamRunner.py.  The argument should be the directory with the result
files (usually PyFoamSolve.analyzed)
"""

from PyFoam.Basics.FoamOptionParser import FoamOptionParser

parse=FoamOptionParser(description=description,usage="%prog [options] <datadir>",interspersed=True)

try:
    import PyFoam.ThirdParty.Gnuplot as Gnuplot
except ImportError,e:
    parse.error("Gnuplot module missing. Can't plot")
    
parse.parse(nr=1)

import sys,os
from os import path

from PyFoam.Basics.Helpers import getLinearNames
    
data=parse.getArgs()[0]
dDir=path.basename(data)

names=getLinearNames(data)

if sys.stdout.isatty():
    g=Gnuplot.Gnuplot(persist=1)
Exemplo n.º 2
0
description="""\
Plots the residuals generated by the tools
pyFoamStandardLogAnalyzer.py, pyFoamSteadyRunner.py or
pyFoamRunner.py.  The argument should be the directory with the result
files (usually PyFoamSolve.analyzed)
"""

from PyFoam.Basics.FoamOptionParser import FoamOptionParser

parse=FoamOptionParser(description=description,usage="%prog [options] <datadir>",interspersed=True)

try:
    import PyFoam.ThirdParty.Gnuplot as Gnuplot
except ImportError,e:
    parse.error("Gnuplot module missing. Can't plot")
    
parse.parse(nr=1)

import sys,os
from os import path

from PyFoam.Basics.Helpers import getLinearNames
    
data=parse.getArgs()[0]
dDir=path.basename(data)

names=getLinearNames(data)

if sys.stdout.isatty():
    g=Gnuplot.Gnuplot(persist=1)