topopt

Crates.iotopopt
lib.rstopopt
version
sourcesrc
created_at2022-04-27 15:23:53.672771
updated_at2025-01-02 16:30:33.767786
descriptionTopology optimization in pure Rust, based on 99 lines of MATLAB
homepagehttps://github.com/cmccomb/topopt-rs
repositoryhttps://github.com/cmccomb/topopt-rs
max_upload_size
id576089
Cargo.toml error:TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Chris McComb (cmccomb)

documentation

https://docs.rs/topopt

README

build Crates.io docs.rs

About

This package performs 2-dimensional topology optimization and is a port of "A 99 line topology optimization code written in Matlab".

Basic Usage

Running the solve function with default settings will find a solution to the Messerschmitt–Bölkow–Blohm simply supported beam (enforcing symmetry).

topopt::solve(topopt::Settings::default());

The progress of the algorithm and a visualization of the optimized structure will be displayed in the command line

Alternatively, we could set up with the same simulation explicitly:

topopt::solve(
    topopt::Settings::new(60, 20, 0.5)
        .with_left_bc(true, false)
        .with_bottom_right_bc(false, true)
        .with_top_left_load(0.0, -1.0),
);
Commit count: 66

cargo fmt