cape.pyfun.options.runControl.RunControl: Run control options

Options interface for aspects of running a case of FUN3D. The settings are read from the "RunControl" of a JSON file, and the contents of this section are written to case.json within each run folder.

The methods of cape.cfdx.options.runControl.RunControl are also present. These control options such as whether to submit as a PBS job, whether or not to use MPI, etc.

This contains options that determine how long the solver is ran (primarily via the "PhaseSequence" and "PhaseIters" options), what basic mode it is run in (such as a submitted or local job or serial or MPI job), and options for command-line options to the FUN3D binaries. There is also an "Archive" section that can be used for copying files and cleaning up after one or more cases have been completed.

This module primarily provides a class pyFun.options.RunControl. Many of the options that are common to all solvers are inherited from cape.cfdx.options.runControl.RunControl. This class also has an interface for environment variables and ulimit parameters.

In particular, all of the commands available to the classes listed below are also available to pyFun.options.runControl.RunControl.

Classes:
See Also:
class cape.pyfun.options.runControl.RunControl(fname=None, **kw)

Dictionary-based interface for automated reports

Call:
>>> opts = RunControl(**kw)
Versions:
  • 2015-09-28 @ddalle: Subclassed to CAPE

get_AdaptPhase(i=None)

Determine whether or not a phase is adaptive

Call:
>>> qa = opts.get_AdaptPhase(i=None)
Inputs:
opts: pyFun.options.Options

Options interface

i: int | None

Phase number

Outputs:
qa: bool | list (bool)

Whether or not phase ends with an adaptation

Versions:
  • 2015-12-30 @ddalle: First version

get_AdaptationNumber(i)

Get the adaptation number for a given phase

Call:
>>> j = opts.get_AdaptationNumber(i)
Inputs:
opts: pyFun.options.Options

Options interface

i: int

Phase number

Outputs:
j: int | None

Number of adaptation prior to phase i

Versions:
  • 2015-12-31 @ddalle: First version

get_Adaptive(i=None)

Return whether or not to run adaptively

Call:
>>> ac = opts.get_Adaptive(i=None)
Inputs:
opts: pyFun.options.Options

Options interface

i: int | None

Phase number

Outputs:
ac: bool | list (bool)

Whether or not to use aero.csh

Versions:
  • 2015-12-30 @ddalle: First version

get_Dual(i=None)

Return whether or not to run in dual-mode with an adjoint

This applies to the whole case, not to individual phases

Call:
>>> d = opts.get_Dual(i=None)
Inputs:
opts: pyFun.options.Options

Options interface

i: int | None

Phase number

Outputs:
d: bool | list (bool)

Whether or not to run the case with dual mode

Versions:
  • 2015-12-30 @ddalle: First version

get_DualPhase(i=None)

Determine whether or not a phase is run with an adjoint

Call:
>>> qd = opts.get_DualPhase(i=None)
Inputs:
opts: pyFun.options.Options

Options interface

i: int | None

Phase number

Outputs:
qd: bool | list (bool)

Whether or not phase ends with an adjoint computation

Versions:
  • 2015-12-30 @ddalle: First version

get_KeepRestarts(i=None)

Return whether or not to keep restart files

Call:
>>> qr = opts.get_KeepRestarts(i=None)
Inputs:
opts: pyFun.options.Options

Options interface

i: int | None

Phase number

Outputs:
qr: bool

Whether or not to copy flow solution files

Versions:
  • 2015-12-31 @ddalle: First version

get_WarmStartProject(i=None)

Get name of WarmStart source project

Call:
>>> project = opts.get_WarmStartProject(i=None)
Inputs:
opts: pyFun.options.Options

Options interface

i: int | None

Phase number

Outputs:
project: None | str

Name of non-default project for WarmStart source

Versions:
  • 2023-03-15 @ddalle: First version

get_nIterAdjoint(j=None)

Get number of iterations for dual, the adjoint solver

Call:
>>> n = opts.get_nIterAdjoint(j=None)
Inputs:
opts: pyFun.options.Options

Options interface

j: int | None

Phase number

Outputs:
n: int

Number of iterations for dual

Versions:
  • 2016-04-28 @ddalle: First version

set_AdaptPhase(qa=True, i=None)

Set whether or not a phase is adaptive

Call:
>>> opts.set_AdaptPhase(qa, i=None)
Inputs:
opts: pyFun.options.Options

Options interface

qa: bool | list (bool)

Whether or not phase ends with an adaptation

i: int | None

Phase number

Versions:
  • 2015-12-30 @ddalle: First version

set_Adaptive(ac=False, i=None)

Return whether or not to run adaptively

Call:
>>> opts.set_Adaptive(ac, i=None)
Inputs:
opts: pyFun.options.Options

Options interface

ac: bool | list (bool)

Whether or not to use aero.csh

i: int | None

Phase number

Versions:
  • 2015-12-30 @ddalle: First version

set_Dual(d=False, i=None)

Set whether or not to run in dual-mode with an adjoint

This applies to the whole case, not to individual phases

Call:
>>> opts.get_Dual(d=False, i=None)
Inputs:
opts: pyFun.options.Options

Options interface

d: bool | list (bool)

Whether or not to run the case with dual mode

i: int | None

Phase number

Versions:
  • 2015-12-30 @ddalle: First version

set_DualPhase(qa=True, i=None)

Set whether or not a phase is run with an adjoint

Call:
>>> opts.set_DualPhase(qd, i=None)
Inputs:
opts: pyFun.options.Options

Options interface

qd: bool | list (bool)

Whether or not phase ends with an adjoint computation

i: int | None

Phase number

Versions:
  • 2015-12-30 @ddalle: First version

set_KeepRestarts(qr=False, i=None)

Set whether or not to keep restart files

Call:
>>> opts.get_KeepRestarts(qr, i=None)
Inputs:
opts: pyFun.options.Options

Options interface

qr: bool

Whether or not to copy flow solution files

i: int | None

Phase number

Versions:
  • 2015-12-31 @ddalle: First version

set_WarmStartProject(project=None, i=None)

Set name of WarmStart source project

Call:
>>> opts.set_WarmStartProject(project=None, i=None)
Inputs:
opts: pyFun.options.Options

Options interface

i: int | None

Phase number

project: None | str

Name of non-default project for WarmStart source

Versions:
  • 2023-03-15 @ddalle: First version

set_nIterAdjoint(n=200, j=None)

Set number of iterations for dual, the adjoint solver

Call:
>>> n = opts.get_nIterAdjoint(n=200, j=None)
Inputs:
opts: pyFun.options.Options

Options interface

n: int

Number of iterations for dual

j: int | None

Phase number

Versions:
  • 2016-04-28 @ddalle: First version

class cape.pyfun.options.runControl.dual

Class for dual command-line inputs

get_dual_adapt(j=None)

Get command-line setting for adapting when running dual

Call:
>>> adapt = opts.get_dual_adapt(j=None)
Inputs:
opts: pyFun.options.Options

Options interface

j: int | None

Phase number

Outputs:
adapt: {True} | False

Whether or not to adapt after running dual

Versions:
  • 2016-04-28 @ddalle: First version

get_dual_outer_loop_krylov(j=None)

Get --outer_loop_krylov setting for dual

Call:
>>> f = opts.get_dual_outer_loop_krylov(j=None)
Inputs:
opts: pyFun.options.Options

Options interface

j: int | None

Phase number

Outputs:
f: {True} | False

Whether or not to use this flag

Versions:
  • 2016-04-28 @ddalle: First version

get_dual_rad(j=None)

Get command-line setting for residual adjoint dot product

Call:
>>> rad = opts.get_dual_rad(j=None)
Inputs:
opts: pyFun.options.Options

Options interface

j: int | None

Phase number

Outputs:
rad: {True} | False

Whether or not to use residual adjoint dot product

Versions:
  • 2016-04-28 @ddalle: First version

set_dual_adapt(adapt=True, j=None)

Set command-line setting for adapting when running dual

Call:
>>> opts.set_dual_adapt(adapt=True, j=None)
Inputs:
opts: pyFun.options.Options

Options interface

adapt: {True} | False

Whether or not to adapt after running dual

j: int | None

Phase number

Versions:
  • 2016-04-28 @ddalle: First version

set_dual_outer_loop_krylov(f=True, j=None)

Set --outer_loop_krylov setting for dual

Call:
>>> opts.set_dual_outer_loop_krylov(f=True, j=None)
Inputs:
opts: pyFun.options.Options

Options interface

f: {True} | False

Whether or not to use this flag

j: int | None

Phase number

Versions:
  • 2016-04-28 @ddalle: First version

set_dual_rad(rad=True, j=None)

Set command-line setting for residual adjoint dot product

Call:
>>> opts.set_dual_rad(rad=True, j=None)
Inputs:
opts: pyFun.options.Options

Options interface

j: int | None

Phase number

Outputs:
rad: {True} | False

Whether or not to use residual adjoint dot product

Versions:
  • 2016-04-28 @ddalle: First version

class cape.pyfun.options.runControl.nodet

Class for nodet command-line inputs

get_nodet_animation_freq(i=None)

Get animation frequency command-line option

Call:
>>> f = opts.get_nodet_animation_freq(i=None)
Inputs:
opts: pyFun.options.Options

Options interface

i: int

Run index

Outputs:
f: int

Animation frequency; when nodet outputs are written

Versions:
  • 2015-11-24 @ddalle: First version

set_nodet_animation_freq(f=-1, i=None)

Set animation frequency command-line option

Call:
>>> opts.set_nodet_animation_freq(f, i=None)
Inputs:
opts: pyFun.options.Options

Options interface

f: int

Animation frequency; when nodet outputs are written

i: int

Run index

Versions:
  • 2015-11-24 @ddalle: First version