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: - nelx (
int) – The default number of elements in the x direction. - nely (
int) – The default number of elements in the y direction. - volfrac (
float) – The default fraction of the total volume to use. - penalty (
float) – The default penalty exponent value in SIMP. - rmin (
float) – The default filter radius. - ft (
int) –- The default filter method to use.
Returns: Return type: Argument parser with given defaults.
- nelx (
-
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: - 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. - penalty (
float) – The penalty exponent value in SIMP. - rmin (
float) – The filter radius. - ft (
int) –- The filter method to use.
- gui (
Optional[GUI]) – The GUI to use. - bc (
Optional[BoundaryConditions]) – The boundary conditions to use. - problem (
Optional[Problem]) – The problem to use. - filter (
Optional[Filter]) – The filter to use. - solver (
Optional[TopOptSolver]) – The solver to use.
Return type: None- nelx (
-
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: - nelx (
int) – The default number of elements in the x direction. - nely (
int) – The default number of elements in the y direction. - volfrac (
float) – The default fraction of the total volume to use. - penalty (
float) – The default penalty exponent value in SIMP. - rmin (
float) – The default filter radius. - ft (
int) –- The default filter method to use.
Returns: Return type: Parsed command-line arguments.
- nelx (