Chapter 3 Micromag – The Distributed Micromagnetics Program
3.3 Micromag Structure
Micromag program consists of seven packages: MicromagSchema, MicromagUtil, MicromagDB, MicromagJSP, MicromagService, MicromagRuntime and MicromagSVG.
MicromagSchema is a Java package compiled from the XML schema. It provides functions such as marshalling Java class objects into XML stream and unmarshalling XML stream into Java class objects. This package also does unit conversion between SI system and intrinsic dimensionless unit system. A similar C# package compiled from the XML schema is available for C# web services.
MicromagUtil is a Java package that provides the mathematic operations. This package includes complex routines, Fast Fourier Transform routines, magnetostatic tensor routines and data compression/decompression routines.
MicromagDB is a Java package provides communication with database. Several tables are defined in database. Their corresponding data access objects are implemented with Enterprise Java Beans (EJB) and wrapped as Java web services. The web services proxy provides table management operations through XML Remote Procedure Call (SOAP-RPC) invocations in network.
the web based user interface for Micromag. It provides functions for users to define every detail of a micromagnetics computing task, modify, submit and retrieve results of the computing task. This package handles concurrent requests from multiple users.
MicromagRuntime is a Java package that solves the LLG equation. It parses the program control configurations provided in a XML format text file, initializes computing tasks, calculates all field and energy terms, evaluates LLG equation, integrates evolution time steps, performs hysteresis loop and reports computing results and logs.
MicromagService is a sub-package of the MicromagRuntime package. It provides web services for the magnetostatic field term calculation and is deployed separately in web servers. A similar package in C# is available for C# web services for magnetostatic field and energy calculation.
MicromagSVG is composed of server XML Stylesheet Transformer (XSLT) and XML Scalable Vector Graphics (SVG) files as well as Javascript source files embedded in HTML pages. It is a post-processing tool that provides transformation and visualization of computation results in web graphics. MicromagSVG can display simulation results in an interactive way. Vector variables are displayed as an arrow scaled by their normalized magnitude. The composite RGB color of vector variables are calculated from their component values, with red represents x component, green represents y component and blue represents z component. Scalar variables are displayed as squares whose sizes are scaled to their normalized magnitude. Scalar variables are rendered in the user defined colors of their associated materials. The opacity of each cell is scaled to the normalized magnitude of the variable it is rendering. Figure1 illustrates a SVG graphics of the vortex state of a cubic magnetic sample.
Figure 1. Vortex state of cubic sample in problem#3
MicromagDB, MicromagService and MicromagDB are deployed in Java Application Servers while the corresponding C# packages are deployed in Internet Information Servers. Java packages are platform independent and work for all operating systems that supporting Java. C# packages work for Microsoft Windows only. MicromagRuntime is a separate Java package that runs outside an application server. It retrieves computing tasks from a priority task queue in the application server and does the simulations. Users can download this package to perform computing locally.
The complexities to carry out individual field terms are different. The applied field is given and does not need computation. The anisotropy field is local and therefore its complexity is O N
( )
whereN is the total number of cells in a magnetic sample. The exchange field sums over the nearest neighbor only while the maximum number ofneighbors is 6 for three dimensional calculations (4 for 2D model). The complexity is alsoO N
( )
. The most intensive field term is the pair-wise demag term. Its complicity is( )
2O N . Since the demag field in its entirety can be expressed as a convolution of the demag tensor matrix and the spin vector matrix, Fast Fourier Transformation treatment reduces its complexity toO N