cfsem

Crates.iocfsem
lib.rscfsem
version1.1.0
sourcesrc
created_at2024-07-09 21:01:01.062435
updated_at2024-08-27 14:15:58.891909
descriptionQuasi-steady electromagnetics including filamentized approximations, Biot-Savart, and Grad-Shafranov.
homepagehttps://github.com/cfs-energy/cfsem-rs
repositoryhttps://github.com/cfs-energy/cfsem-rs
max_upload_size
id1297477
size94,735
James Logan (jlogan-cfs)

documentation

README

cfsem

Docs - Rust | Docs - Python

Quasi-steady electromagnetics including filamentized approximations, Biot-Savart, and Grad-Shafranov.

To avoid duplication, most tests and example applications are found with the Python bindings.

This library makes use of FMA (fused multiply-add) instructions; as a result, its performance benefits significantly from enabling the +fma flag for x86 targets. See this project's rustc config for an example configuration enabling FMA for x86 targets. aarch64 targets (such as Apple and Raspberry Pi processors) have FMA enabled by default.

Installation

To include this library in a Rust project, add an entry to your Cargo.toml's [dependencies] section:

cfsem = "*"

For Python installation, see the docs for the Python library.

Benchmarking

Benchmarks are configured in Cargo.toml, and can be run via cargo:

cargo bench

Contributing

Contributions consistent with the goals and anti-goals of the package are welcome.

Please make an issue ticket to discuss changes before investing significant time into a branch.

Goals

  • Library-level functions and formulas
  • Comprehensive documentation including literature references, assumptions, and units-of-measure
  • Quantitative unit-testing of formulas
  • Performance (both speed and memory-efficiency)
    • Guide development of performance-sensitive functions with structured benchmarking
  • Cross-platform compatibility
  • Minimization of long-term maintenance overhead (both for the library, and for users of the library)
    • Semantic versioning
    • Automated linting and formatting tools
    • Centralized CI and toolchain configuration in as few files as possible

Anti-Goals

  • Fanciness that increases environment complexity, obfuscates reasoning, or introduces platform restrictions
  • Brittle CI or toolchain processes that drive increased maintenance overhead
  • Application-level functionality (graphical interfaces, simulation frameworks, etc)

License

Licensed under either of

at your option.

Commit count: 4

cargo fmt