Skip to content

mumax 3.12

Latest

Choose a tag to compare

@JonathanMaes JonathanMaes released this 20 Apr 12:21
· 14 commits to master since this release

Besides a variety of new shapes, this update introduces several useful functions like CustomQuantity(slice) which can turn a Go slice into a custom quantity. In combination with the new CellIndices() or the old LoadFile(), NewScalarMask() or NewVectorMask(), this enables the efficient generation of custom fields inside .mx3 scripts. It is now also possible to automatically interrupt minimize() and relax() after a given real time has passed. As always, new functions prefixed by ext_ may exhibit unintuitive behavior in some edge cases, so always double-check their output when used in more complex simulations (e.g., with moving windows or rotating systems).

Important bugfixes include restoring the ability to obtain stray fields in regions where Msat==0, and a scaling issue in ExchCoupling and DindCoupling.

Changelog

New functionality in input scripts

New functions

  • CustomQuantity(slice): turns a *data.Slice into a Quantity, allowing more complex fields to be used in operations like Add, Mul, ... without having to abuse builtin quantities. A slice can be made with, e.g., NewScalarMask, LoadFile, ... #384 by @jplauzie.
  • CellIndices(): returns a 4D *data.Slice with the index ix, iy, iz of each cell, starting at 0 in the (-X, -Y, -Z) corner. #384.
  • CurrentMag(): returns a snapshot of the current magnetization as a Config. #388 by @jplauzie.
  • ext_grainboundaries(startregion, numgrains, offset, boundarythickness, zeroflag): generates grain boundaries as regions. Given a distribution of regions, the region index of cells in regions startregion to startregion+numgrains that lay within boundarythickness of a region boundary will be incremented by offset. See also: ext_grainboundary_edgeX etc. #387 by @jplauzie.
  • ExpectB(msg, have, want): technical function for test scripts that panics if two bools are not equal. #392.

New Shapes

  • Superball(diameter, p): smooth interpolation between cube (p=∞), circle (p=1), octahedron (p=0.5) and beyond. #374 by @JLeliaert.
  • Line(x1, y1, z1, x2, y2, z2, diam, linecap) and Line2D(x1, y1, x2, y2, diam, linecap): lines of a given diameter in 3D and 2D, respectively, with a few different options for the line caps. #383 by @JonathanMaes.
  • VoxelShape(voxels, dx, dy, dz): elements >0.5 in the slice voxels become dx $\times$ dy $\times$ dz cuboids at the corresponding position, with the center of the slice at the origin. Introduced in #311 by @Artemkth, exposed to users in #390 by @jplauzie.
  • ext_AllRegionShapes(): returns a function func(int) which, given a region index, yields its corresponding Shape. #385 by @jplauzie.
  • ext_geomEdge(axis): returns a Shape of all cells on an edge of the geometry. axis can be +X, -X, +Y, -Y, +Z, -Z. #386 by @jplauzie.

New variables

  • MinimizeWallClockTime and RelaxWallClockTime: if set to a positive value, Minimize() and Relax() will be interrupted after this amount of real-time seconds unless they converge earlier. #388 by @jplauzie.
  • NREGION: read-only value representing the maximum number of regions (=256). #389 by @jplauzie.
  • ext_grainboundary_edgeX, Y, Z: affects the behavior of ext_grainboundaries() at the edges of the simulation box. #387 by @jplauzie.

Other changes

  • Minimize() and Relax() now return a boolean value indicating whether convergence was achieved. #388 by @jplauzie.

Bugfixes

  • A fix in 3.11.1 made B_demag unavailable where Msat == 0, preventing users from obtaining stray fields. Fixed in #381, originally reported by @ac2290.
  • ExchCoupling and DindCoupling were 4x or 6x larger than they should be. Fixed in #377, originally reported by Elizabeth Martín Jefremovas.
  • -http flag had no effect on GUI port when running multiple files in a queue (e.g., mumax3 -http="" file1 file2 served GUI regardless).
  • Warning for extreme aspect ratios (>100) will no longer throw a fatal error. Changed in #382, originally requested by @janmasell.
  • Warnings for non-7-smooth grid and high aspect ratios did not appear log.txt. Fixed in #382.
  • Region 256 was allowed in some places. Fixed in #389.