34 releases (17 stable)

5.1.1 Oct 30, 2024
5.1.0 Feb 1, 2024
5.0.0 Sep 5, 2023
4.1.0 Jul 12, 2023
0.1.0 Nov 10, 2021

#543 in Science

Download history 16/week @ 2024-08-01 9/week @ 2024-08-08 4/week @ 2024-08-15 3/week @ 2024-08-22 3/week @ 2024-08-29 4/week @ 2024-09-05 6/week @ 2024-09-12 36/week @ 2024-09-19 24/week @ 2024-09-26 5/week @ 2024-10-03 4/week @ 2024-10-10 4/week @ 2024-10-17 59/week @ 2024-10-24 98/week @ 2024-10-31 8/week @ 2024-11-07 2/week @ 2024-11-14

167 downloads per month
Used in 8 crates

MIT license

56KB
1K SLoC

Rust 753 SLoC // 0.1% comments Objective-C 233 SLoC Python 190 SLoC // 0.1% comments

Giant Magellan Telescope Finite Element Model

The crate is a Rust API for the GMT second order finite element model (FEM).

The FEM is loaded from a zip file which name must be modal_state_space_model_2ndOrder.zip and the location of the zip file is given by the environment variable FEM_REPO.

The FEM inputs and outputs are dynamically created during compilation from importing input and output tables contained within the zip archive. This means that each time an application needs a new model, the gmt-fem crate need to be recompiled using the modal_state_space_model_2ndOrder.zip archive corresponding to the new model. To force a re-compilation of the gmt-crate, the gmt-crate library need to be deleted from Rust Cargo cache like this:

cargo clean --release -p gmt-fem

A summary of the properties of a GMT FEM can be obtained by running the Cargo subcommand

cargo gmt-fem

The subcommand is installed with

cargo install -f --features clap gmt-fem

Run

cargo gmt-fem --help

to see the arguments to apply a custom model reduction.

For the reasons explained above, the subcommand need to be re-installed each time it is applied to a new model.

The zip archive modal_state_space_model_2ndOrder.zip is generated with the Matlab script unwrapFEM.m available in the tools directory. The script uses the Matlab files modal_state_space_model_2ndOrder.mat and, if present, static_reduction_model.mat to build modal_state_space_model_2ndOrder.zip.

Dependencies

~59MB
~1M SLoC