NeuralMag: an open-source nodal finite-difference code for inverse micromagnetics
arXiv:2411.11725 · doi:10.1038/s41524-025-01688-1
Abstract
We present NeuralMag, a flexible and high-performance open-source Python library for micromagnetic simulations. NeuralMag leverages modern machine learning frameworks, such as PyTorch and JAX, to perform efficient tensor operations on various parallel hardware, including CPUs, GPUs, and TPUs. The library implements a novel nodal finite-difference discretization scheme that provides improved accuracy over traditional finite-difference methods without increasing computational complexity. NeuralMag is particularly well-suited for solving inverse problems, especially those with time-dependent objectives, thanks to its automatic differentiation capabilities. Performance benchmarks show that NeuralMag is competitive with state-of-the-art simulation codes while offering enhanced flexibility through its Python interface and integration with high-level computational backends.
References in corpus (11)
- PyTorch: An Imperative Style, High-Performance Deep Learning Library
- The design and verification of Mumax3
- Micromagnetics and spintronics: Models and numerical methods
- Inverse-design magnonic devices
- magnum.fe: A micromagnetic finite-element simulation code based on FEniCS
- Topology Optimized and 3D Printed Polymer Bonded Permanent Magnets for a Predefined External Field
- Fidimag -- a finite difference atomistic and micromagnetic simulation package
- Boris Computational Spintronics -- High Performance Multi-Mesh Magnetic and Spin Transport Modelling Software
- A fast finite-difference algorithm for topology optimization of permanent magnets
- Accurate finite-difference micromagnetics of magnets including RKKY interaction -- analytical solution and comparison to standard micromagnetic codes
- Proposal for a micromagnetic standard problem: domain wall pinning at phase boundaries