cape.pycart.preSpecCntl: Cart3D preSpec.c3d.cntl Interface¶
This is a module built off of the cape.filecntl.FileCntl class
customized for manipulating preSpec.c3d.cntl files. Such files are
split into section by lines of the format
$__Prespecified_Adaptation_Regions
and this module is designed to recognize such sections, although this is the only section. The main feature of this module is to add or remove additional refinement boxes and additional XLev surface refinements.
- class cape.pycart.preSpecCntl.PreSpecCntl(fname='preSpec.c3d.cntl')¶
File control class for
preSpec.c3d.cntlfilesThis class is derived from the
pyCart.fileCntl.FileCntlclass, so all methods applicable to that class can also be used for instances of this class.- Call:
>>> preSpec = pyCart.PreSpecCntl() >>> preSpec = pyCart.PreSpecCntl(fname)
- Inputs:
- fname:
str Name of CNTL file to read, defaults to
'preSpec.c3d.cntl'
- fname:
- Versions:
2014-06-16
@ddalle: First version
- AddBBox(n, xlim)¶
Add an additional bounding box to the
cubesinput control file- Call:
>>> preSpec.AddBBox(n, xlim)
- Inputs:
- preSpec:
pyCart.preSpecCntl.PreSpecCntl Instance of the
preSpec.c3d.cntlinterface- n:
int Number of refinements to use in the box
- xlim:
numpy.ndarrayorlist[float] List of xmin, xmax, ymin, ymax, zmin, zmax
- preSpec:
- Effects:
Adds a bounding box line to the existing boxes
- Versions:
2014-06-16
@ddalle: First version
- AddXLev(n, compID)¶
Add a refinement level on a component or list of components
- Call:
>>> preSpec.AddXLev(n, compID)
- Inputs:
- preSpec:
pyCart.preSpecCntl.PreSpecCntl Instance of the
preSpec.c3d.cntlinterface- n:
int Number of refinements to use in the box
- compID:
int|list[int] List of component IDs
- preSpec:
- Versions:
2014-10-08
@ddalle: v1.02023-03-07
@ddalle: v1.1; useRangeString()2023-03-07
@ddalle: v1.2; just write comps on new lines
- ClearBBox()¶
Delete all existing bounding boxes
- Call:
>>> preSpec.ClearBBox()
- Inputs:
- preSpec:
pyCart.preSpecCntl.PreSpecCntl Instance of the
preSpec.c3d.cntlinterface
- preSpec:
- Versions:
2014-06-16
@ddalle: First version
- ClearXLev()¶
Delete all existing XLev specifications
- Call:
>>> preSpec.ClearXLev()
- Inputs:
- preSpec:
pyCart.preSpecCntl.PreSpecCntl Instance of the
preSpec.c3d.cntlinterface
- preSpec:
- Versions:
2014-10-08
@ddalle: First version