MagTense - a micromagnetism and magnetostatic framework
Project description
MagTense version 2021
MagTense consists of both a magnetostatic and a micromagnetism calculation framework.
The magnetostatic framework can calculate the magnetic field from objects shaped as cylinders, pieces of cylinders, prisms, circular pieces and tetrahedrons. This is done using a fully analytical calculation of the demagnetization tensor. The framework is fully implemented in Fortran and has both a Matlab MEX interface and a Python interface.
The micromagnetism framework solves the Landau-Lifshitz equation. The framework is fully implemented in Fortran and has a Matlab MEX interface and a Python interface, as well as an older Matlab implementation. The micromagnetism framework utilizes the magnetostatic framework for calculating the demagnetization field.
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/.
Usage with Matlab
MagTense is directly useable in Matlab on Windows by downloading the already compiled MEX-files in Releases. The files are directly useable with no compilation required, although Matlab 2018a or greater is required. Examples of how to calculate magnetostatic and micromagnetic problems using the Matlab interface can be found in matlab/examples.
Compilation with a Visual Studio project file
If you want to compile MagTense with a Visual Studio project file for Windows, MagTense.sln, is available, as well as a Matlab function to build the MEX-files, buildMagTenseMEX.m. MagTense utilizes Intel MKL for the micromagnetic simlations and can also utilize CUDA and CVODE.
Usage with Python interface
Instructions on how to build and use the Python interface are listed in python/. Installation is recommended via conda
package manager (requires Python 3.9 or 3.10). Additionally, binary installers for the Python interface are available at the Python
Package Index (PyPI).
-
[ Optional CUDA support] Find matching
${CUDA_VERSION}
from https://anaconda.org/nvidia/cuda, and append the channel to your conda environment:conda config --env --append channels nvidia/label/cuda-${CUDA_VERSION}
-
Install
magtense
conda install magtense
-
[ CUDA toolkit not present ] Install CUDA runtimes
conda install -y -c "nvidia/label/cuda-11.4.4" libcusparse libcublas cuda-cudart # Windows: Development package is required conda install -y -c "nvidia/label/cuda-11.7.0" libcusparse-dev libcublas-dev cuda-cudart-dev
Current code development
The main features being worked on at the moment are:
- Proper code documentation
- Non-uniform grids
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
Built Distributions
Hashes for magtense-2.1.0+cuda117-py310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e29fdadf840cb349ee8725163afefcb5cdcc8fa8dbc088a488c74c13746bb657 |
|
MD5 | 042eba152037aed110951382512f4e3b |
|
BLAKE2b-256 | f5d8c00e6973dd92ce6e903ae091cf03d040edf2e0767d93b92374d4ac89489f |
Hashes for magtense-2.1.0+cuda117-py310-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c87f0e455ab8a9915c7ffa5b4bb1502ae755357a600870a93fd2f140e78840dc |
|
MD5 | 4d28fb5d4f52b01797c601cdd050c4d2 |
|
BLAKE2b-256 | 2fbc4deb21e25c9a7b319b432ae20873852fb73293f16f5ea2efb2532b3ccc9d |
Hashes for magtense-2.1.0+cuda117-py39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3115edd734ba8182d73e49ef4fa718c6af99484c9c4f880a155643f0f5d6371c |
|
MD5 | 5ffd6912d8d6c28669c2a8b79c447001 |
|
BLAKE2b-256 | d6775e19ad9683567d54bc02a6c50be2389b4135ae22d586bb66b0229c7574c2 |
Hashes for magtense-2.1.0+cuda117-py39-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f54e147b9b6a2292826f637551d7f61e39b1664855a094e5c30ab12abdd05e16 |
|
MD5 | 7907fcbdc5bb12831b8157edeaaef1b0 |
|
BLAKE2b-256 | 6eeccaa8adcb3ff7829ed9d1cfed765901e4c4d5cabf57c3ce37b65a0755d7f4 |
Hashes for magtense-2.1.0+cuda116-py310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b74a579f572393fd550614107d5ed35f0058c68ee196eb24ece154b84a35cfb0 |
|
MD5 | 69c6eb0e6c7865cb0f4156c7b769e0ad |
|
BLAKE2b-256 | 4ca1cab6e91b31e6642a86e0af24240e3d3d170ff65f549a78925bb6e0fb7e27 |
Hashes for magtense-2.1.0+cuda116-py310-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4e5210c362844bf63601aedd12ae9837aa547194d796104c3b77a15b2cecba8 |
|
MD5 | 60feecda65c5887d2d32d7b0f7e0574d |
|
BLAKE2b-256 | c5aa7c6056a0bda349fbc90ecea115fad7822b8050839ee3a5938f6ecc55f7bb |
Hashes for magtense-2.1.0+cuda116-py39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 236fbc52ab5642864832cf66e46e32abd6e3d7e012841e884452d14811330e70 |
|
MD5 | 4cd3e8d6453f1c87d8be87cb074dd68e |
|
BLAKE2b-256 | ab067c1b285066e21a0ef19fedb540ec3546b89998cfe44f45f1d0d9a875c73c |
Hashes for magtense-2.1.0+cuda116-py39-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59a26476d3dad6a15823a930aefa18713b6fa7e76e0e687014a9c6899d756710 |
|
MD5 | 87c060f60c8aad62247052ffa5eb92d6 |
|
BLAKE2b-256 | d3c5c9f75b68d108a7d07e3fd3213681b3dad778f5980f3409319d87661fcf4d |
Hashes for magtense-2.1.0+cuda114-py310-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5f7511db1bed964d49556b37df32cbb056f1da8d04ae4686524804ffc600da2 |
|
MD5 | 4df62d59e1e76bf4a5ec8dcc2b71a223 |
|
BLAKE2b-256 | 257b39a45d45953d86a50c86ba0d1690b4ea9c3836196535f9615db62ac850e4 |
Hashes for magtense-2.1.0+cuda114-py39-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e490f909bae42be35a9386a303a05604a69c0a12f45b44b1aa6da3139e63f93d |
|
MD5 | 2a476291a100f50107c9ffb8cac8f320 |
|
BLAKE2b-256 | 06c25dff71989e6ad559073535067888d0096a41fc497b699fe4ec9b7abb4428 |
Hashes for magtense-2.1.0+cpu-py310-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3cb13700cd70648c05f5d9882ca387045b718edbf5e65b93b086a2c7d2e1040 |
|
MD5 | 8f3967d1ea72e53cbf059c5a6906c1b8 |
|
BLAKE2b-256 | 7af6df4567440d519873c780365848e9beca2f59e71ae0818953d872a928c2b5 |
Hashes for magtense-2.1.0+cpu-py310-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa84937710f661e790deee826d399e873551c2993aee1c55321717ac1e001c1d |
|
MD5 | fb51a027a7b0e1fcc4b5eccadad80e81 |
|
BLAKE2b-256 | 7fdf278960701ef5a0c78cd4a44eb264c230a8d27206265b470cd8af89409bad |
Hashes for magtense-2.1.0+cpu-py39-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8c68a0cd765b038f8a1f194b3996e3a4cde257d495c671cdb85853446548129 |
|
MD5 | f6c171f08e2e7128761c958cc005e1b9 |
|
BLAKE2b-256 | 561ae7bde7359e07318d610d05ba52484fb5e7318ce693360c1ad6ab26342e22 |
Hashes for magtense-2.1.0+cpu-py39-none-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd641ebd7ec4f4550bb26184a335ce48cac0158c7fa32a11face9863b595513c |
|
MD5 | 6d7900f0896d86ee8a614971c1f5b33f |
|
BLAKE2b-256 | 1f9d682557bbaea87ceaf2b21a6cdc345e7e2b108d711f07c5228a94c6b31295 |