odatse._main module#

odatse._main.choose_solver(info)[source]#

Select the solver class for the given info.

Parameters:

info (odatse.Info) – Information object containing the solver configuration.

Returns:

The solver class.

Return type:

type

Raises:

odatse.exception.InputError – If the solver name is not recognised.

odatse._main.cli(argv: Sequence[str] | None = None) int[source]#

Console-script entry point for the odatse command.

Runs main() and returns exit status 0 on success, discarding the result object (sys.exit() would interpret a non-integer return value as a failure). Errors are reported inside main() and terminate the process with exit status 1.

odatse._main.main(argv: Sequence[str] | None = None) dict[source]#

Run an analysis specified by command-line style arguments.

Parses the arguments, loads the input file, selects the algorithm and solver, executes the analysis, and returns the result of Algorithm.main() so that programmatic callers can use it as result = odatse.main(argv).

This is the top-level boundary: user-facing errors (odatse.exception.Error) are reported and converted to a non-zero exit status via sys.exit(1). To handle these as exceptions instead, compose the lower-level API (odatse.initialize / odatse.algorithm.choose_algorithm / Algorithm) directly.

Note: do not use this function as a console-script entry point; use cli(), which converts the result to an exit status.