The Object Oriented Micromagnetic Framework project (OOMMF) is a collection of intercommunicating modules providing a complete, public domain package for micromagnetics. There are modules for display, control, and solving micromagnetic programs, as well as auxiliary programs for analysis, project building and maintenance. The existing solver in this framework, mmSolve2D, is a relatively monolithic code limited to solving 2D problems. A new solver is currently being developed, the OOMMF eXtensible Solver (OXS), which is not only fully 3D capable, but is also quite modular, allowing integration of new modules with no modification to existing code, and complete sub-module selection at runtime.
The central controlling class in OXS is the unique Oxs_Director object. During program initialization this object is created and is fed the problem specification (input) file. This file contains a sequence of Specify blocks, which have a simple form as illustrated by this example:
Specify Oxs_UniaxialAnisotropy:AnisA { K1 5.2e5 axis { 0 0 1 } }This block causes the Oxs_Director object to create an instance of an Oxs_UniaxialAnisotropy object, with instance name AnisA. The character string between the first curly brace and its mate, called the object initialization string, is fed to the AnisA object at the time of its construction. The details of the interpretation of the object initialization string are up to the author of the Oxs_UniaxialAnisotropy class, but are here rather straightforward: the anisotropy coefficient K1 is set to 5.2 x 105 J/m3, and the easy axis direction is set parallel to the z-coordinate axis.
The Oxs_UniaxialAnisotropy class is an example of the general Oxs_Ext (extension) class. Nearly all the objects in OXS inherit from this class (the notable exception being the Oxs_Director class), and are constructed at runtime by the Oxs_Director as requested by Specify blocks in the input file. The Oxs_Director maintains an index of all these objects, and provides facilities to access the objects, by either the end user or by each other. This provides a great deal of flexibility, because the user selects at runtime exactly which modules he wants to use, and how many of each. In addition to energy terms like the Oxs_UniaxialAnisotropy example above, entities like the discretization mesh, evolution control object, evolution step algorithm (e.g., particular Landau-Lifshitz ODE solvers or energy minimization routines) and material property distribution are all Oxs_Ext objects, and are all selected at runtime via Specify blocks in the input file.
The modular architecture of OXS provides not only flexibility at runtime, but also makes it easy to introduce new modules. The steps in adding a new Oxs_Ext class to OXS are:
In conclusion, the Oxs_Ext extension class provides OXS with a flexible, modular architecture. This architecture allows a micromagnetic solver to be essentially constructed at runtime out of the available Oxs_Ext classes. Moreover, new Oxs_Ext classes may be easily written and added to OXS, by both OOMMF and third party developers.
michael.donahue@nist.gov