bem/lib.rs
1//! # BEM: Boundary Element Method Library
2//!
3//! High-performance, memory-efficient BEM solver for acoustic scattering problems.
4//!
5//! ## Features
6//!
7//! - FFI wrapper to NumCalc C++ BEM solver
8//! - Parallel execution with Rayon (memory-efficient, no async overhead)
9//! - Comprehensive analytical validation (1D, 2D, 3D)
10//! - JSON output for visualization
11//!
12//! ## Example
13//!
14//! ```rust,no_run
15//! use bem::{NumCalcRunner, NumCalcConfig};
16//!
17//! let runner = NumCalcRunner::new("project_dir")?;
18//! let config = NumCalcConfig::default();
19//! let output = runner.run(&config)?;
20//! # Ok::<(), anyhow::Error>(())
21//! ```
22
23#![warn(missing_docs)]
24#![warn(clippy::all)]
25#![allow(clippy::too_many_arguments)] // Scientific code often has many parameters
26
27pub mod analytical;
28pub mod testing;
29pub mod room_acoustics;
30
31#[cfg(feature = "ffi")]
32pub mod ffi;
33
34pub mod core;
35
36// Re-exports
37pub use analytical::*;
38pub use testing::*;
39
40#[cfg(feature = "ffi")]
41pub use ffi::{NumCalcConfig, NumCalcOutput, NumCalcRunner, ParallelBemRunner};
42
43/// Library version
44pub const VERSION: &str = env!("CARGO_PKG_VERSION");
45
46/// Git commit hash (set during build)
47pub const GIT_HASH: &str = env!("GIT_HASH");
48
49#[cfg(test)]
50mod tests {
51 use super::*;
52
53 #[test]
54 fn test_version() {
55 assert!(!VERSION.is_empty());
56 }
57}