Python + CUDA FFT solver for the demagnetising field arising from a magnetisation distribution on a regular Cartesian grid.
The demagnetising field is computed as a convolution in Fourier space of the geometric (pre-computed) demagnetising tensor
All computation on the GPU is performed in single precision.
The demagnetising tensor is computed once via a C implementation using openMP parallelisation on the host, and transferred to the GPU.
Due to odd-even symmetries and diagonal symmetry of the demagnetising tensor, only 6 of 9 components are stored and approximately 1/8 of all interaction distances computed.
The calculated field is accurate down to the noise floor of single precision.
The flux-closure domain state minimises the in-plane demagnetising field at the expense of the out-of-plane component.
CUDA >= 11.0
Python >= 3.10
cuPy
NumPy