morphopt 4.0.1__tar.gz → 4.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {morphopt-4.0.1 → morphopt-4.0.2}/PKG-INFO +17 -14
- {morphopt-4.0.1 → morphopt-4.0.2}/README.md +16 -13
- {morphopt-4.0.1 → morphopt-4.0.2}/pyproject.toml +2 -1
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/__init__.py +45 -8
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/constants.py +94 -181
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/__init__.py +0 -3
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/controller.py +13 -8
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/__init__.py +0 -6
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/fea/contact.py +11 -11
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/geometry.py +0 -1
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/parts/__init__.py +0 -8
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/solver.py +5 -7
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/postprocess/fields.py +49 -41
- morphopt-4.0.2/src/morphopt/postprocess/native.py +81 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/__init__.py +2 -1
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/app.py +8 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/__init__.py +1 -2
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/cad.py +12 -1
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/definitions.py +28 -25
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/editing.py +6 -3
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/fields.py +2 -5
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/finite_element.py +23 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/part_sets.py +2 -18
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/quickstart.py +1 -1
- morphopt-4.0.2/src/morphopt/ui/application/result_fields.py +94 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/results.py +9 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/runs.py +13 -7
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/updaters.py +1 -1
- morphopt-4.0.2/src/morphopt/ui/application_icon.py +49 -0
- morphopt-4.0.2/src/morphopt/ui/assets/morphopt.svg +48 -0
- morphopt-4.0.2/src/morphopt/ui/codegen/assets.py +88 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/codegen/custom_classes.py +19 -2
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/codegen/generator.py +386 -272
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/fea_worker.py +14 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/i18n.py +1 -3
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/launcher.py +28 -44
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/locales/en-US.json +96 -122
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/locales/zh-CN.json +96 -122
- morphopt-4.0.2/src/morphopt/ui/mainwindow.py +681 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/base_nodes.py +10 -9
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/node_types/__init__.py +0 -2
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/node_types/parts.py +0 -94
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/node_types/structural.py +5 -1
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/problem.py +63 -301
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/registry.py +0 -2
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/observe_panel.py +250 -197
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/presentation/labels.py +3 -1
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/refresh.py +10 -3
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/theme/palette.py +5 -1
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/theme/styles/controls.qss +31 -0
- morphopt-4.0.2/src/morphopt/ui/visualization/assets.py +50 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/visualization/geometry.py +223 -221
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/visualization/loads.py +26 -26
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/visualization/scene.py +21 -1
- morphopt-4.0.2/src/morphopt/ui/widgets/asset_browser.py +240 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/codeeditor.py +69 -38
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/collection_controls.py +62 -17
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/controller_editor.py +11 -10
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/custom_classes.py +181 -65
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/definition_actions.py +177 -77
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/definition_manager.py +186 -107
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/edit_history.py +23 -18
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/editor.py +85 -32
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/editor_pages.py +10 -3
- morphopt-4.0.2/src/morphopt/ui/widgets/elided_label.py +47 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/file_dialogs.py +82 -24
- morphopt-4.0.2/src/morphopt/ui/widgets/finite_element.py +768 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/helper_editor.py +108 -25
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/model_tree.py +192 -115
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/objective_editor.py +81 -55
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/observation_pages.py +34 -18
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/param_form.py +82 -28
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/plot_style.py +17 -1
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/preview_renderer.py +255 -43
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/quickstart.py +343 -135
- morphopt-4.0.2/src/morphopt/ui/widgets/result_path.py +73 -0
- morphopt-4.0.2/src/morphopt/ui/widgets/run_dialogs.py +69 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/solver_editor.py +55 -21
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/stepmatrix.py +34 -18
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/template_insert_dialog.py +55 -24
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/theme_selector.py +3 -1
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/updater_editor.py +232 -89
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/values.py +0 -2
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/viewer.py +185 -27
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/workbench.py +26 -45
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/utils/__init__.py +1 -1
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/utils/gradient_check.py +57 -33
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/utils/history_read.py +5 -3
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt.egg-info/PKG-INFO +17 -14
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt.egg-info/SOURCES.txt +9 -4
- morphopt-4.0.1/src/morphopt/optcore/modelparams/parts/torch_fea_part.py +0 -177
- morphopt-4.0.1/src/morphopt/ui/application/imported_models.py +0 -79
- morphopt-4.0.1/src/morphopt/ui/mainwindow.py +0 -444
- morphopt-4.0.1/src/morphopt/ui/model/modelinfo.py +0 -119
- morphopt-4.0.1/src/morphopt/ui/widgets/finite_element.py +0 -493
- morphopt-4.0.1/src/morphopt/ui/widgets/run_dialogs.py +0 -125
- morphopt-4.0.1/src/morphopt/ui/widgets/torchfea_model_editor.py +0 -406
- {morphopt-4.0.1 → morphopt-4.0.2}/setup.cfg +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/codesign/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/codesign/constraints.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/codesign/offset_boundary_part.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/codesign/update_offset_boundary_part.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/opt_runner.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/history.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/base_model_component.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/baseparam.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/fea/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/fea/base_component.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/fea/body_force.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/fea/boundary_condition.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/fea/couple.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/fea/point_load.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/fea/pressure.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/fea/reference_point.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/fea/spring.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/feaparams.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/materials/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/materials/base_material.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/materials/homogeneous_material.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/materials/models.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/materialsparams.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/params.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/parts/base_part.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/parts/box_part.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/parts/cad_part.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/modelparams/parts/inp_part.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/objfunc.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/protocal.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/quadrature.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/optcore/updaters.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/postprocess/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/postprocess/exporters.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/boundary_part.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/meshgenerator.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/objectivefuncs/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/objectivefuncs/basefuncs.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/objectivefuncs/boundarys.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/objectivefuncs/distancesurface.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/objectivefuncs/shapederivative.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/objectivefuncs/surfacefairness.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/objectivefuncs/volumemaximization.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/surfaces/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/surfaces/base_constraints.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/surfaces/base_surface.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/surfaces/bsp_constraints.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/surfaces/bsp_surface.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/surfaces/cpgeo_constraints.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/surfaces/cpgeo_surface.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/shapeopt/update_boundary_part.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/simp/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/simp/objectivefuncs/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/simp/objectivefuncs/basefuncs.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/simp/objectivefuncs/boundarys.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/simp/objectivefuncs/densityfield.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/simp/objectivefuncs/sensitivity.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/simp/objectivefuncs/volfrac.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/simp/simpmaterial.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/simp/update_simpmaterial.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/taskoptmization.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/__main__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/completion.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/devices.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/edit_history.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/editor_routing.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/expressions.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/application/values.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/codegen/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/chamberlayout.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/configuration.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/fields.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/loaders.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/material_models.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/node_types/cad.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/node_types/custom_code.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/node_types/loads.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/node_types/materials.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/node_types/objectives.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/node_types/penalties.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/node_types/surfaces.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/model/node_types/symmetry.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/presentation/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/presentation/edit_history.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/presentation/history.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/presentation/navigation.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/schemes/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/schemes/base.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/schemes/snippets.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/theme/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/theme/manager.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/theme/styles/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/theme/styles/base.qss +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/theme/styles/inputs.qss +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/theme/stylesheet.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/theme/themes/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/theme/themes/dark.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/theme/themes/light.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/visualization/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/__init__.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/language_selector.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt/ui/widgets/source_view.py +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt.egg-info/dependency_links.txt +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt.egg-info/entry_points.txt +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt.egg-info/requires.txt +0 -0
- {morphopt-4.0.1 → morphopt-4.0.2}/src/morphopt.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: morphopt
|
|
3
|
-
Version: 4.0.
|
|
3
|
+
Version: 4.0.2
|
|
4
4
|
Summary: A morphing optimization framework using PyTorch and torchfea.
|
|
5
5
|
Requires-Python: >=3.12
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -28,14 +28,14 @@ Requires-Dist: pytest>=8.0; extra == "test"
|
|
|
28
28
|
|
|
29
29
|
**Developed by Zenan Song**
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
MorphOpt is a differentiable structural optimization framework that combines the adjoint method with automatic differentiation (AD). The sensitivity corresponds to the virtual work of residual force derivatives on the adjoint displacement field, computed via a single backpropagation through the residual graph. MorphOpt provides a unified interface for geometry, load, and material definition, calls torchfea for GPU-accelerated differentiable nonlinear FEA and adjoint-AD sensitivity, and employs a trust-region optimizer with L-BFGS for design updates. Validated on SIMP topology optimization with B-spline density fields and pneumatic soft robot shape optimization with deformation-dependent follower loads.
|
|
32
32
|
|
|
33
33
|
## Features
|
|
34
34
|
|
|
35
35
|
- Custom model definition covering geometry, material, and load parameters
|
|
36
36
|
- Differentiable FEA via torchfea with automatic solving and sensitivity propagation
|
|
37
37
|
- L-BFGS and trust-region methods for parameter updates within a subproblem framework
|
|
38
|
-
-
|
|
38
|
+
- Component customization through framework class inheritance
|
|
39
39
|
|
|
40
40
|
## Quick Start
|
|
41
41
|
|
|
@@ -47,7 +47,7 @@ pip install morphopt
|
|
|
47
47
|
|
|
48
48
|
Requirements: Python ≥ 3.12; a PyTorch **float64** build is recommended.
|
|
49
49
|
|
|
50
|
-
> **Optimizations are run as scripts.** Each job is an ordinary Python file that calls `morphopt.start_optimization(...)`. It runs headlessly in a terminal (local or remote), and
|
|
50
|
+
> **Optimizations are run as scripts.** Each job is an ordinary Python file that calls `morphopt.start_optimization(...)`. It runs headlessly in a terminal (local or remote), and optimization runs can be stopped and resumed from their result folders. Script execution is the recommended way to run jobs.
|
|
51
51
|
|
|
52
52
|
1. **Run a minimal example** — execute it directly in a terminal:
|
|
53
53
|
|
|
@@ -59,7 +59,7 @@ Requirements: Python ≥ 3.12; a PyTorch **float64** build is recommended.
|
|
|
59
59
|
python examples/gripper.py
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
-
2. **Run
|
|
62
|
+
2. **Run a custom job** — copy an example as a starting point, configure the geometry, material, loads, updater, and objective, and launch it as a script:
|
|
63
63
|
|
|
64
64
|
```bash
|
|
65
65
|
python my_task.py
|
|
@@ -67,26 +67,29 @@ Requirements: Python ≥ 3.12; a PyTorch **float64** build is recommended.
|
|
|
67
67
|
|
|
68
68
|
Each run writes its results (logs, FEA files, restart script) into a timestamped result folder under the run root.
|
|
69
69
|
|
|
70
|
-
3. **
|
|
70
|
+
3. **Graphical interface.** The GUI supports problem definition, optimization monitoring, and result inspection in one window. It also exports runnable Python scripts (`.py`) for execution in the UI or a terminal.
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
73
|
morphopt-ui # console command, available after `pip install morphopt`
|
|
74
|
-
# python -m morphopt.ui
|
|
74
|
+
# Alternative entry point: python -m morphopt.ui
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
The GUI opens directly into the full definition workbench with its standard sections present and no problem setup prefilled.
|
|
77
|
+
The GUI opens directly into the full definition workbench with its standard sections present and no problem setup prefilled. Definitions can be created directly in the workbench or generated through **Quickstart**. Quickstart provides shape and topology optimization settings, geometry definitions, and weighted objective terms with associated load conditions. Workspace terms select their driving pressure channels and use boundary integration. Generated problems stay editable and can be saved or exported as runnable scripts.
|
|
78
78
|
|
|
79
|
-
The complete
|
|
79
|
+
The [UI quick start](docs/UIguide.md) covers the complete example from model definition to optimization and result inspection. The [script quick start](docs/scriptguide.md) provides the equivalent runnable Python task.
|
|
80
80
|
|
|
81
81
|
### Numeric configuration
|
|
82
82
|
|
|
83
83
|
Shared UI defaults and tunable kernel parameters live in [`src/morphopt/constants.py`](src/morphopt/constants.py), grouped under `CONSTANT.UI` and `CONSTANT.KERNEL`. Code accesses them directly, for example `CONSTANT.UI.VIEWER.RENDER.LABEL_FONT_SIZE` or `CONSTANT.KERNEL.SOLVER.NUM_PROCESS`. Edit a value there to change its default; restart MorphOpt for the change to take effect. Coordinate indices, tensor dimensions, and coefficients that define mathematical formulas remain in code. UI translations remain in JSON files under `src/morphopt/ui/locales/`.
|
|
84
84
|
|
|
85
|
-
|
|
85
|
+
### Documentation
|
|
86
86
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
| Workflow | Quick start | Module and interface reference |
|
|
88
|
+
|---|---|---|
|
|
89
|
+
| Python script | [Start an optimization](docs/scriptguide.md) | [Define and extend each module](docs/scriptreference.md) |
|
|
90
|
+
| Graphical UI | [Create and run the example](docs/UIguide.md) | [Modules, parameters and interface definitions](docs/UIreference.md) |
|
|
91
|
+
|
|
92
|
+
The [documentation index](docs/README.md) includes the reading order and automatic section numbering commands. Theory and code architecture are documented separately under `docs/theory/` and `docs/codestructure/`.
|
|
90
93
|
|
|
91
94
|
## Directory Overview
|
|
92
95
|
|
|
@@ -107,7 +110,7 @@ Research use preferred. For production or commercial use, please evaluate and en
|
|
|
107
110
|
|
|
108
111
|
## Citation
|
|
109
112
|
|
|
110
|
-
|
|
113
|
+
Research using MorphOpt can cite the following publications:
|
|
111
114
|
|
|
112
115
|
- TRO 2023
|
|
113
116
|
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
**Developed by Zenan Song**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
MorphOpt is a differentiable structural optimization framework that combines the adjoint method with automatic differentiation (AD). The sensitivity corresponds to the virtual work of residual force derivatives on the adjoint displacement field, computed via a single backpropagation through the residual graph. MorphOpt provides a unified interface for geometry, load, and material definition, calls torchfea for GPU-accelerated differentiable nonlinear FEA and adjoint-AD sensitivity, and employs a trust-region optimizer with L-BFGS for design updates. Validated on SIMP topology optimization with B-spline density fields and pneumatic soft robot shape optimization with deformation-dependent follower loads.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
9
|
- Custom model definition covering geometry, material, and load parameters
|
|
10
10
|
- Differentiable FEA via torchfea with automatic solving and sensitivity propagation
|
|
11
11
|
- L-BFGS and trust-region methods for parameter updates within a subproblem framework
|
|
12
|
-
-
|
|
12
|
+
- Component customization through framework class inheritance
|
|
13
13
|
|
|
14
14
|
## Quick Start
|
|
15
15
|
|
|
@@ -21,7 +21,7 @@ pip install morphopt
|
|
|
21
21
|
|
|
22
22
|
Requirements: Python ≥ 3.12; a PyTorch **float64** build is recommended.
|
|
23
23
|
|
|
24
|
-
> **Optimizations are run as scripts.** Each job is an ordinary Python file that calls `morphopt.start_optimization(...)`. It runs headlessly in a terminal (local or remote), and
|
|
24
|
+
> **Optimizations are run as scripts.** Each job is an ordinary Python file that calls `morphopt.start_optimization(...)`. It runs headlessly in a terminal (local or remote), and optimization runs can be stopped and resumed from their result folders. Script execution is the recommended way to run jobs.
|
|
25
25
|
|
|
26
26
|
1. **Run a minimal example** — execute it directly in a terminal:
|
|
27
27
|
|
|
@@ -33,7 +33,7 @@ Requirements: Python ≥ 3.12; a PyTorch **float64** build is recommended.
|
|
|
33
33
|
python examples/gripper.py
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
2. **Run
|
|
36
|
+
2. **Run a custom job** — copy an example as a starting point, configure the geometry, material, loads, updater, and objective, and launch it as a script:
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
python my_task.py
|
|
@@ -41,26 +41,29 @@ Requirements: Python ≥ 3.12; a PyTorch **float64** build is recommended.
|
|
|
41
41
|
|
|
42
42
|
Each run writes its results (logs, FEA files, restart script) into a timestamped result folder under the run root.
|
|
43
43
|
|
|
44
|
-
3. **
|
|
44
|
+
3. **Graphical interface.** The GUI supports problem definition, optimization monitoring, and result inspection in one window. It also exports runnable Python scripts (`.py`) for execution in the UI or a terminal.
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
47
|
morphopt-ui # console command, available after `pip install morphopt`
|
|
48
|
-
# python -m morphopt.ui
|
|
48
|
+
# Alternative entry point: python -m morphopt.ui
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
The GUI opens directly into the full definition workbench with its standard sections present and no problem setup prefilled.
|
|
51
|
+
The GUI opens directly into the full definition workbench with its standard sections present and no problem setup prefilled. Definitions can be created directly in the workbench or generated through **Quickstart**. Quickstart provides shape and topology optimization settings, geometry definitions, and weighted objective terms with associated load conditions. Workspace terms select their driving pressure channels and use boundary integration. Generated problems stay editable and can be saved or exported as runnable scripts.
|
|
52
52
|
|
|
53
|
-
The complete
|
|
53
|
+
The [UI quick start](docs/UIguide.md) covers the complete example from model definition to optimization and result inspection. The [script quick start](docs/scriptguide.md) provides the equivalent runnable Python task.
|
|
54
54
|
|
|
55
55
|
### Numeric configuration
|
|
56
56
|
|
|
57
57
|
Shared UI defaults and tunable kernel parameters live in [`src/morphopt/constants.py`](src/morphopt/constants.py), grouped under `CONSTANT.UI` and `CONSTANT.KERNEL`. Code accesses them directly, for example `CONSTANT.UI.VIEWER.RENDER.LABEL_FONT_SIZE` or `CONSTANT.KERNEL.SOLVER.NUM_PROCESS`. Edit a value there to change its default; restart MorphOpt for the change to take effect. Coordinate indices, tensor dimensions, and coefficients that define mathematical formulas remain in code. UI translations remain in JSON files under `src/morphopt/ui/locales/`.
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
### Documentation
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
| Workflow | Quick start | Module and interface reference |
|
|
62
|
+
|---|---|---|
|
|
63
|
+
| Python script | [Start an optimization](docs/scriptguide.md) | [Define and extend each module](docs/scriptreference.md) |
|
|
64
|
+
| Graphical UI | [Create and run the example](docs/UIguide.md) | [Modules, parameters and interface definitions](docs/UIreference.md) |
|
|
65
|
+
|
|
66
|
+
The [documentation index](docs/README.md) includes the reading order and automatic section numbering commands. Theory and code architecture are documented separately under `docs/theory/` and `docs/codestructure/`.
|
|
64
67
|
|
|
65
68
|
## Directory Overview
|
|
66
69
|
|
|
@@ -81,7 +84,7 @@ Research use preferred. For production or commercial use, please evaluate and en
|
|
|
81
84
|
|
|
82
85
|
## Citation
|
|
83
86
|
|
|
84
|
-
|
|
87
|
+
Research using MorphOpt can cite the following publications:
|
|
85
88
|
|
|
86
89
|
- TRO 2023
|
|
87
90
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "morphopt"
|
|
3
|
-
version = "4.0.
|
|
3
|
+
version = "4.0.2"
|
|
4
4
|
description = "A morphing optimization framework using PyTorch and torchfea."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.12"
|
|
@@ -46,4 +46,5 @@ extend-select = ["RUF022"]
|
|
|
46
46
|
"morphopt.ui" = [
|
|
47
47
|
"locales/*.json",
|
|
48
48
|
"theme/styles/*.qss",
|
|
49
|
+
"assets/*.svg",
|
|
49
50
|
]
|
|
@@ -67,22 +67,20 @@ def enable_logging(level=__logging.INFO, log_file=None, file_log_level=__logging
|
|
|
67
67
|
|
|
68
68
|
# region modules (loaded after the core classes they subclass)
|
|
69
69
|
from . import codesign, shapeopt, simp
|
|
70
|
+
from .codesign import OffsetBoundaryPart, UpdaterOffsetBoundaryPart
|
|
70
71
|
from .opt_runner import debug_optimization, start_optimization
|
|
71
72
|
from .optcore.controller import Controller
|
|
72
73
|
from .optcore.history import History
|
|
73
74
|
from .optcore.modelparams import (
|
|
74
75
|
BaseModelComponent,
|
|
75
76
|
BasePart,
|
|
76
|
-
CADPart,
|
|
77
77
|
BoxPart,
|
|
78
|
+
CADPart,
|
|
78
79
|
FEAParams,
|
|
79
80
|
GeometryParams,
|
|
80
81
|
INPPart,
|
|
81
82
|
MaterialsParams,
|
|
82
83
|
Params,
|
|
83
|
-
TorchFEAPart,
|
|
84
|
-
load_model_assembly,
|
|
85
|
-
resolve_model_path,
|
|
86
84
|
)
|
|
87
85
|
from .optcore.modelparams.materials import HomogeneousMaterial
|
|
88
86
|
from .optcore.objfunc import ObjectiveFunction
|
|
@@ -95,14 +93,13 @@ from .optcore.protocal import (
|
|
|
95
93
|
from .optcore.solver import Solver
|
|
96
94
|
from .optcore.updaters import Updaters
|
|
97
95
|
from .shapeopt import (
|
|
98
|
-
BoundaryPart,
|
|
99
|
-
UpdaterBoundaryPart,
|
|
100
96
|
BaseSurfaceConstraints,
|
|
101
|
-
|
|
97
|
+
BoundaryPart,
|
|
102
98
|
BspSurfaceRelationConstraint,
|
|
103
99
|
CPGEOSurfaceRelationConstraint,
|
|
100
|
+
SurfaceRelationConstraint,
|
|
101
|
+
UpdaterBoundaryPart,
|
|
104
102
|
)
|
|
105
|
-
from .codesign import OffsetBoundaryPart, UpdaterOffsetBoundaryPart
|
|
106
103
|
from .simp import SIMP_BSPFieldMaterials, UpdaterSIMPMaterial
|
|
107
104
|
|
|
108
105
|
# endregion
|
|
@@ -112,3 +109,43 @@ from .utils import check_gradients, get_controller
|
|
|
112
109
|
# endregion
|
|
113
110
|
|
|
114
111
|
controller: Controller = None
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
__all__ = [
|
|
115
|
+
"BaseModelComponent",
|
|
116
|
+
"BasePart",
|
|
117
|
+
"BaseSurfaceConstraints",
|
|
118
|
+
"BoundaryPart",
|
|
119
|
+
"BoxPart",
|
|
120
|
+
"BspSurfaceRelationConstraint",
|
|
121
|
+
"CADPart",
|
|
122
|
+
"CPGEOSurfaceRelationConstraint",
|
|
123
|
+
"Controller",
|
|
124
|
+
"FEAParams",
|
|
125
|
+
"GeometryParams",
|
|
126
|
+
"History",
|
|
127
|
+
"HomogeneousMaterial",
|
|
128
|
+
"INPPart",
|
|
129
|
+
"MaterialsParams",
|
|
130
|
+
"ObjectiveFunction",
|
|
131
|
+
"OffsetBoundaryPart",
|
|
132
|
+
"Params",
|
|
133
|
+
"ProtocalInitializable",
|
|
134
|
+
"ProtocalSavable",
|
|
135
|
+
"ProtocalUpdatable",
|
|
136
|
+
"ProtocalVisualizable",
|
|
137
|
+
"SIMP_BSPFieldMaterials",
|
|
138
|
+
"Solver",
|
|
139
|
+
"SurfaceRelationConstraint",
|
|
140
|
+
"UpdaterBoundaryPart",
|
|
141
|
+
"UpdaterOffsetBoundaryPart",
|
|
142
|
+
"UpdaterSIMPMaterial",
|
|
143
|
+
"Updaters",
|
|
144
|
+
"check_gradients",
|
|
145
|
+
"codesign",
|
|
146
|
+
"debug_optimization",
|
|
147
|
+
"get_controller",
|
|
148
|
+
"shapeopt",
|
|
149
|
+
"simp",
|
|
150
|
+
"start_optimization",
|
|
151
|
+
]
|