Treecode solver for the calculation of demagnetizing field in general domains.

Cui, Zixuan; Yang, Lei; Hu, Guanghui · Phys Rev E · 2025

basic_science · Level V

Where this comes from

Abstract

The calculation of the demagnetizing field is the performance bottleneck in micromagnetic simulations that solve the Landau-Lifshitz-Gilbert equation. Although treecode is already recognized as a competitive method, achieving an O(Nlog_{8}N) algorithm for general domains remains highly challenging. In our work, we tackle two essential parts of the treecode calculation: constructing high-quality non-neighbor element patches and performing multipole expansions. For each of these crucial components, we provide robust and accurate solutions. Regarding the construction of non-neighbor elements, we have thoroughly harnessed the potential of the hierarchy geometry tree data structure. By leveraging this structure, we successfully build high-quality non-neighbor element patches for each element, striking an excellent balance between computational complexity and accuracy. In the multipole expansion part, we systematically analyze the errors arising from multipole expansions and propose a p-adaptive method based on this error analysis, further enhancing computational efficiency. Our numerical results highlight the strengths of the proposed algorithm: in general domains, we achieve the O(Nlog_{8}N) complexity of the treecode algorithm. Moreover, the p-adaptive method effectively improves the simulation efficiency of mainstream issues such as magnetic skyrmions, showing great promise for becoming a quality candidate in computational micromagnetics.