Meshes

Meshes define the discretization impressed on the simulation. There should be exactly one mesh declared in a MIF 2 file. The usual (finite) mesh type is Oxs_RectangularMesh. For simulations that are periodic along one or more axes, use the Oxs_PeriodicRectangularMesh type.

Oxs_RectangularMesh:
This mesh is comprised of a lattice of rectangular prisms. The specify block has the form
Specify Oxs_RectangularMesh:name {
cellsize { xstep ystep zstep }
atlas atlas_spec
}

This creates an axes parallel rectangular mesh across the entire space covered by atlas. The mesh sample rates along each axis are specified by cellsize (in meters). The mesh is cell-based, with the center of the first cell one half step in from the minimal extremal point (xmin,ymin,ymax) for atlas_spec. The name is commonly set to “mesh”, in which case the mesh object may be referred to by other Oxs_Ext objects by the short name :mesh.

Examples: sample.mif, stdprob3.mif, stdprob4.mif.

Oxs_PeriodicRectangularMesh:
Like the Oxs_RectangularMesh, this mesh is also comprised of a lattice of rectangular prisms. However, in this case the mesh is declared to be periodic along one or more of the axis directions. The specify block has the form
Specify Oxs_PeriodicRectangularMesh:name {
cellsize { xstep ystep zstep }
atlas atlas_spec
periodic periodic_axes
}

The atlas and cellsize values are the same as for the Oxs_RectangularMesh class. The periodic_axis value should be a string consisting of one or more of the letters “x”, “y”, or “z”, denoting the periodic direction(s). Oxs_Ext objects that are incompatible with Oxs_PeriodicRectangularMesh will issue an error message at runtime. In particular, the Oxs_Demag class supports periodicity in none or one direction, but not more. Also, some third-party extensions provide independent periodicity support using the older Oxs_RectangularMesh class rather than Oxs_PeriodicRectangularMesh.

Examples: pbcbrick.mif, pbcstripes.mif.


OOMMF Documentation Team
September 27, 2024