cape.pyus.options.configopts: US3D configuration options

This module provides options for defining some aspects of the surface configuration for a US3D run. It can point to a surface configuration file such as Config.xml` or ``Config.json.

In addition to the options in cape.cfdx.options.configopts.ConfigOpts, this module provides the options Inputs and PostScrFile.

See Also:
class cape.pyus.options.configopts.ConfigInputOpts(*args, **kw)

Bases: OptionsDict

class cape.pyus.options.configopts.ConfigOpts(*args, **kw)

Bases: ConfigOpts

get_ConfigInput(comp: str, **kw)

Return the input for a particular component

Call:
>>> inp = opts.get_ConfigInput(comp, **kw)
Inputs:
opts: cape.cfdx.options.Options

Options interface

comp: str

Name of component

Outputs:
inp: int | list[int]

List of BCs in this component

Versions:
  • 2015-10-20 @ddalle: v1.0

  • 2023-03-28 @ddalle: v2.0; use cape.optdict

get_PostScrFile(j=None, i=None, **kw)

Get name of post.scr file template

Call:
>>> PostScrFile = opts.get_PostScrFile(j=None, i=None, **kw)
Inputs:
opts: ConfigOpts

options interface

j: {None} | int

Phase index; use None to just return v

i: {None} | int | np.ndarray

opts.x index(es) to use with @expr, @map, etc.

vdef: {None} | object

Manual default

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

ring: {opts._optring[key]} | True | False

Override option to loop through phase inputs

listdepth: {0} | int > 0

Depth of list to treat as a scalar

x: {None} | dict

Ref conditions to use with @expr, @map, etc.; often a run matrix; used in combination with i

sample: {True} | False

Apply j, i, and other settings recursively if output is a list or dict

Outputs:
PostScrFile: {None} | str

name of post.scr file template

set_PostScrFile(v, j=None, mode=None)

Get name of post.scr file template

Call:
>>> opts.set_PostScrFile(PostScrFile, j=None, i=None, **kw)
Inputs:
opts: ConfigOpts

options interface

PostScrFile: {None} | str

name of post.scr file template

j: {None} | int

Phase index; use None to just return v

mode: {None} | 0 | 1 | 2 | 3

Warning mode code

0:

no checks

1:

validate silently

2:

validate and show warnings

3:

raise an exception if invalid

listdepth: {0} | int > 0

Depth of list to treat as a scalar