cape.pyover.report
: Automated report interface¶
The pyOver module for generating automated results reports using
PDFLaTeX provides a single class pyOver.report.Report
, which is
based off the CAPE version cape.cfdx.report.Report
. The
cape.cfdx.report.Report
class is a sort of dual-purpose object
that contains a file interface using cape.tex.Tex
combined with
a capability to create figures for each case or sweep of cases mostly
based on cape.cfdx.dataBook
.
An automated report is a multi-page PDF generated using PDFLaTeX. Usually, each CFD case has one or more pages dedicated to results for that case. The user defines a list of figures, each with its own list of subfigures, and these are generated for each case in the run matrix (subject to any command-line constraints the user may specify). Types of subfigures include
Table of the values of the input variables for this case
Table of force and moment values and statistics
Iterative histories of forces or moments (one or more coefficients)
Iterative histories of residuals
Images using a Tecplot layout
Many more
In addition, the user may also define “sweeps,” which analyze groups of cases defined by user-specified constraints. For example, a sweep may be used to plot results as a function of Mach number for sets of cases having matching angle of attack and sideslip angle. When using a sweep, the report contains one or more pages for each sweep (rather than one or more pages for each case).
Reports are created using system commands of the following format.
The class has an immense number of methods, which can be somewhat
grouped into bookkeeping methods and plotting methods. The main
user-facing methods are cape.cfdx.report.Report.UpdateCases()
and
cape.cfdx.report.Report.UpdateSweep()
. Each type of subfigure has
its own method, for example
cape.cfdx.report.Report.SubfigPlotCoeff()
for "PlotCoeff"
or
cape.cfdx.report.Report.SubfigPlotL2()
for "PlotL2"
.
- See also:
- class cape.pyover.report.Report(cntl, rep)¶
Interface for automated report generation
- Call:
>>> R = pyOver.report.Report(oflow, rep)
- Inputs:
- oflow:
cape.pyover.cntl.Cntl
Master Cart3D settings interface
- rep:
str
Name of report to update
- oflow:
- Outputs:
- R:
pyOver.report.Report
Automated report interface
- R:
- Versions:
2016-02-04
@ddalle
: First version
- LinkVizFiles(sfig=None, i=None)¶
Create links to appropriate visualization files
Specifically,
Components.i.plt
andcutPlanes.plt
orComponents.i.dat
andcutPlanes.dat
are created.- Call:
>>> R.LinkVizFiles()
- Inputs:
- R:
pyOver.report.Report
Automated report interface
- R:
- See Also:
pyCart.case.LinkPLT()
- Versions:
2016-02-06
@ddalle
: First version
- ReadCaseFM(comp)¶
Read iterative history for a component
This function needs to be customized for each solver
- Call:
>>> FM = R.ReadCaseFM(comp)
- Inputs:
- R:
pyOver.report.Report
Automated report interface
- comp:
str
Name of component to read
- R:
- Outputs:
- FM:
None
orcape.cfdx.dataBook.CaseFM
derivative Case iterative force & moment history for one component
- FM:
- Versions:
2016-02-04
@ddalle
: First version2017-03-27
@ddalle
: Added CompID option
- ReadCaseResid(sfig=None)¶
Read iterative residual history for a component
This function needs to be customized for each solver
- Call:
>>> hist = R.ReadCaseResid()
- Inputs:
- R:
pyOver.report.Report
Automated report interface
- R:
- Outputs:
- hist:
None
orcape.cfdx.dataBook.CaseResid
derivative Case iterative residual history for one case
- hist:
- Versions:
2016-02-04
@ddalle
: First version
- ReadTecscript(fsrc)¶
Read a Tecplot script interface
- Call:
>>> R.ReadTecscript(fsrc)
- Inputs:
- R:
pyOver.report.Report
Automated report interface
- fscr:
str
Name of file to read
- R:
- Versions:
2016-10-25
@ddalle
: First version
- SubfigSwitch(sfig, i, lines, q)¶
Switch function to find the correct subfigure function
This function may need to be defined for each CFD solver
- Call:
>>> lines = R.SubfigSwitch(sfig, i, lines, q)
- Inputs:
- R:
pyOver.report.Report
Automated report interface
- sfig:
str
Name of subfigure to update
- i:
int
Case index
- lines:
list
[str
] List of lines already in LaTeX file
- q:
True
|False
Whether or not to redraw images
- R:
- Outputs:
- lines:
list
[str
] Updated list of lines for LaTeX file
- lines:
- Versions:
2015-05-29
@ddalle
: First version2016-10-25
@ddalle
: UpdateCaseSubfigs -> SubfigSwitch