FastMag micromagnetic simulator framework

FastMag is a computational framework for simulating magnetization/spin dynamics in ultra-complex magnetic systems. FastMag can handle complex structures meshed over tetrahedral meshes as large as 150 million elements. It allows modeling a host of magnetic systems, such as magnetic recording heads, media, and arrays of magnetic nanoparticles.

The efficiency of FastMag derives from fast computational methods for effective field calculation and time integration as well as their efficient implementations on massively parallel computing systems.

Available Modules
General magnet simulator Energy barrier simulator Granular media simulator with Voronoi tessellation Magnetic particle simulator
Applications Features Platforms
Generic placeholder image

Magnetic Write Head

FastMag used for simulating switching of a magnetic write head of 5 x 3 x 5 micron size with the tip of 50 nm and with a 4 turn coil. On the left is a snapshot of the z component of magnetization during switching; the entire head is meshed with mesh edge resolution of 10 nm. with 126 million elements.. On the right is the computational time for simulating the magnetization dynamics over 1 ns simulation time. The mesh had the edge length of 10 nm in the tip and nearby volumes and the largest edge length in the rest of the structure was as specified in the first column. The simulations were run on a desktop with Intel Xeon X5482 CPU with 32 GB CPU RAM and NVIDIA GTX 480.

Generic placeholder image

Magnetic Islands

FastMag used for simulating reversal in a large array of magnetic islands with material and position random distributions. On the left is a snapshot of the z component of magnetization during reversal. On the right is the corresponding computational time per simulation time step for different array size. Each island is discretized in a certain umber of mesh elements. The simulations were run on a desktop with Intel Xeon X5482 CPU with 32 GB CPU RAM and NVIDIA GTX 480.


FastMag used for simulating skyrmion. One particular form of the skyrmions is found in magnetic materials that break the inversion symmetry and where the Dzyaloshinskii-Moriya interaction plays an important role. They form "domains" as small as a 1 nm (e.g. in Fe on Ir(111)). The small size of magnetic skyrmions makes them a good candidate for future data storage solutions. Physicists at the University of Hamburg have managed to read and write skyrmions using scanning tunneling microscopy.[10] The topological charge, representing the existence and non-existence of skyrmions, can represent the bit states "1" and "0".

Selected reference

1. R. Chang, S. Li, M. Lubarda, B. Livshitz, V. Lomakin, “FastMag: Fast micromagnetic simulator for complex magnetic structures,” J. Appl. Phys., vol. 109, p. 07D358, 2011.

2. S. Li, D. Van Orden, and Vitaliy Lomakin, “Fast periodic interpolation method for periodic unit cell problems,” IEEE Transactions on Antennas and Propagation, vol. 58, no. 12, pp. 8463-8483, 2010.

3. S. Li, B. Livshitz, and V. Lomakin, “Fast evaluation of Helmholtz potential on graphics processing units (GPUs),” Journal of Computational Physics, vol. 229, pp. 8463-8483, 2010.

4. S. Li, B. Livshitz, and V. Lomakin, “Graphics Processing Unit accelerated O(N) micromagnetic solver,” IEEE Transactions on Magnetics, vol. 46, no. 6, pp. 2373 - 2375, 2010.

5. B. Livshitz, A. Boag, H. N. Bertram, and V. Lomakin, “Non-uniform grid algorithm for fast magnetostatic interactions calculation in micromagnetics,” Journal of Applied Physics, vol. 105, p. 07D541, 2009.


We demonstrated a GPU implementation of the widely used Object Oriented Micromagnetic Framework (OOMMF), showing up to 35x GPU-CPU acceleration. The implementation is such that most of the user-related OOMMF components are unchanged and only the lower-level modules are ported to GPU. This allows OOMMF users to run their models as before but at greater speed.

OOMMF is a project in the Applied and Computational Mathematics Division (ACMD) of ITL/NIST, aimed at developing portable, extensible public domain programs and tools for micromagnetics.

The implementation is open-sourced. If it helps with your research, we will appreciate it if you refer the following artical in the publications.

S. Fu, W. Cui, M. Hu, R. Chang, M.J. Donahue, V. Lomakin, "Finite Difference Micromagnetic Solvers with Object Oriented Micromagnetic framework (OOMMF) on Graphics Processing Units," Magnetics, IEEE Transactions on, vol.PP, no.99, pp.1-1


Available GPU Modules

Modules In Preparation


Test problem: cubic magnetic particle

Test environment: Windows (64 bit), Nvidia GTX690 (2GB memory), Intel Xeon E5-1650@3.2Hz

Measured in CPU Wall Time/Field Evaluation in [ms]

Euler Method

Problem Scale (#Cells) GPU (single prec.) GPU (double prec.) CPU-1 thread (double prec.) CPU-6 thread (double prec.)
4K (163) 0.91 (1.8x) 1.18 (1.4x) 1.65 0.71 (2.3x)
32K (323) 1.59 (8.8x) 2.99 (4.7x) 14.00 5.49 (2.5x)
256K (643) 5.64 (25.0x) 17.58 (8.0x) 140.7 51.56 (2.7x)
2M (1283) 42.75 (29.1x) 148.1 (8.4x) 1242.9 470.1 (2.6x)
4M (128x128x256) 102.2 (34.8x) N/A 3556.4 993.4 (3.6x)

Runge-Kutta-Fehlberg Step54S Method

Problem Scale (#Cells) GPU (single prec.) GPU (double prec.) CPU-1 thread (double prec.) CPU-6 thread (double prec.)
4K (163) 0.84(2.7x) 0.84(2.7x) 2.24 0.51(4.4x)
32K (323) 0.94 (19.4x) 2.36(7.8x) 18.29 3.90(4.7x)
256K (643) 5.23 (34.3x) 17.35(10.4x) 179.54 39.29(4.6x)
2M (1283) 46.63 (31.1x) 153.20(9.5x) 1450.9 324.9(4.5x)
4M (128x128x256) 94.58 (31.1x) N/A 3040.9 680.3(4.5x)

Study of magnetization dynamics in magnetic nanostructures

We use our codes to study magnetization dynamics mechanisms in magnetic nanostructured materials. These mechanisms include dynamics of magnetization reversal in composite and patterned media for ultra-high density magnetic recording, composite media for microwave assisted magnetic recording, heat-assisted magnetic recording, as well as magnetic random access memory elements. Our interests also are in the study of spin transfer torque phenomena and spin waves. This research is conducted in collaboration with the research groups in the Center for Magnetic Recording Research at UCSD as well as our industrial partners.

Selected reference

1. J.E. Martin, M.V. Lubarda, V. Lomakin, P.O. Jubert, "Effect of Thermal Fluctuations on the Performance of Particulate Media". Magnetics, IEEE Transactions on. Jul. 2013.

2. A. Singh, S. Gupta, M. Kuteifan, M. Lubarda, V. Lomakin, O. Mryasov, "Effect of Interlayer Exchange Coupling Parameter on Switching Time and Critical Current Density in Composite Free Layer". Journal of Applied Physics. May, 2014.

3. M. A. Escobar, M. V. Lubarda, S. Li, R. Chang, B. Livshitz, and V. Lomakin, “Advanced Micromagnetic Analysis of write head dynamics using FastMag,” IEEE Transactions on Magnetics. 2012 May;48(5):1731-7.

4. I. Yulaev, M. Lubarda, S. Mangin, V. Lomakin, and Eric E. Fullerton, “Spin-transfer-torque reversal in perpendicular anisotropy spin valves with composite free layers,” Applied Physics Letters, vol. 99, p. 132502, 2011.

5. M. Lubarda, S. Li, B. Livshitz, E. E. Fullerton, and V. Lomakin, “Antiferromagnetically-coupled capped bit patterned media for high-density magnetic recording,” Applied Physics Letters, vol. 98, p. 012513, 2011.

6. M. Lubarda, S. Li, B. Livshitz, E. E. Fullerton, and V. Lomakin, “Reversal in bit patterned media with vertical and lateral exchange,” IEEE Transactions on Magnetics, January, 2010, vol. 47, no. 1, pp. 18-25, 2011.

Analytic and computational methods in Electromagnetics

The investigation of the photonic and magnetic nanostructures is based on the development of sophisticated analytical models and efficient numerical. We develop efficient analytical and numerical methods to compute electromagnetic/optical/magnetic fields in complex configurations. Many of these methods are based on integral formulation methodology.

Our study of electromagnetic, optical, and magnetic fields in complex structures relies on the developments of efficient analytic and computational methods. In terms of computational methods, we are currently most interested in integral equation type approaches. These approaches are developed for computing electromagnetic field in systems comprising finite and infinite periodic distributions of scatterers in free space or in layered medium backgrounds.

  • Field representations in complex structures: We are developing hybrid spectral schemes to represent fields and Green’s functions for periodic arrays, layered media, and other related environments. The goal is to obtain rapidly convergence representations for a wide range of parameters for frequency and time domain fields.
  • Fast iterative integral equation methods: We are developing schemes for the rapid evaluation of the convolutions between Green’s functions and given source distributions. Here, we explore the understanding of the aforementioned Green’s function behavior to develop efficient numerical schemes. The fast methods are being developed for free-space, layered medium, and periodic backgrounds. One goal is to introduce kernel independent methods that seamlessly work for low-, high-, and mixed frequency problems in various (complex) background types.
  • Parallelization on new hardware architectures: We are developing highly efficient codes for evaluating static and dynamic electromagnetic fields in large scale configurations on GPUs. Out codes running on a desktop computer with a single GPU can solve the N-body problem of computing electromagnetic fields with N being as large as 160 million for static and low-frequency problems and several tens of millions for high-frequency problems. The obtained GPU-CPU speed-ups are in the range from 70 to 400 depending on the particular problem type, problem size, and accuracy.

Selected reference

1. R. Chang, V. Lomakin, "Quadrilateral Barycentric Basis Functions for Surface Integral Equations", Antennas and Propagation, IEEE Transactions on. Dec. 2013.

2. R. Chang, V. Lomakin, "A method for identifying global loop basis functions for surface integral equations", Antennas and Propagation Society International Symposium (APSURSI), Jul. 2014.

Electromagnetic phenomena in photonic nanostructures

Out interests are to study various electromagnetic phenomena supported by isolated nano-scale metallic/plasmonic or dielectric elements as well as arrayed elements residing in free space or coupled with structured and layered metal-dielectric surfaces. The study is geared towards identifying novel applications of the investigated structures and phenomena including subwavelength lasers as well as wave guiding and focusing structures for surface microscopy.

  • Nano-sized metal-dielectric composite elements have a number of interesting properties that can lead to important applications. Many metals in the optical (e.g. near-IR and visible) regimes operate as plasmas characterized by a negative real part of the permittivity. Due to this property nano-sized metal particles can support resonances at wavelength much greater than their size, which can be used in various novel applications. One of our projects is to design and fabricate a laser of size smaller than the wavelength in all three dimensions. An important component of this study is to reduce the inherent radiation and dissipation losses in subwavelength resonators [3].
  • Nano-scale elements coupled with metal-dielectric surfaces can support an even richer variety of optical phenomena, many of which are only possible due to the interaction between the arrays and surfaces (see an example in Fig. 2). We are studying wave phenomena supported by isolated and arrays nano-particles associated with interaction between various field types, including resonant fields supported by isolated nanoparticles, traveling waves supported by linear nanoparticle arrays, surface waves/surface plasmon polaritons supported by metal-dielectric surfaces, as well as various leaky waves appearing due to these interactions (e.g. [4-12]).
  • Twisted arrays of nanoparticles.
Generic placeholder image

Time evolution of the electric field supported by a straight chain of gold nano-bumps of size (100nmx100nm) residing directly on a gold surface ([6]). The field is shown in the horizontal plane at 50 nm from the top edge of the nano-bumps. The structure is excited by a dipole source relatively far from the chain. This source excited a surface plasmon polariton on the gold surface, which is scattered from the chain.

Generic placeholder image

Time evolution of the electric field supported by a chain of gold nano-bumps of size (100nmx100nm) residing directly on a gold surface and having a 90 degree bend ([6]). The field is shown in the horizontal plane at 50 nm from the top edge of the nano-bumps. The structure is excited by a dipole placed near the left bottom end of the chain. This source excites a surface plasmon polariton on the gold surface as well as a traveling wave along the chain. The surface plasmon polariton is scattered from the chain. The traveling wave propagates without radiation loss along the chain and it also propagates through the sharp edge.

Selected reference

1. V. Lomakin, Y. Fainman, Y. Urzhumov, and G. Shvets, "Doubly negative metamaterials in the near infrared and visible regimes based on thin films," Optics Express, vol. 14, n. 23, pp. 11164-11177, 2006.

2. V. Lomakin, Y. Fainman, Y. Urzhumov, and G. Shvets, "Optical metamaterials based on thin metal films: From negative index of refraction to enhanced transmission," SPIE, San Diego, California, August 2007 (invited).

3. A. Mizrahi, V. Lomakin, B.A. Slutsky, M.P. Nezhad, L. Feng, and Y. Fainman, "Low threshold gain metal coated laser nanoresonators," Optics Letters, vol. 33, no. 11, pp. 1261-1263, 2008.

4. L. Feng, K.A. Tetz, B. Slutsky, V. Lomakin, and Y. Fainman, "Fourier plasmonics: Diffractive focusing of in-plane surface plasmon polariton waves", Applied Physics Letters, vol. 91, 081101, 2007.

5. D. Van Orden, Y. Fainman, and V. Lomakin, "Optical waves on nano-particle chains coupled with metal-dielectric surfaces," Conference on Lasers and Electro-Optics (CLEO/QELS), San Jose, California, May 2008.

6. V. Lomakin, M. Lu, and E. Michielssen, "Optical wave properties of nano-particle chains coupled with a metal surface," Optics Express, vol. 15, pp. 11827-11842, 2007.

7. V. Lomakin, S.Q. Li, and E. Michielssen, "Manipulation of stop-band gaps of periodically perforated conducting plates," IEEE Microwave and Wireless Components Letters, vol. 15, no. 12, pp. 919-921, 2005.

8. V. Lomakin and E. Michielssen, "Enhanced transmission through metallic plates perforated by arrays of subwavelength holes and sandwiched in between dielectric slabs," Physical Review B, vol. 71, no. 23, pp. 235117 - 1-10, 2005.

9. V. Lomakin, S. Li, and E. Michielssen, "Plane wave transmission through metal plates perforated by periodic arrays of through-holes of subwavelength coaxial cross-section," Microwave and Optical Technology Letters, vol. 49, no. 7, pp. 1554-1558, 2007.

10. V. Lomakin and E. Michielssen, "Beam transmission through periodic sub-wavelength hole structures," IEEE Transactions on Antennas and Propagation, vol. 55, no. 6, pp. 1564-1581, 2007.

11. V. Lomakin and E. Michielssen, "Transmission of transient plane waves through perfect electrically conducting plates perforated by periodic arrays of subwavelength holes," IEEE Transactions on Antennas and Propagation, vol. 54, no. 3, pp. 970-984, 2006.

12. V. Lomakin, N.W. Chen, S. Q. Li, and E. Michielssen, "Enhanced transmission through two-period arrays of sub-wavelength holes," IEEE Microwave and Wireless Components Letters, vol. 14, no. 7, pp. 355-357, 2004.