cape.pyfun.report
: Automated report interface¶
The pyFun module for generating automated results reports using
PDFLaTeX provides a single class 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 (for 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 usually 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.pyfun.report.Report(cntl, rep)¶
Interface for automated report generation
- Call:
>>> R = pyFun.report.Report(fun3d, rep)
- Inputs:
- fun3d:
cape.pyfun.cntl.Cntl
Master Cart3D settings interface
- rep:
str
Name of report to update
- fun3d:
- Outputs:
- R:
Report
Automated report interface
- R:
- Versions:
2015-03-07
@ddalle
: Started2015-03-10
@ddalle
: First version
- LinkVizFiles(sfig=None, i=None)¶
Create links to appropriate visualization files
- Call:
>>> R.LinkVizFiles(sfig, i)
- Inputs:
- R:
Report
Automated report interface
- sfig:
str
Name of the subfigure
- i:
int
Case index
- R:
- See Also:
- 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:
cape.cfdx.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:
2015-10-16
@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(sfig=None)
- Inputs:
- R:
cape.cfdx.report.Report
Automated report interface
- sfig:
str
|None
Name of subfigure to process
- R:
- Outputs:
- hist:
None
orcape.cfdx.dataBook.CaseResid
derivative Case iterative residual history for one case
- hist:
- Versions:
2015-10-16
@ddalle
: First version2016-02-04
@ddalle
: Added argument
- ReadTecscript(fsrc)¶
Read a Tecplot script interface
- Call:
>>> R.ReadTecscript(fsrc)
- Inputs:
- R:
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)
- Inputs:
- R:
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 regenerate subfigure
- R:
- Outputs:
- lines:
list
[str
] Updated list of lines for LaTeX file
- lines:
- Versions:
2015-05-29
@ddalle
: First version- 2016-10-25
@ddalle
: UpdateCaseSubfigs -> SubfigSwitch
- 2016-10-25