Command Line Interface

Command-line utility to run topology optimization.

topopt.cli.create_parser(nelx=180, nely=60, volfrac=0.4, penalty=3.0, rmin=5.4, ft=1)[source]

Create an argument parser with the given values as defaults.

Parameters:
Returns:

Return type:

Argument parser with given defaults.

topopt.cli.main(nelx, nely, volfrac, penalty, rmin, ft, gui=None, bc=None, problem=None, filter=None, solver=None)[source]

Run the main application of the command-line tools.

Parameters:
Return type:

None

topopt.cli.parse_args(nelx=180, nely=60, volfrac=0.4, penalty=3.0, rmin=5.4, ft=1)[source]

Parse the system args with the given values as defaults.

Parameters:
Returns:

Return type:

Parsed command-line arguments.

topopt.cli.title_str(nelx, nely, volfrac, rmin, penalty)[source]

Create a title string for the problem.

Parameters:
  • nelx (int) – The number of elements in the x direction.
  • nely (int) – The number of elements in the y direction.
  • volfrac (float) – The fraction of the total volume to use.
  • rmin (float) – The filter radius.
  • penalty (float) – The penalty exponent value in SIMP.
Returns:

Return type:

Title string for the GUI.