7 releases

0.1.6 Jan 2, 2025
0.1.5 Dec 10, 2023
0.1.4 Apr 23, 2023
0.1.2 May 13, 2022
0.1.1 Apr 27, 2022

#457 in Algorithms

Download history 7/week @ 2024-12-16 138/week @ 2024-12-30 24/week @ 2025-01-06 6/week @ 2025-01-13 2/week @ 2025-02-17 4/week @ 2025-02-24

397 downloads per month

MIT license

38KB
800 lines

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),
);

Dependencies

~5.5MB
~106K SLoC