diff --git a/.clang-uml b/.clang-uml new file mode 100644 index 00000000..52314233 --- /dev/null +++ b/.clang-uml @@ -0,0 +1,301 @@ +compilation_database_dir: build +output_directory: docs/diagrams/puml +diagrams: + timeintegration: + type: class + generate_method_arguments: full + generate_packages: false + glob: + - core/**/*.cpp + - physics/**/*.cpp + relative_to: src + package_type: directory + include: + paths: + - core + - physics + elements: + - RKmethod + - ButcherTableau + - DynamicEquation + - RungeKuttaStepper + - "RungeKuttaStepper##RungeKuttaStageExecutor" + - Stepper + - TimeSolver + - Relaxer + exclude: + namespaces: + - std + method_types: + - constructor + - destructor + plantuml: + before: + - '!theme vibrant' + - 'package Legend {' + - ' class Class' + - ' abstract class Abstract' + - ' enum Enum' + - ' class Visibility {' + - ' +public field' + - ' +public method()' + - ' -private field' + - ' -private method()' + - ' #protected field' + - ' }' + - ' Class -[hidden]-> Extension' + - ' Abstract -[hidden]-> Extension' + - ' Enum -[hidden]-> Extension' + - ' Visibility <|-- Extension : Extension' + - ' Visibility o-- Aggregation : Aggregation' + - ' Visibility +.. Nested : Nested' + - ' Visibility --> Dependency : Dependency' + - ' Visibility ..> WeakDependency : Weak dependency' + - '}' + + magnetics: + type: class + generate_method_arguments: full + generate_packages: false + glob: + - core/**/*.cpp + - physics/**/*.cpp + relative_to: src + package_type: directory + include: + paths: + - core + - physics + elements: + - Altermagnet + - Antiferromagnet + - DmiTensor + - CuDmiTensor + - Ferromagnet + - HostMagnet + - Magnet + - Minimizer + - MumaxWorld + - NcAfm + - BoundaryTraction + - CuBoundaryTraction + exclude: + namespaces: + - std + method_types: + - constructor + - destructor + layout: + Antiferromagnet: + - down: HostMagnet + - row: [NcAfm, Altermagnet] + plantuml: + before: + - '!theme vibrant' + - 'package Legend {' + - ' class Class' + - ' class Visibility {' + - ' +public field' + - ' +public method()' + - ' -private field' + - ' -private method()' + - ' }' + - ' Class -[hidden]-> Extension' + - ' Visibility <|-- Extension : Extension' + - ' Visibility o-- Aggregation : Aggregation' + - ' Visibility --> Dependency : Dependency' + - ' Visibility ..> WeakDependency : Weak dependency' + - '}' + + quantities: + type: class + generate_method_arguments: full + generate_packages: false + glob: + - core/**/*.cpp + - physics/**/*.cpp + relative_to: src + package_type: directory + include: + paths: + - core + - physics + elements: + - "DynamicParameter" + - Field + - CuField + - FieldQuantity + - InterParameter + - Parameter + - CuParameter + - VectorParameter + - CuVectorParameter + - ScalarQuantity + - Variable + - NormalizedVariable + - "ScalarQuantityEvaluator" + - "FieldQuantityEvaluator" + exclude: + namespaces: + - std + method_types: + - constructor + - destructor + plantuml: + before: + - '!theme vibrant' + - 'package Legend {' + - ' class Class' + - ' abstract class Abstract' + - ' class Template ' + - ' class Visibility {' + - ' +public method()' + - ' -private field' + - ' -private method()' + - ' #protected field' + - ' #protected method()' + - ' }' + - ' Class -[hidden]-> Extension' + - ' Abstract -[hidden]-> Extension' + - ' Template -[hidden]-> Extension' + - ' Visibility <|-- Extension : Extension' + - ' Visibility o-- Aggregation : Aggregation' + - ' Visibility --> Dependency : Dependency' + - ' Visibility ..> WeakDependency : Weak dependency' + - '}' + + strayfield: + type: class + generate_method_arguments: full + generate_packages: false + glob: + - physics/**/*.cpp + relative_to: src + package_type: directory + include: + paths: + - core + - physics + elements: + - StrayFieldExecutor + - StrayField + - StrayFieldBruteExecutor + - StrayFieldFFTExecutor + - StrayFieldKernel + exclude: + namespaces: + - std + method_types: + - constructor + - destructor + plantuml: + before: + - '!theme vibrant' + - 'package Legend {' + - ' class Class' + - ' abstract class Abstract' + - ' class Visibility {' + - ' +public method()' + - ' -private field' + - ' #protected field' + - ' #protected method()' + - ' }' + - ' Class -[hidden]-> Extension' + - ' Abstract -[hidden]-> Extension' + - ' Visibility <|-- Extension : Extension' + - ' Visibility o-- Aggregation : Aggregation' + - '}' + + domain: + type: class + generate_method_arguments: full + generate_packages: false + glob: + - core/**/*.cpp + - physics/**/*.cpp + relative_to: src + package_type: directory + include: + paths: + - core + - physics + elements: + - Grid + - System + - CuSystem + - World + exclude: + namespaces: + - std + method_types: + - constructor + - destructor + plantuml: + before: + - '!theme vibrant' + - 'package Legend {' + - ' class Class' + - ' class Visibility {' + - ' +public method()' + - ' -private field' + - ' #protected field' + - ' }' + - ' Class -[hidden]-> Dependency' + - ' Visibility o-- Aggregation : Aggregation' + - ' Visibility --> Dependency : Dependency' + - '}' + + utilities: + type: class + generate_method_arguments: full + generate_packages: false + glob: + - core/**/*.cpp + - physics/**/*.cpp + - linsolver/**/*.cpp + - bindings/wrap_mfm.cpp + relative_to: src + package_type: directory + include: + paths: + - core + - physics + - linsolver + elements: + - VoronoiTessellator + - Center + - Tile + - Int3Hash + - MFM + - PoissonSystem + - LinSolver + - "LinSolver##Stepper" + - LinearSystem + - "LinearSystem##CuData" + exclude: + namespaces: + - std + method_types: + - constructor + - destructor + plantuml: + before: + - '!theme vibrant' + - 'package Legend {' + - ' class Class' + - ' abstract class Abstract' + - ' class Visibility {' + - ' +public field' + - ' +public method()' + - ' -private field' + - ' -private method()' + - ' #protected method()' + - ' }' + - ' Class -[hidden]-> WeakDependency' + - ' Abstract -[hidden]-> WeakDependency' + - ' Visibility o-- Aggregation : Aggregation' + - ' Visibility +.. Nested : Nested' + - ' Visibility --> Dependency : Dependency' + - ' Visibility ..> WeakDependency : Weak dependency' + - '}' + \ No newline at end of file diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml new file mode 100644 index 00000000..831b1508 --- /dev/null +++ b/.github/workflows/build-wheels.yml @@ -0,0 +1,162 @@ +name: Build wheels + +on: + release: + types: [published] + workflow_dispatch: + inputs: + tag: + description: "Release tag (e.g., v1.2.1)" + required: true + +jobs: + build-wheels: + name: Build (${{ matrix.os.name }}-${{ matrix.os.version }}, CUDA ${{ matrix.cuda }}, py${{ matrix.python }}) + runs-on: ${{ matrix.os.name }}-${{ matrix.os.version }} + + strategy: + fail-fast: false + matrix: + os: + - {name: "ubuntu", version: "22.04"} + - {name: "windows", version: "latest"} + cuda: ["12.4.1"] + python: ["3.11", "3.12", "3.13", "3.14"] + + steps: + - name: Check out source + uses: actions/checkout@v6 + with: + submodules: recursive + + + - name: Set up Python + uses: actions/setup-python@v6 + with: + python-version: ${{ matrix.python }} + + - name: Install build tools + run: | + python -m pip install --upgrade pip + pip install build wheel auditwheel + + # ================ LINUX ================ + - name: Build wheel on Linux (CUDA ${{ matrix.cuda }}) + if: runner.os == 'Linux' + run: | + docker run --rm -i \ + -v $PWD:/src \ + -w /src \ + nvidia/cuda:${{ matrix.cuda }}-devel-${{ matrix.os.name }}${{ matrix.os.version }} \ + bash -euxo pipefail << 'EOF' + export DEBIAN_FRONTEND=noninteractive + + echo "=== System info ===" + uname -a + nvcc --version || true + + echo "=== Installing tools ===" + apt-get update + apt-get install -y software-properties-common + add-apt-repository ppa:deadsnakes/ppa + apt-get update + apt-get install -y python${{ matrix.python }} python${{ matrix.python }}-venv python${{ matrix.python }}-dev python3-pip cmake tzdata patchelf + + echo "=== Creating virtual environment ===" + python${{ matrix.python }} -m venv /venv + source /venv/bin/activate + python${{ matrix.python }} --version || true + pip install --upgrade pip + pip install build wheel auditwheel + + echo "=== Starting wheel build ===" + python${{ matrix.python }} -m build --wheel + + echo "=== dist contents ===" + find dist -maxdepth 2 -type f || echo "dist is empty" + + echo "=== Running auditwheel ===" + export LD_LIBRARY_PATH=/usr/local/cuda/lib64:${LD_LIBRARY_PATH} + auditwheel repair dist/*.whl -w repaired/ + auditwheel show repaired/*.whl + + echo "=== repaired contents ===" + find repaired -maxdepth 2 -type f || echo "repaired is empty" + EOF + + - name: Build source distribution tar.gz + if: runner.os == 'Linux' && matrix.python == '3.14' + run: | + echo "=== Creating clean build directory for .tar.gz --sdist ===" + mkdir clean_src + rsync -a --exclude build --exclude dist --exclude repaired --exclude '*.egg-info' ./ clean_src/ + cd clean_src + python --version + python -m pip install --upgrade pip build + python -m build --sdist + + # ================ WINDOWS ================ + - name: Install CUDA Toolkit (Windows) + if: runner.os == 'Windows' + uses: Jimver/cuda-toolkit@v0.2.35 + with: + cuda: ${{ matrix.cuda }} + + - name: Build wheel on Windows (CUDA ${{ matrix.cuda }}) + if: runner.os == 'Windows' + env: + CUDA_PATH: ${{ env.CUDA_PATH }} + run: | + cmake --version + nvcc --version + python --version + python -m pip install --upgrade pip build wheel + python -m build --wheel + + # ================ UPLOAD ================ + - name: Upload wheel artifacts + uses: actions/upload-artifact@v7 + with: + name: mumaxplus-${{ matrix.os.name }}-${{ matrix.os.version }}-cuda${{ matrix.cuda }}-py${{ matrix.python }} + path: | + dist/mumaxplus-*win*.whl + repaired/mumaxplus-*.whl + clean_src/dist/mumaxplus-*.tar.gz + + publish-artifacts: + needs: build-wheels + runs-on: ubuntu-latest + + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + + - name: Collect release files + run: | + rm -rf dist dist-pypi dist-gh-release + mkdir dist-pypi dist-gh-release + find artifacts -type f -name "*.tar.gz" -exec cp {} dist-pypi/ \; + find artifacts -type f -name "*.whl" -exec cp {} dist-gh-release/ \; + + echo "=== PyPI release files ===" + ls -lh dist-pypi + + echo "=== GitHub release files ===" + ls -lh dist-gh-release + + - name: Publish .tar.gz to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} + packages-dir: dist-pypi/ + + - name: Add wheels to release + uses: softprops/action-gh-release@v3 + with: + tag_name: ${{ github.event.release.tag_name || github.event.inputs.tag }} + files: dist-gh-release/* + overwrite: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 2ca58dd2..81f3f326 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,6 @@ cu*_*.dll docs/_build/* !docs/_build/html/ !docs/_build/html/** +test/test.ovf +test/*_000000.ovf +docs/diagrams/puml diff --git a/CITATION.cff b/CITATION.cff index e3fc329f..f49c96de 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -14,7 +14,7 @@ authors: given-names: Diego orcid: "https://orcid.org/0009-0008-3341-0555" title: "mumax⁺" -version: 1.2.0 +version: 1.2.1 date-released: 2026-04-20 url: "https://github.com/mumax/plus" preferred-citation: diff --git a/INSTALL.md b/INSTALL.md new file mode 100644 index 00000000..20365872 --- /dev/null +++ b/INSTALL.md @@ -0,0 +1,155 @@ +# Installing mumax⁺ + +mumax⁺ can be installed in various ways, listed as the various options below in order of increasing difficulty. The following flowchart may guide you to the easiest option for your situation. + +![Installation flowchart](docs/diagrams/installation/mumaxplus_installation.svg) + +## Option 1: Google Colab + +If you don't have access to an NVIDIA GPU, you can run mumax⁺ online using Google Colab. Simply make a copy of [this Jupyter notebook](https://colab.research.google.com/github/mumax/plus/blob/master/examples/colab.ipynb) and you're good to go! + +## Option 2: Installing pre-built wheels + +If you prefer to use your own GPU for more demanding simulations, you must install the mumax⁺ Python package. Pre-built wheels provide the easiest method to do so on Linux or Windows if your system has + +- Python 3.11-3.14 +- an NVIDIA GPU with Compute Capability ≥5.2 +- a CUDA driver of version ≥550.54.15 on Linux or ≥551.78 on Windows + +If these requirements are fulfilled, you can download the appropriate wheel for your system from the [most recent GitHub release](https://github.com/mumax/plus/releases/latest). + +> [!TIP] +> To check which wheel you should/can download, run `pip debug -v` to list all wheel tags that are compatible with your system. +> If none of these tags match any `.whl` filename on the GitHub release page, you will have to install mumax⁺ from source, as described in the next subsection. + +The `.whl` you downloaded can then simply be installed in your Python environment with + +```bash +pip install wheel_name.whl +``` + +All dependencies of mumax⁺ are then automatically installed in that environment. + +## Option 3: Installing from source + +mumax⁺ should work on any NVIDIA GPU. If no wheel is available for your system/GPU (or you want to contribute to mumax⁺ development), you will have to install mumax⁺ from source. + +For this, you must install the following tools yourself. +Take care to avoid **version conflicts** between these different types of software and your hardware: click the arrows for more details. + +
CUDA Toolkit + +To see which CUDA Toolkit works for your GPU's Compute Capability, check [this Stack Overflow post](https://stackoverflow.com/questions/28932864/which-compute-capability-is-supported-by-which-cuda-versions). + +* **Windows**: Download an installer from [the CUDA website](https://developer.nvidia.com/cuda-toolkit-archive). +* **Linux**: Use `sudo apt-get install nvidia-cuda-toolkit`, or [download an installer](https://developer.nvidia.com/cuda-toolkit-archive). + +> ⚠️ Make especially sure that everything CUDA-related (like `nvcc`) can be found inside your PATH. +> On Linux, for instance, this can be done by editing your `~/.bashrc` file and adding the following lines: +> +> ```bash +> # add CUDA +> export PATH="/usr/local/cuda/bin:$PATH" +> export LD_LIBRARY_PATH="/usr/local/cuda/> lib64:$LD_LIBRARY_PATH" +> ``` +> +> The paths may differ if the CUDA Toolkit was installed in a different location. + +👉 *Check CUDA installation with: `nvcc --version`* + +
+ +
A C++ compiler which supports C++17 + +* **Linux:** `sudo apt-get install gcc` + * ⚠️ Each CUDA version has a maximum supported `gcc` version, as listed in [this StackOverflow answer](https://stackoverflow.com/a/46380601). If necessary, use `sudo apt-get install gcc-` instead, with the appropriate ``. +* **Windows:** [Microsoft Visual C++](https://visualstudio.microsoft.com/downloads/) (MSVC) must be used, since CUDA does not support `gcc` on Windows. + * ⚠️ Make sure you install a version of MSVC that is compatible with your installed CUDA toolkit, as listed in [this table](https://quasar.ugent.be/files/doc/cuda-msvc-compatibility.html) (e.g., MSVC 2026 does not yet seem to be supported by CUDA as of January 2026). + * During installation, check the box to include the "Desktop development with C++" workload. + * After installing, check if the path to `cl.exe` was added to your `PATH` environment variable (i.e., check whether `where cl.exe` returns an appropriate path like `C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64`). If not, add it manually. + +👉 *Check C installation with: `gcc --version` on Linux and `where.exe cl.exe` on Windows.* + +
+ +
CPython (version ≥ 3.11), pip and miniconda/anaconda + +      All these Python-related tools should be included in a standard installation of [Anaconda or Miniconda](https://www.anaconda.com/download/success). + +👉 *Check installation with `python --version`, `pip --version` and `conda --version`.* + +
+ +### Option 3a: Installing a stable release from PyPI + +If you only need the latest stable version of mumax⁺, you should now be able to run + +```bash +pip install mumaxplus +``` + +This will install any Python dependencies of mumax⁺ and build mumax⁺ from source. + +### Option 3b: Installing a custom mumax⁺ + +If you need an older version of mumax⁺ or wish to contribute to its development, you will need Git. +Click the dropdown below to download Git if you haven't installed it yet. + +
Git + +* **Windows:** [Download](https://git-scm.com/downloads) and install. +* **Linux:** `sudo apt install git` + +👉 *Check Git installation with: `git --version`* + +
+ +First, clone the mumax⁺ Git repository using the following command, where the `--recursive` flag is used to get the pybind11 submodule that is needed to build mumax⁺. + +```bash +git clone --recursive https://github.com/mumax/plus.git mumaxplus +cd mumaxplus +``` + +We recommend to install mumax⁺ in a clean conda environment as follows. You could also skip this step and use your own conda environment instead if preferred. + +
Click to show tools automatically installed in the conda environment + +* cmake 4.0.0 +* Python 3.13 +* pybind11 v2.13.6 +* NumPy +* matplotlib +* SciPy +* Sphinx + +
+ +```bash +conda env create -f environment.yml +conda activate mumaxplus +``` + +Finally, build and install mumax⁺ using pip. + +```bash +pip install . +``` + +> [!TIP] +> If changes are made to the code, then `pip install -v .` can be used to rebuild mumax⁺, with the `-v` flag enabling verbose debug information. +> +> If you want to change only the Python code, without needing to reinstall after each change, `pip install -ve .` can also be used. + +## Check your mumax⁺ installation + +To check if you successfully compiled mumax⁺, we recommend you to run some [examples](README.md#examples) from the `examples/` directory +or to run the [tests](README.md#testing) in the `test/` directory. + +

Troubleshooting

+ +* (*Windows*) If you encounter the error `No CUDA toolset found`, try copying the files in `NVIDIA GPU Computing Toolkit/CUDA//extras/visual_studio_integration/MSBuildExtensions` to `Microsoft Visual Studio///MSBuild/Microsoft/VC//BuildCustomizations`. See [these instructions](https://github.com/NVlabs/tiny-cuda-nn/issues/164#issuecomment-1280749170) for more details. + +* (*Windows*) If you encounter errors related to interactions between CMake, MSVC and CUDA, like `-- Detecting CUDA compiler ABI info - failed`, you may try the following methods to activate an appropriate set of environment variables. One option is to run the compilation commands in the "Developer Powershell for VS 20XX" that should have been automatically installed alongside MSVC. For CUDA ≤12.9, another option is to call one of the `.bat` scripts in the folder `& C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build`, such as `vcvars64.bat`, before you run `pip install`. + +
diff --git a/README.md b/README.md index 86a719f3..86a1058a 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A versatile and extensible GPU-accelerated micromagnetic simulator written in C++ and CUDA with a Python interface. This project is in development alongside [mumax³](https://github.com/mumax/3). If you have any questions, feel free to use the [mumax⁺ GitHub Discussions](https://github.com/mumax/plus/discussions). -**Documentation, tutorials and examples can be found on the [mumax⁺ website](https://mumax.github.io/plus/).** +**Installation instructions, documentation, tutorials and examples can be found on the [mumax⁺ website](https://mumax.github.io/plus/).** ## Paper @@ -19,122 +19,11 @@ All demonstrations in the paper were simulated using version [v1.1.0](https://gi ## Installation -### Dependencies +See [INSTALL.md](INSTALL.md) or the [mumax⁺ website](https://mumax.github.io/plus/install.html) for full instructions, covering the 3 main ways you can run/install mumax⁺: -mumax⁺ should work on any NVIDIA GPU. -To get started you should install the following tools yourself. -Take care to avoid **version conflicts** between these different types of software and your hardware: click the arrows for more details. - -
CUDA Toolkit - -To see which CUDA Toolkit works for your GPU's Compute Capability, check [this Stack Overflow post](https://stackoverflow.com/questions/28932864/which-compute-capability-is-supported-by-which-cuda-versions). - -* **Windows**: Download an installer from [the CUDA website](https://developer.nvidia.com/cuda-toolkit-archive). -* **Linux**: Use `sudo apt-get install nvidia-cuda-toolkit`, or [download an installer](https://developer.nvidia.com/cuda-toolkit-archive). - -> ⚠️ Make especially sure that everything CUDA-related (like `nvcc`) can be found inside your PATH. -> On Linux, for instance, this can be done by editing your `~/.bashrc` file and adding the following lines: -> -> ```bash -> # add CUDA -> export PATH="/usr/local/cuda/bin:$PATH" -> export LD_LIBRARY_PATH="/usr/local/cuda/> lib64:$LD_LIBRARY_PATH" -> ``` -> -> The paths may differ if the CUDA Toolkit was installed in a different location. - -👉 *Check CUDA installation with: `nvcc --version`* - -
- -
A C++ compiler which supports C++17 - -* **Linux:** `sudo apt-get install gcc` - * ⚠️ Each CUDA version has a maximum supported `gcc` version, as listed in [this StackOverflow answer](https://stackoverflow.com/a/46380601). If necessary, use `sudo apt-get install gcc-` instead, with the appropriate ``. -* **Windows:** [Microsoft Visual C++](https://visualstudio.microsoft.com/downloads/) (MSVC) must be used, since CUDA does not support `gcc` on Windows. - * ⚠️ Make sure you install a version of MSVC that is compatible with your installed CUDA toolkit, as listed in [this table](https://quasar.ugent.be/files/doc/cuda-msvc-compatibility.html) (e.g., MSVC 2026 does not yet seem to be supported by CUDA as of January 2026). - * During installation, check the box to include the "Desktop development with C++" workload. - * After installing, check if the path to `cl.exe` was added to your `PATH` environment variable (i.e., check whether `where cl.exe` returns an appropriate path like `C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64`). If not, add it manually. - -👉 *Check C installation with: `gcc --version` on Linux and `where.exe cl.exe` on Windows.* - -
- -
Git - -* **Windows:** [Download](https://git-scm.com/downloads) and install. -* **Linux:** `sudo apt install git` - -👉 *Check Git installation with: `git --version`* - -
- -
CPython (version ≥ 3.11), pip and miniconda/anaconda - -      All these Python-related tools should be included in a standard installation of [Anaconda or Miniconda](https://www.anaconda.com/download/success). - -👉 *Check installation with `python --version`, `pip --version` and `conda --version`.* - -
- -### Building mumax⁺ - -First, clone the mumax⁺ Git repository. The `--recursive` flag is used in the following command to get the pybind11 submodule, which is needed to build mumax⁺. - -```bash -git clone --recursive https://github.com/mumax/plus.git mumaxplus -cd mumaxplus -``` - -We recommend to install mumax⁺ in a clean conda environment as follows. You could also skip this step and use your own conda environment instead if preferred. - -
Click to show tools automatically installed in the conda environment - -* cmake 4.0.0 -* Python 3.13 -* pybind11 v2.13.6 -* NumPy -* matplotlib -* SciPy -* Sphinx - -
- -```bash -conda env create -f environment.yml -conda activate mumaxplus -``` - -Finally, build and install mumax⁺ using pip. - -```bash -pip install . -``` - -> [!TIP] -> If changes are made to the code, then `pip install -v .` can be used to rebuild mumax⁺, with the `-v` flag enabling verbose debug information. -> -> If you want to change only the Python code, without needing to reinstall after each change, `pip install -ve .` can also be used. - -### Check the compilation - -To check if you successfully compiled mumax⁺, we recommend you to run some [examples](#examples) from the `examples/` directory -or to run the [tests](#testing) in the `test/` directory. - -

Troubleshooting

- -* (*Windows*) If you encounter the error `No CUDA toolset found`, try copying the files in `NVIDIA GPU Computing Toolkit/CUDA//extras/visual_studio_integration/MSBuildExtensions` to `Microsoft Visual Studio///MSBuild/Microsoft/VC//BuildCustomizations`. See [these instructions](https://github.com/NVlabs/tiny-cuda-nn/issues/164#issuecomment-1280749170) for more details. - -* (*Windows*) If you encounter errors related to interactions between CMake, MSVC and CUDA, like `-- Detecting CUDA compiler ABI info - failed`, you may try the following methods to activate an appropriate set of environment variables. One option is to run the compilation commands in the "Developer Powershell for VS 20XX" that should have been automatically installed alongside MSVC. For CUDA ≤12.9, another option is to call one of the `.bat` scripts in the folder `& C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build`, such as `vcvars64.bat`, before you run `pip install`. - -
- -## Floating-point precision - -mumax⁺ can use either single or double floating-point precision. -This can be controlled by the command-line argument `--mumaxplus-fp-precision` and/or the environment variable `MUMAXPLUS_FP_PRECISION`. - -See this [tutorial page](https://mumax.github.io/plus/tutorial/precision.html) or [example notebook](examples/precision.ipynb) for more details. +- online through [Google Colab](https://colab.research.google.com/github/mumax/plus/blob/master/examples/colab.ipynb), +- installing pre-built wheels from the [GitHub releases](https://github.com/mumax/plus/releases/latest), +- building from source. ## Documentation @@ -145,7 +34,7 @@ It follows the [NumPy style guide](https://numpydoc.readthedocs.io/en/latest/for make html ``` -The documentation can then be found at `docs/_build/html/index.html`. +The documentation can then be found at `docs/_build/html/index.html`. However, to generate the class diagrams you should be on a Linux device and first install [clang-uml](https://github.com/bkryza/clang-uml/tree/master) otherwise they will not be generated. ## Examples @@ -161,6 +50,13 @@ or they are interactive notebooks (`.ipynb` files), which can be run using Jupyt Several automated tests are located inside the `test/` directory. Type `pytest` inside the terminal to run them. Some are marked as `slow`, such as `test_mumax3_standardproblem5.py`. You can deselect those by running `pytest -m "not slow"`. Tests inside the `test/mumax3/` directory require external installation of mumax³. They are marked by `mumax3` and can be deselected in the same way. +## Floating-point precision + +mumax⁺ can use either single or double floating-point precision. +This can be controlled by the command-line argument `--mumaxplus-fp-precision` and/or the environment variable `MUMAXPLUS_FP_PRECISION`. + +See this [tutorial page](https://mumax.github.io/plus/tutorial/precision.html) or [example notebook](examples/precision.ipynb) for more details. + ## Contributing Contributions are gratefully accepted. To contribute code, fork our repo on GitHub and send a pull request. diff --git a/cpp_class_diagram.drawio b/cpp_class_diagram.drawio deleted file mode 100644 index cb1cba73..00000000 --- a/cpp_class_diagram.drawio +++ /dev/null @@ -1,701 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/docs/_build/html/.buildinfo b/docs/_build/html/.buildinfo index 9870a4b6..c218d28f 100644 --- a/docs/_build/html/.buildinfo +++ b/docs/_build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file records the configuration used when building these files. When it is not found, a full rebuild will be done. -config: a1fc2bb1df978096edd67086be9159df +config: be67d1c54501b70817f8e128ef2f1bab tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/_build/html/_api/mumaxplus/mumaxplus.Altermagnet.html b/docs/_build/html/_api/mumaxplus/mumaxplus.Altermagnet.html index 7f79d3f2..c28ce1e5 100644 --- a/docs/_build/html/_api/mumaxplus/mumaxplus.Altermagnet.html +++ b/docs/_build/html/_api/mumaxplus/mumaxplus.Altermagnet.html @@ -16,40 +16,45 @@ document.documentElement.dataset.mode = localStorage.getItem("mode") || ""; document.documentElement.dataset.theme = localStorage.getItem("theme") || ""; - - - - - + + - - - - + + + - + - + + + - - - + + - + - + + + @@ -57,7 +62,8 @@ - + + @@ -73,19 +79,8 @@ Back to top - - - - - - -
-
-
+ +
-
+ +
@@ -118,7 +112,8 @@ -
+ +
@@ -148,7 +143,7 @@ mumax⁺ - Home - + mumax⁺ - Home
@@ -193,15 +188,11 @@
+
@@ -304,7 +312,7 @@ - - + @@ -876,14 +876,16 @@

Altermagnet