Getting Started

Building the Python Module#

Ferrolith requires a C++17 compiler, CUDA (tested with 12.5), and NetCDF. All other dependencies (Eigen, H2Lib, AMGCL, pybind11) are fetched automatically by CMake.

cmake -B build -DFERROLITH_PYTHON=ON
cmake --build build -j$( …

Python API Reference

Field Classes#

All field classes follow the same interface:

  • compute(magnetization) – returns the effective field as an (n, 3) array
  • energy(magnetization) – returns the energy as a scalar (Joules)

Magnetization m is always an (n, 3) array of …