.. image:: ./logo.png
:width: 400
:alt: magnum.np Logo
#####################################
magnum.np 2.0.1
#####################################
magnum.np is a Python library for the solution of micromagnetic problems with the finite-difference
method. It implements state-of-the-art algorithms and is based on `pytorch `__,
which allows to seamlessly run code either on GPU or on CPU. Simulation scripts are written in
Python which leads to very readable yet flexible code. Due to `pytorch `__
integration, extensive postprocessing can be done directly in the simulations scripts. Alternatively,
results can be written to PVD files and postprocessed with `Paraview `__.
Furthermore `pytorch `__'s autograd feature makes it possible to solve
inverse problems without significant modifications of the code. This manual is meant to give you
both a quick start and a reference to magnum.np.
**Version 2.0:** The magnum.np interface slightly changed since version 2.0.
Find more details about the necessary changes and the motivation `here `__.
The following table summarizes the most important syntax changes:
********
Features
********
* Explicit / Implicit time-integration of the Landau-Lifshitz-Gilbert Equation
* Fast FFT Demagnetization-field computation optimized for small memory footprint
* Fast FFT Oersted-field optimized for small memory footprint
* Fast FFT Vector-Potential optimized for small memory footprint
* Periodic Boundary Conditions in 1D, 2D, and 3D (True and Pseudo-Periodic)
* Non-Equidistant Mesh for Multilayer Structures
* Arbitrary Material Parameters varying in space and time
* Spin-torque model by Slonczewski
* Spin-torque model by Zhang and Li
* Spin-Orbit torque (SOT)
* Antiferromagnetic coupling layers (RKKY)
* Dzyaloshinskii-Moriya interaction (interface, bulk, D2d)
* String method for energy barrier computations
* `Eigenmode Solver `__ for efficient calculation of normal modes
* Sophisticated domain handling, e.g. for spatially varying material parameters
* efficient `Voronoi Code `__ for 2D and 3D problems (including intergrain phase)
* Seamless VTK import / export via `pyvista `__
* Inverse Problems via `pytorch `__'s autograd feature
*************
List of Demos
*************
* `Slonczewski Spin Torque `__ (`Colab `__)
* `Softmagnetic Composite `__ (`Colab `__)
* `Spin Orbit Torque `__ (`Colab `__)
* `Standard Problem #4 `__ (`Colab `__)
* `Standard Problem #5 `__ (`Colab `__)
* `Standard Problem DMI `__ (`Colab `__)
* `Standard Problem Domainwall Pinning `__ (`Colab `__)
* `Standard Problem FMR `__ (`Colab `__)
* `Standard Problem RKKY `__ (`Colab `__)
* `Stochastic Integration `__ (`Colab `__)
* `Dispersion Calculator `__ (`Colab `__)
.. toctree::
:maxdepth: 1
:caption: Contents:
installation
changes
getting_started
field_terms
demos
state_and_materials
eigensolver
voronoi
nonequidistant
inverse_cube
logging
********
Citation
********
If you use magnum.np in your work or publication, please cite the following reference:
[1] Bruckner, Florian, et al. "magnum.np -- A pytorch based GPU enhanced Finite Difference Micromagnetic Simulation Framework for High Level Development and Inverse Design", Scientific Reports volume 13, 12054 (2023).
************
Contributing
************
Contributions are gratefully accepted.
The source code is hosted on `www.gitlab.com/magnum.np/magnum.np `__.
If you have any issues or question, just open an issue via gitlab.com.
To contribute code, fork our repository on gitlab.com and create a corresponding merge request.
******************
Indices and tables
******************
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`