The OOMMF eXtensible Solver (OXS) top level architecture is shown in the class diagram below. The ``Tcl Control Script'' block represents the user interface and associated control code, which is written in Tcl. The micromagnetic problem input file is the content of the ``Problem Specification'' block. The input file should be a valid MIF 2.0 file (see the OOMMF User's Guide for details on the MIF file formats), which also happens to be a valid Tcl script. The rest of the architecture diagram represents C++ classes.
All interactions between the Tcl script level and the core solver are routed through the Director object. Aside from the Director, all other classes in this diagram are examples of Oxs_Ext objects--technically, C++ child classes of the abstract Oxs_Ext class. OXS is designed to be extended primarily by the addition of new Oxs_Ext child classes.
The general steps involved in adding an Oxs_Ext child class to OXS are:
The pimake application automatically detects all files in the oommf/app/oxs/local directory with the .cc extension, and searches them for #include requests to construct a build dependency tree. Then pimake compiles and links them together with the rest of the OXS files into the oxs executable. Because of the automatic file detection, no modifications are required to any files of the standard OOMMF distribution in order to add local extensions.
Local extensions are then activated by Specify requests in the input MIF 2.0 files. The object name prefix in the Specify block is the same as the C++ class name. All Oxs_Ext classes in the standard distribution are distinguished by an Oxs_ prefix. It is recommended that local extensions use a local prefix to avoid name collisions with standard OXS objects. (C++ namespaces are not currently used in OOMMF for compatibility with some older C++ compilers.) The Specify block initialization string format is defined by the Oxs_Ext child class itself; therefore, as the extension writer, you may choose any format that is convenient. However, it is recommended that you follow the conventions laid out in the MIF 2.0 file format section of the OOMMF User's Guide.