arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1411.7188physics.comp-ph
收藏

不到70行NumPy的成熟微磁代码

A full-fledged micromagnetic code in less than 70 lines of NumPy

Claas Abert, Florian Bruckner, Christoph Vogler, Roman Windl, Raphael Thanhoffer, Dieter Suess

摘要:

我们在不到70行的Python中提供了一个完整的微磁有限差分代码。该代码大量使用NumPy库,通过有限差分计算交换场,并使用快速卷积算法计算退磁场。由于有限差分微磁学中的磁化由多维数组表示,并且NumPy库为这种数据结构提供了丰富的接口,因此所提供的代码是开发新算法的良好起点。

英文摘要:

We present a complete micromagnetic finite-difference code in less than 70 lines of Python. The code makes largely use of the NumPy library and computes the exchange field by finite differences and the demagnetization field with a fast convolution algorithm. Since the magnetization in finite-difference micromagnetics is represented by a multi-dimensional array and the NumPy library features a rich interface for this data structure, the presented code is a good starting point for the development of novel algorithms.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑