math_audio_wave/
lib.rs

1//! Analytical solutions for wave and Helmholtz equations
2//!
3//! This crate provides exact analytical solutions to wave propagation
4//! and scattering problems, useful for validating numerical solvers (BEM, FEM).
5//!
6//! # Features
7//!
8//! - **1D solutions**: Plane waves, standing waves, damped waves
9//! - **2D solutions**: Cylinder scattering (Bessel/Hankel series)
10//! - **3D solutions**: Sphere scattering (Mie theory)
11//! - **Special functions**: Spherical Bessel/Hankel, Legendre polynomials
12//! - **Green's functions**: Helmholtz kernel and derivatives
13//!
14//! # Example
15//!
16//! ```rust
17//! use math_audio_wave::analytical::{plane_wave_1d, sphere_scattering_3d};
18//! use std::f64::consts::PI;
19//!
20//! // 1D plane wave
21//! let wave = plane_wave_1d(1.0, 0.0, 2.0 * PI, 100);
22//! assert_eq!(wave.pressure.len(), 100);
23//!
24//! // 3D sphere scattering
25//! let scatter = sphere_scattering_3d(1.0, 1.0, 20, vec![2.0], vec![0.0, PI/2.0]);
26//! assert!(scatter.pressure[0].norm() > 0.0);
27//! ```
28
29pub mod analytical;
30pub mod special;
31
32// Re-export main types at crate root
33pub use analytical::{AnalyticalSolution, Point};