CuPyMag: GPU-Accelerated Finite-Element Micromagnetics with Magnetostriction

ORAL

Abstract

Functional magnetic materials often contain defects and grain boundaries with curved geometries across multiple length scales, which contribute to non-trivial magnetoelastic interactions. Capturing these effects makes micromagnetic simulation particularly demanding. To overcome this challenge, we introduce our recently developed program: CuPyMag, a Python framework with a GPU-resident workflow. After a one-time CPU assembly with Numba JIT, all subsequent operations are tensorized using CuPy's BLAS-accelerated backend. This design ensures high GPU utilization and minimizes host-device communication. In addition, we use the Gauss-Seidel projection method for stable and efficient time integration, and an ellipsoid theorem for the far-field effect of the demagnetization field. As a result, a magnetoelastic coupled system with 3M nodes is completed in 3 hours on a single H200 GPU. This efficiency expands the scope of micromagnetic simulations towards realistic, large-scale material problems that can guide experiments.

*The work was supported by the grant DE-SC0024227 funded by the U.S. Department of Energy, Office of Science.

Publication: Hongyi Guan and Ananya Renuka Balakrishna, "CuPyMag: GPU-Accelerated Finite-Element Micromagnetics with Magnetostriction," arXiv preprint arXiv:2510.09812 (2025).

Presenters

  • Hongyi Guan

    • University of California, Santa Barbara

Authors

  • Hongyi Guan

    • University of California, Santa Barbara
  • Ananya Renuka Balakrishna

    • University of California Santa Barbara