Gyredocs
Depth Practice
API

Gyre/Reference

Command-line reference

In one minuteEvery `gyre` sub-command with its options, generated from the program itself.

Written at L2 Practice 1154 words Markdown
text
usage: gyre [-h] {presets,schema,run,mesh,serve,docs,verify,pipeline} ...

Command-line interface: ``gyre <command>``.

    gyre presets                         list built-in cases
    gyre schema                          print the CaseSpec JSON schema
    gyre run naca0012_euler -o runs/a    solve a preset or a spec file
    gyre run CASE --target-error cd=1e-4 raise the order until the error estimate of cd is met
    gyre mesh info wing.msh              inspect, convert or export a mesh file
    gyre serve --port 8600               start the service (API + docs + MCP)
    gyre docs build                      build the documentation site
    gyre verify --suite quick            run the verification pipeline
    gyre pipeline run pipelines/x.yaml   execute a declarative pipeline

positional arguments:
  {presets,schema,run,mesh,serve,docs,verify,pipeline}
    presets             list built-in cases
    schema              print the case JSON schema
    run                 solve a case
    mesh                inspect, convert and export mesh files
    serve               start the Gyre service
    docs                documentation tools
    verify              run the verification suite
    pipeline            pipeline tools

options:
  -h, --help            show this help message and exit

gyre presets#

text
usage: gyre presets [-h]

options:
  -h, --help  show this help message and exit

gyre schema#

text
usage: gyre schema [-h]

options:
  -h, --help  show this help message and exit

gyre run#

text
usage: gyre run [-h] [-o OUTPUT] [--set PATH=VALUE] [--gradients] [--of OF]
                [--wrt WRT] [--error ERROR] [--target-error OUTPUT=TOL]
                [--max-order N] [-q]
                case

positional arguments:
  case                  preset name or YAML/JSON spec file

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        directory for artefacts
  --set PATH=VALUE      override, e.g. flow.mach=0.6; the value is read as
                        JSON (number, true/false, list), anything else as
                        text, and a field that holds text keeps text
                        (mesh.params.code=2412 is the string "2412")
  --gradients           compute total derivatives
  --of OF               comma-separated outputs for gradients
  --wrt WRT             comma-separated inputs for gradients
  --error ERROR         comma-separated outputs for adjoint error estimates;
                        prints value, estimate, corrected and error per output
                        (the per-element indicators are in result.json, with
                        -o)
  --target-error OUTPUT=TOL
                        choose the polynomial degree by accuracy: starting at
                        the case's order, raise it until the adjoint error
                        estimate of OUTPUT is at most TOL (absolute), e.g.
                        cd=1e-4; gradients, fields and the printed outputs are
                        those of the final degree; exit status 3 if TOL is not
                        met at --max-order, 1 (with a message) if the request
                        cannot work: OUTPUT is not a scalar output of the
                        case, or --max-order is below the case's order
  --max-order N         highest degree --target-error may try (default: 5)
  -q, --quiet

gyre mesh#

text
usage: gyre mesh [-h] {info,convert,export} ...

Tools for external meshes (Gmsh MSH 2.2 / 4.1 ASCII and Gyre NPZ). Each
command prints a JSON summary; a file that cannot be used ends with a message
and exit status 1.

positional arguments:
  {info,convert,export}
    info                read and validate a mesh file, print its summary
    convert             convert between .msh and .npz
    export              write the mesh of a preset or case file

options:
  -h, --help            show this help message and exit

gyre mesh info#

text
usage: gyre mesh info [-h] [--scale SCALE] file

Read and validate a mesh file and print its summary as JSON: dimension,
elements, geometry order, boundary groups, bounding box, quality numbers, size
and SHA-256, and under "lines" the element lines that solver.smoother: line
would use on this mesh ("lines": 0 if it has none) with the largest and the
median cell anisotropy and the threshold at which a cell joins a line.

positional arguments:
  file           mesh file (.msh or .npz)

options:
  -h, --help     show this help message and exit
  --scale SCALE  factor applied to the coordinates (default: 1.0)

gyre mesh convert#

text
usage: gyre mesh convert [-h] IN OUT

Read a mesh file (which validates it) and write it in the format given by the
extension of OUT (.msh or .npz).

positional arguments:
  IN          mesh file to read (.msh or .npz)
  OUT         mesh file to write (.msh or .npz)

options:
  -h, --help  show this help message and exit

gyre mesh export#

text
usage: gyre mesh export [-h] [--set PATH=VALUE] case OUT

Build (or read) the mesh of a case and write it to OUT (.msh or .npz), e.g. to
view a generator mesh in Gmsh.

positional arguments:
  case              preset name or YAML/JSON spec file
  OUT               mesh file to write (.msh or .npz)

options:
  -h, --help        show this help message and exit
  --set PATH=VALUE  override as for `gyre run`, e.g. mesh.params.n_surf=64

gyre serve#

text
usage: gyre serve [-h] [--host HOST] [--port PORT] [--data DATA] [--site SITE]
                  [--workers WORKERS]

options:
  -h, --help         show this help message and exit
  --host HOST        bind address (default: all interfaces)
  --port PORT
  --data DATA        job/session storage directory
  --site SITE        built documentation directory to serve
  --workers WORKERS  concurrent solver workers

gyre docs#

text
usage: gyre docs [-h] [-o OUTPUT] [--verification VERIFICATION] {build}

positional arguments:
  {build}

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
  --verification VERIFICATION
                        directory with verification results to embed

gyre verify#

text
usage: gyre verify [-h] [--suite {quick,full}] [-o OUTPUT] [--only ONLY]

options:
  -h, --help            show this help message and exit
  --suite {quick,full}
  -o OUTPUT, --output OUTPUT
  --only ONLY           comma-separated study ids

gyre pipeline#

text
usage: gyre pipeline [-h] [-o OUTPUT] [--force] [--param NAME=VALUE]
                     [--param-json NAME=JSON] [--stage ID] [--record FILE]
                     {run} file

positional arguments:
  {run}
  file

options:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
  --force               ignore the stage cache
  --param NAME=VALUE    override a pipeline parameter; the value is read like
                        --set (JSON, else text; a parameter whose default is
                        text keeps text); a name the pipeline does not declare
                        is refused
  --param-json NAME=JSON
                        override a pipeline parameter with a JSON value taken
                        exactly as given (for programs: 2412 is a number and
                        '"2412"' text, whatever the declared default is); wins
                        over --param for the same name
  --stage ID            run only this stage and the stages it depends on
                        (repeatable); the other stages are recorded as
                        skipped, reason 'not selected'
  --record FILE         also write this run's record to FILE
                        (<output>/<name>/pipeline.json is replaced by the next
                        run)

gyre run exits 0 on a converged solve and 2 if the solver did not converge. With --target-error it exits 0 only if the tolerance was also met, 3 if the solve converged but the tolerance was not met at --max-order, and 1, with a message and before any flow is solved, if the request cannot work (the tolerance is not a positive number, --max-order is given without --target-error, is below 1 or below the case’s order, or the output is not a scalar output of the case).

Every gyre mesh command exits 0 after printing its JSON summary; if it cannot use a file or case it prints gyre mesh <action>: <message> to standard error, nothing to standard output, and exits 1.

gyre verify ends with the line P/R studies of this invocation passed, followed by ; stale failing results not re-run: id, id when failing results of earlier invocations are in the output directory; it exits 1 only if a study of this invocation failed. gyre pipeline run exits 1 if the pipeline failed.

    ↑ ↓ moveEnter open[ ] change depthResults show section and depth level