Skip to content

pyflightstream.run.mesh_cli (stable)

Generated from the docstrings at build time: every one of the 5 names in the __all__ of pyflightstream.run.mesh_cli has an entry below. The names a guide or an example uses come first; the others follow under Advanced.

The pyfs-mesh command line: every mesh operation of pyflightstream (FR-477).

Pipeline role: the run row, because build --apply, mark-boundaries --apply and export-surface-mesh --apply run the solver and the executor is the run layer's; every other verb reads and writes mesh files with no solver. The verbs' parsers and handlers are those of :mod:pyflightstream.run._cli_geometry, :mod:pyflightstream.run._cli_morph, :mod:pyflightstream.run._cli_wheel and :mod:pyflightstream.run._cli_merge, and the four mesh parsers of :mod:pyflightstream.run._cli_mesh copied as parents (refine, audit, inventory, degenerate); this module builds the program around them and gives each command the console contract of pyfs-workspace: the titled opening, --warning-refusals, --verbose and --log-level, the warnings at the end.

The verbs are the mesh half of the geometry tooling, the CAD half being pyfs-geom (:mod:pyflightstream.run.geom_cli) and the FSI beam cut pyfs-fsi beam.

Used in the guides

pyflightstream.run.mesh_cli.main

main(argv: list[str] | None = None) -> int

Run pyfs-mesh; returns the process exit code.

Parameters:

Name Type Description Default
argv list of str

The command line without the program name; None reads sys.argv.

None

Returns:

Type Description
int

The exit code of the verb that ran: 0 on success, 2 for a refused input, and the verb's own codes otherwise (build: 1 a failed audit gate, 3 the solver failed).

Examples:

>>> from pyflightstream.run.mesh_cli import main
>>> callable(main)
True

Advanced

pyflightstream.run.mesh_cli.MESH_VERBS module-attribute

MESH_VERBS = (
    "mark-boundaries",
    "export-surface-mesh",
    "trailing-edge",
    "convert2midnodes",
    "identify-te",
    "prepare-to-refine",
    "visual-inspect",
    "merge",
    "sector-to-wheel",
    "sector-remesh",
    "power-off-body",
    *MORPH_VERBS,
    "build",
    "accept",
    "from-sidecar",
    *PYFS_MATRIX_ALIASES,
)

pyflightstream.run.mesh_cli.PYFS_MATRIX_ALIASES module-attribute

PYFS_MATRIX_ALIASES = {
    "refine": "refine",
    "audit": "audit-mesh",
    "inventory": "inventory",
    "degenerate": "degenerate",
}

pyflightstream.run.mesh_cli.matrix_parsers

matrix_parsers() -> dict[str, argparse.ArgumentParser]

Return the four copied mesh parsers, built afresh, by their pyfs-matrix name.

Returns:

Type Description
dict of str to argparse.ArgumentParser

refine, audit-mesh, inventory and degenerate.

pyflightstream.run.mesh_cli.run_mesh_verb

run_mesh_verb(args: Namespace) -> int

Run the pyfs-mesh verb args.verb names and return its exit code.

Parameters:

Name Type Description Default
args Namespace

The parsed command line of one verb.

required

Returns:

Type Description
int

The verb's exit code.