不到 70 行 NumPy 代码实现的全功能微磁学程序
计算物理
2015-05-20 v2
摘要
我们展示了一个完整的微磁学有限差分代码,其 Python 实现少于 70 行。该代码大量使用 NumPy 库,通过有限差分计算交换场,并利用快速卷积算法计算退磁场。由于有限差分微磁学中的磁化强度由多维数组表示,而 NumPy 库为该数据结构提供了丰富的接口,因此所提出的代码是开发新算法的良好起点。
引用
@article{arxiv.1411.7188,
title = {A full-fledged micromagnetic code in less than 70 lines of NumPy},
author = {Claas Abert and Florian Bruckner and Christoph Vogler and Roman Windl and Raphael Thanhoffer and Dieter Suess},
journal= {arXiv preprint arXiv:1411.7188},
year = {2015}
}