A full-fledged micromagnetic code in less than 70 lines of NumPy
Claas Abert, Florian Bruckner, Christoph Vogler, Roman Windl, Raphael, Thanhoffer, Dieter Suess

TL;DR
This paper introduces a concise, 70-line Python code for micromagnetic simulations using NumPy, enabling efficient computation of exchange and demagnetization fields, serving as a foundation for developing new algorithms.
Contribution
The paper provides a complete, minimalistic micromagnetic simulation code in Python, demonstrating how to implement core algorithms with fewer lines for educational and development purposes.
Findings
Code is under 70 lines, making it highly accessible.
Uses NumPy for efficient array operations and convolution.
Serves as a starting point for developing advanced micromagnetic algorithms.
Abstract
We present a complete micromagnetic finite-difference code in less than 70 lines of Python. The code makes largely use of the NumPy library and computes the exchange field by finite differences and the demagnetization field with a fast convolution algorithm. Since the magnetization in finite-difference micromagnetics is represented by a multi-dimensional array and the NumPy library features a rich interface for this data structure, the presented code is a good starting point for the development of novel algorithms.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
