cape.pyfun.cmdgen: Create commands for FUN3D executables

This module creates system commands as lists of strings for executable binaries or scripts for FUN3D. The main FUN3D executables are nodet or nodet_mpi, for which command are created using nodet(), and dual or dual_mpi, whose commands are constructed using dual().

Commands are created in the form of a list of strings. This is the format used in the built-in module subprocess and also with cape.bin.calli(). As a very simple example, the system command "ls -lh" becomes the list ["ls", "-lh"].

These commands also include prefixes such as mpiexec if necessary. The decision to use nodet or nodet_mpi is made based on the options input of keyword input "MPI". For example, two versions of the command returned by nodet() could be

["mpiexec", "-np", "240", "nodet_mpi", "--plt_tecplot_output"]
["nodet", "--plt_tecplot_output"]
See also:
cape.pyfun.cmdgen.dual(opts=None, i=0, **kw)

Interface to FUN3D binary dual or dual_mpi

Call:
>>> cmdi = dual(opts, i=0)
>>> cmdi = dual(**kw)
Inputs:
opts: :class;`pyFun.options.Options`

Global pyFun options interface or “RunControl” interface

i: int

Phase number

outer_loop_krylov: {True} | False

Whether or not to use --outer_loop_krylov option

rad: {True} | False

Whether or not to use residual adjoint dot product

adapt: {True} | False

Whether or not to adapt at the end of the cycle

Outputs:
cmdi: list[str]

Command split into a list of strings

Versions:
  • 2016-04-28 @ddalle: v1.0

cape.pyfun.cmdgen.nodet(opts=None, j=0, **kw)

Interface to FUN3D binary nodet or nodet_mpi

Call:
>>> cmdi = nodet(opts, i=0)
>>> cmdi = nodet(**kw)
Inputs:
opts: pyFun.options.Options

Global pyFun options interface or “RunControl” interface

i: int

Phase number

animation_freq: int

Output frequency

Outputs:
cmdi: list[str]

Command split into a list of strings

Versions:
  • 2015-11-24 @ddalle: v1.0

  • 2023-08-18 @ddalle: v1.0; use isolate_subsection()

  • 2024-08-08 @ddalle: v1.1; use mpiexec() for MPI directives

cape.pyfun.cmdgen.refine(opts=None, i=0, **kw)

Interface to Refine adaptation binary ref or refmpi

Call:
>>> cmdi = refine(opts, i=0)
>>> cmdi = refine(**kw)
Inputs:
opts: pyFun.options.Options

Global pyFun options interface or “RunControl” interface

i: int

Phase number

Outputs:
cmdi: list[str]

Command split into a list of strings

Versions:
  • 2023-06-30 @jmeeroff: v1.0