llg3d.solvers.math_utils¶
Mathematical utility functions for solvers.
Functions
|
Compute cross product \(a \times b\). |
|
Normalize the magnetization array (in place). |
- cross_product(a, b)[source]¶
Compute cross product \(a \times b\).
This implementation is faster than np.cross for large arrays.
- Parameters:
a (ndarray) – First vector (shape (3, nx, ny, nz))
b (ndarray) – Second vector (shape (3, nx, ny, nz))
- Returns:
Cross product \(a \times b\) (shape (3, nx, ny, nz))
- Return type:
ndarray