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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Finite Element Method (FEM) for Micromagnetic Simulations
//!
//! This module provides FEM capabilities for solving micromagnetic problems,
//! particularly useful for complex geometries and material distributions where
//! finite-difference methods become impractical.
//!
//! ## Features
//!
//! - **Mesh Generation**: Delaunay triangulation for 2D/3D domains
//! - **Sparse Linear Solvers**: CG, BiCGSTAB, AMG for efficient solution
//! - **Micromagnetic FEM**: Specialized elements for magnetization dynamics
//! - **Parallel Assembly**: Thread-parallel stiffness matrix assembly
//!
//! ## Physical Background
//!
//! The micromagnetic energy functional is discretized using FEM:
//!
//! ```text
//! E_total = E_exchange + E_anisotropy + E_zeeman + E_demag
//! ```
//!
//! For the LLG equation, we solve:
//! ```text
//! ∂m/∂t = -γ (m × H_eff) + α (m × ∂m/∂t)
//! ```
//!
//! ## Example
//!
//! ```rust,ignore
//! use spintronics::fem::{Mesh2D, MicromagneticFEM};
//! use spintronics::material::Ferromagnet;
//!
//! // Generate triangular mesh
//! let mesh = Mesh2D::rectangle(100e-9, 50e-9, 1e-9)?;
//!
//! // Setup micromagnetic problem
//! let material = Ferromagnet::permalloy();
//! let fem = MicromagneticFEM::new(mesh, material);
//!
//! // Solve for equilibrium magnetization
//! let m_eq = fem.solve_equilibrium()?;
//! ```
//!
//! ## References
//!
//! - A. Abert et al., "A self-consistent spin-diffusion model for micromagnetics",
//! Scientific Reports 6, 16/2016
//! - A. Vansteenkiste et al., "The design and verification of MuMax3",
//! AIP Advances 4, 107133 (2014)
pub use ;
pub use ;
pub use ;
pub use MicromagneticFEM;
pub use ;