1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! Multigrid FEM solver for Helmholtz equation
//!
//! This crate provides a finite element method solver for the Helmholtz equation
//! with adaptive mesh refinement and multigrid acceleration.
//!
//! # Features
//!
//! - **2D and 3D meshes**: Triangles, quadrilaterals, tetrahedra, hexahedra
//! - **Lagrange elements**: P1, P2, P3 polynomial basis functions
//! - **Boundary conditions**: Dirichlet, Neumann, Robin, PML
//! - **Multigrid solver**: V-cycle, W-cycle with geometric coarsening
//! - **Adaptive refinement**: h-refinement with residual-based error estimation
//!
//! # Example
//!
//! ```ignore
//! use fem::{FemProblem, FemSolver, mesh};
//!
//! // Create a 2D mesh
//! let mesh = mesh::unit_square_triangles(10);
//!
//! // Define the Helmholtz problem
//! let problem = FemProblem::helmholtz(mesh, k);
//!
//! // Solve
//! let solver = FemSolver::new();
//! let solution = solver.solve(&problem)?;
//! ```
/// Library version