cape.pylavacntl
: LAVA control module¶
This module provides tools to quickly setup basic or complex LAVA run matrices and serve as an executive for pre-processing, running, post-processing, and managing the solutions. A collection of cases combined into a run matrix can be loaded using the following commands.
>>> import cape.pylava >>> cntl = cape.pylava.cntl.Cntl("pyLava.json") >>> cntl <cape.pylava.Cntl(nCase=907)> >>> cntl.x.GetFullFolderNames(0) 'poweroff/m1.5a0.0b0.0'
An instance of this cape.pylava.cntl.Cntl
class has many
attributes, which include the run matrix (cntl.x
), the options
interface (cntl.opts
), and optionally the data book
(cntl.DataBook
), the appropriate input files (such as
cntl.Namelist
), and possibly others.
Attribute
Class
cntl.x
cape.runmatrix.RunMatrix
cntl.opts
cntl.DataBook
cape.pylava.databook.DataBook
cntl.Namelist
cape.pylava.namelist.Namelist
Finally, the Cntl
class is subclassed from the
cape.cntl.Cntl
class, so any methods available to the CAPE
class are also available here.
- class cape.pylava.cntl.Cntl(fname=None)¶
Class for handling global options and setup for LAVA
This class is intended to handle all settings used to describe a group of LAVA cases. For situations where it is not sufficiently customized, it can be used partially, e.g., to set up a Mach/alpha sweep for each single control variable setting.
The settings are read from a yaml or json file.
- Call:
>>> cntl = cape.pylava.Cntl(fname="pyLava.yaml")
- Inputs:
- fname:
str
Name of cape.pylava input file
- fname:
- Outputs:
- cntl:
cape.pylava.cntl.Cntl
Instance of the cape.pylava control class
- cntl:
- Data members:
- Versions:
2024-04-25
@sneuhoff
: v1.0
- PrepareCase(i: int)¶
Prepare case for running if necessary
- Call:
>>> cntl.PrepareCase(i)
- Inputs:
- cntl:
cape.pylava.cntl.Cntl
Instance of control class containing relevant parameters
- i:
int
Index of case to analyze
- cntl:
- Versions:
2024-06-12
@sneuhoff
: v1.0