Skip to main content

MagTense - a micromagnetism and magnetostatic framework

Project description

MagTense Logo

MagTense

MagTense is a framework for magnetostatic and micromagnetic calculations.

Features

  • Interfaces for MATLAB and Python, with the core implemented in Fortran for speed;
  • Fully analytical calculation of demagnetization tensor for cylinders, pieces of cylinders, prisms, circular pieces and tetrahedrons;
  • Micromagnetic solutions of the Landau-Lifshitz equations, using the analytical demagnetization tensor described above;
  • GPU-accelerated code with CUDA® (requires NVIDIA graphics card).
  • Uses Intel MKL for the micromagnetic simlations and can also utilize CVODE.
  • Tested in Linux and Windows 11+ (macOS not supported at the moment).

Installation and usage with the Python interface

Installation is recommended via pip (requires >=Python 3.12):

pip install magtense

Examples of how to calculate magnetostatic and micromagnetic problems using the Python interface can be found python/examples/.

Installation and usage with the Matlab interface

MagTense is directly useable in Matlab on Windows by downloading the MEX-files in Releases. Only Matlab 2023a or greater is required.

Examples of how to calculate magnetostatic and micromagnetic problems using the Matlab interface can be found in matlab/examples.

Building from source

If you want to build MagTense yourself this is certainly also an option. If you want to compile MagTense on Linux we provide a Makefile, which also works on Windows, where we also provide a Visual Studio project file, MagTense.sln.

For Python you can find detailed instructions for building the Python interface with the Fortran core here.

For Matlab MEX-files, we provide a Matlab function called buildMagTenseMEX.m that works on both OS. You can find more information here.

Further documentation

The webpage of the code is available at https://www.magtense.org.

The TechManual on the code is available at https://cmt-dtu-energy.github.io/MagTense.

Citation

If you use this package in a publication, or simply want to refer to it, please cite the paper below:

@article{BJORK2021168057,
title = {MagTense: A micromagnetic framework using the analytical demagnetization tensor},
journal = {Journal of Magnetism and Magnetic Materials},
volume = {535},
pages = {168057},
year = {2021},
issn = {0304-8853},
doi = {https://doi.org/10.1016/j.jmmm.2021.168057},
url = {https://www.sciencedirect.com/science/article/pii/S0304885321003334},
author = {R. Bj{\o}rk and E. B. Poulsen and K. K. Nielsen and A. R. Insinga},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

magtense-2.2.5-1-py313-none-win_amd64.whl (638.0 kB view details)

Uploaded Python 3.13Windows x86-64

magtense-2.2.5-1-py313-none-manylinux1_x86_64.whl (706.7 kB view details)

Uploaded Python 3.13

magtense-2.2.5-1-py312-none-win_amd64.whl (638.0 kB view details)

Uploaded Python 3.12Windows x86-64

magtense-2.2.5-1-py312-none-manylinux1_x86_64.whl (706.7 kB view details)

Uploaded Python 3.12

File details

Details for the file magtense-2.2.5-1-py313-none-win_amd64.whl.

File metadata

  • Download URL: magtense-2.2.5-1-py313-none-win_amd64.whl
  • Upload date:
  • Size: 638.0 kB
  • Tags: Python 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for magtense-2.2.5-1-py313-none-win_amd64.whl
Algorithm Hash digest
SHA256 52f3334c67801fe6f560d27c10e52735c59a70ec1ee37ba35be7696085a11bf0
MD5 47d5153f7157159a508284e7d58e6acb
BLAKE2b-256 c366a2d1912bf59064d5d27046c556f8457a893044079609f2a42b21f5499a81

See more details on using hashes here.

Provenance

The following attestation bundles were made for magtense-2.2.5-1-py313-none-win_amd64.whl:

Publisher: deployment.yml on cmt-dtu-energy/MagTense

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file magtense-2.2.5-1-py313-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for magtense-2.2.5-1-py313-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 096d4daf426b2abf3d22c5eabd241ff7f2037de246ae616bcc2e7628a7226ab2
MD5 b289fcfc8d08ee49fd6587b68d26eb40
BLAKE2b-256 4f54f10c5d31f2cfd64db15a645b6643285e4fc23806c8c06ed46a8c99e1ed6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for magtense-2.2.5-1-py313-none-manylinux1_x86_64.whl:

Publisher: deployment.yml on cmt-dtu-energy/MagTense

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file magtense-2.2.5-1-py312-none-win_amd64.whl.

File metadata

  • Download URL: magtense-2.2.5-1-py312-none-win_amd64.whl
  • Upload date:
  • Size: 638.0 kB
  • Tags: Python 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for magtense-2.2.5-1-py312-none-win_amd64.whl
Algorithm Hash digest
SHA256 dcbda5ef69169cd2e2e0d3ca1ccc6a38dd19eac3b3b20e4c7e87f1ed3b546414
MD5 eb0e14f4213d33a4583824cc57f657f8
BLAKE2b-256 134d30192ad2d0213a1ba845daa37ac8be16fdf0e982c207aeb4e59a68582b16

See more details on using hashes here.

Provenance

The following attestation bundles were made for magtense-2.2.5-1-py312-none-win_amd64.whl:

Publisher: deployment.yml on cmt-dtu-energy/MagTense

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file magtense-2.2.5-1-py312-none-manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for magtense-2.2.5-1-py312-none-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 69e7ae8e24b3b6f7e1739d9ece36fc5c3bc8a9fc9c93be0ed5dbfb827c87fae4
MD5 630e5622c2a49202888edc45c5f47bb7
BLAKE2b-256 95af253355b028e9781fe693c4256698410ba03b5fc586833ff3e9632ccc203e

See more details on using hashes here.

Provenance

The following attestation bundles were made for magtense-2.2.5-1-py312-none-manylinux1_x86_64.whl:

Publisher: deployment.yml on cmt-dtu-energy/MagTense

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page