Content area

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.

Details

1009240
Business indexing term
Title
NeuralMag: an open-source nodal finite-difference code for inverse micromagnetics
Author
Abert, C. 1 ; Bruckner, F. 1 ; Voronov, A. 2 ; Lang, M. 3 ; Pathak, S. A. 3 ; Holt, S. 3 ; Kraft, R. 2 ; Allayarov, R. 1 ; Flauger, P. 1 ; Koraltan, S. 4 ; Schrefl, T. 5 ; Chumak, A. 1 ; Fangohr, H. 6 ; Suess, D. 1 

 University of Vienna, Faculty of Physics, Vienna, Austria (GRID:grid.10420.37) (ISNI:0000 0001 2286 1424) 
 University of Vienna, Faculty of Physics, Vienna, Austria (GRID:grid.10420.37) (ISNI:0000 0001 2286 1424); University of Vienna, Vienna Doctoral School of Physics, Vienna, Austria (GRID:grid.10420.37) (ISNI:0000 0001 2286 1424) 
 Max Planck Institute for the Structure and Dynamics of Matter, Hamburg, Germany (GRID:grid.469852.4) (ISNI:0000 0004 1796 3508); Center for Free-Electron Laser Science, Hamburg, Germany (GRID:grid.466493.a) (ISNI:0000 0004 0390 1787) 
 TU Wien, Institute of Applied Physics, Vienna, Austria (GRID:grid.5329.d) (ISNI:0000 0004 1937 0669) 
 University for Continuing Education Krems, Department for Integrated Sensor Systems, Krems, Austria (GRID:grid.15462.34) (ISNI:0000 0001 2108 5830) 
 Max Planck Institute for the Structure and Dynamics of Matter, Hamburg, Germany (GRID:grid.469852.4) (ISNI:0000 0004 1796 3508); Center for Free-Electron Laser Science, Hamburg, Germany (GRID:grid.466493.a) (ISNI:0000 0004 0390 1787); University of Southampton, Southampton, UK (GRID:grid.5491.9) (ISNI:0000 0004 1936 9297) 
Publication title
Volume
11
Issue
1
Pages
193
Publication year
2025
Publication date
2025
Publisher
Nature Publishing Group
Place of publication
London
Country of publication
United States
e-ISSN
20573960
Source type
Scholarly Journal
Language of publication
English
Document type
Journal Article
Publication history
 
 
Online publication date
2025-06-21
Milestone dates
2025-06-02 (Registration); 2024-11-19 (Received); 2025-06-02 (Accepted)
Publication history
 
 
   First posting date
21 Jun 2025
ProQuest document ID
3223874822
Document URL
https://www.proquest.com/scholarly-journals/neuralmag-open-source-nodal-finite-difference/docview/3223874822/se-2?accountid=208611
Copyright
Copyright Nature Publishing Group 2025
Last updated
2025-07-23
Database
ProQuest One Academic