Changelog#
2024.08 (Sep 03, 2024)#
Added#
Changed#
micromagneticmodel
Require the name when initialising the
system
. (#85)
Fixed#
micromagneticdata
Set
valid="norm"
when loading the initial magnetisationdrive.m0
. (#69)
- all packages
Full compatibility with
numpy >= 2.0
.
2024.06 (Jun 19, 2024)#
Fixed#
Restricted numpy
version to be less than 2.0
due to incompatibilities with
the current code base.
2023.11 (Nov 25, 2023)#
Changed#
discretisedfield
The property
mesh.points
has been renamed tomesh.cells
to avoid ambiguity. (#508)
Fixed#
2023.10 (Oct 23, 2023)#
The meta-package ubermag
now uses calendar-based versioning. We use a style
that is broadly inspired by Ubuntu: we use the year and the month and optionally
a patch (YYYY.0M[.patch]
). We omit the number for patch 0
and only add
and increase patch
when there are two releases in a month. The versioning is
not related to the type of changes (and a patch
does not necessarily mean a
bug fix). For the type of changes please refer to this changelog or the versions
of the individual packages, which follow semantic versioning.
Breaking changes in discretisedfield
#
discretisedfield
has been refactored to support scalar and (m-dimensional)
vector fields on n-dimensional meshes. As part of this refactoring, several
inconsistencies and ambiguities have been removed. These changes break existing
code! The following summary lists all user-facing changes (removed, renamed,
added functionality). Even though the list below is fairly long, most notebooks
only require a few changes. The most common ones are the switch dim -> nvdim
and adding valid='norm'
when creating a field, and the replacement
plane -> sel
.
The shape of the domain (i.e. the shape of the region/mesh) is now referred to
as dim
, the shape of the field values as vdim
(vector/value dimension).
Region
Modified: scaling a region is now done with the method
scale
, the option to scale a region by multiply it with a number has been removed. Scaling can optionally be done in-place.New: regions can be translated in space with
translate
. Translating can optionally be done in-place.Modified: a new method
allclose
checks if two regions are the same within numerical accuracy, the operator now==
checks for exact equality.Modified: the operator
|
has been replaced with the new methodfacing_surface
Removed: properties
p1
andp2
, usepmin
andpmax
Changed: the return type of points (e.g.
pmin
,pmax
,centre
) is now anumpy.ndarray
Changed:
unit
has been renamed tounits
and is a tuple to supports different units along different directions (only used as labels on plots, not for calculations).New: property
ndim
to get the number of dimensions of the space.New: property
dims
, names of the spatial dimensions.New: method
rotate90
to perform 90 degree rotations of the region.
Mesh
Modified: a new method
allclose
checks if two regions are the same within numerical accuracy, the operator now==
checks for exact equality.Modified: inconsistent behaviour of
mesh[subregion]
; this operator will now always use closed intervals, i.e. the returned submesh is now always inclusive of endpoints.Modified: the operator
|
has been replaced with a new method calledis_aligned
.Removed:
axispoints
(was deprecated), usepoints
instead.Removed:
neighbours
Renamed and modified:
plane
has been replaced with a newsel
method. (for details refer to the Field documentation)Removed:
attributes
Removed:
dS
; was used for integrals; the new syntax for integrals does not any longer use it (see below).Renamed:
midpoints
topoints
Modified: new method
coordinate_field
that was previous part of theField
class.New:
scale
andtranslate
similar to theRegion
class.New: method
rotate90
to perform 90 degree rotations of the mesh.
Field
Modified: getting the value at a point (
field(...)
) now returns anumpy.ndarray
.Modified: only field values are returned when iterating over a field. (documentation)
Removed:
coordinate_field
is now part of theMesh
class.Renamed and modified:
derivative
->diff
; now supports holes inside the field. (documentation)Modified: new integration syntax. (documentation)
Renamed:
fromfile
->from_file
Renamed and modified:
plane
has been replaced with a newsel
method. (documentation)Removed:
project
has been removed, usemean
with theaxis
argument instead.Renamed:
write
->to_file
Modified:
angle
now takes a vector as reference and does not anymore require sliced fields.Renamed:
dim
->nvdim
to avoid ambiguities, the new name is also required as an argument when creating a field.Renamed:
components
->vdims
Renamed:
units
->unit
Removed:
value
, to update field values use the new methodupdate_field_values
instead, to read data use thearray
property.Removed:
zero
class method; omit thevalue
argument to create a field filled with zeros (was already supported before).New: method
resample
to compute field values on a new mesh; the nearest points will be used, interpolation is not supported. (documentation)New: property
valid
to define parts that contain material; this can be set to the field norm on init using the optionalvalid='norm'
argument. (documentation)Modified: new hdf5 format to store all field information (e.g. subregions were missing before). (documentation)
New: Documentation for performing FFT on the
Field
class (documentation).New: method
rotate90
to perform 90 degree rotations of the field. (documentation).Modified: Differential operators
grad
,div
,curl
, andLaplacian
have been generalised to n dimensions.Plotting with holoviews now uses
field.valid
to hide data (e.g. based on their norm). Thenorm_filter
property as well as theDefaults
class for plotting have been removed. Usevalid="norm"
when initialising the field. (#475)
Added#
Changed#
ubermagutil
An additional summary line is printed for the progress bar context manager. Users will see the additional line when using
oommfc
ormumax3c
time drives or min drives withverbose=2
. This was added because the progress bar in the notebook is not persistent across sessions. (#39)
Fixed#
micromagneticmodel
Wrong value of \(\mu_B\). (#79)
mumax3c
Bug in mumax3 detection when passing the full path to the mumax3 executable. (commit b2c334d)
Bug in current conversion for Zhang-Li. (#73)
oommfc
0.66.1 (Feb 3, 2023)#
Fixed#
0.66.0 (Oct 20, 2022)#
Added#
discretisedfield
Reading and writing for
Field
objects now supportspathlib.Path
objects. Furthermore, the code has been reorganised (mostly invisible for end users, a newio
submodule has been added). (#158)Subregions are saved in a json file (
<field-name>.<extension>.subregions.json
) when saving a field and automatically loaded when a field is loaded from disk and the json file exists. (#158, #163)
micromagneticdata
Subregion information is loaded when accessing magnetisation fields (if available). (#35)
Callbacks can be registered in the drive object to apply any sort of processing (e.g. calculating the normalised field or topological charge density) before returning individual fields in a drive. (#35)
Support for slicing in getitem in Drive, e.g.
drive[::2]
will return a new drive object that only contains every second magnetisation file. (#35)
oommfc
Subregion information is loaded when using
compute
(if available). (#116)
Changed#
discretisedfield
micromagneticdata
Holoviews plotting now reads data from disk when it is accessed in the plot. This greatly improves the initial rendering of the plot and can avoid memory problems. Note that on slow file systems updating the plot when moving a slider might take more time. (#35)
Fixed#
discretisedfield
Missing initialisation when computing
field.orientation
for a field with zero norm in some cells. (commit 4a8fca4)
0.65.0 (Jul 17, 2022)#
Changed#
discretisedfield
micromagneticdata
Rewrite of the
to_xarray
method to improve performance and reduced memory consumption. The maximum memory consumption is now roughly equivalent to the on-disk size of the data. The old method had a roughly doubled peak memory consumption. (#33)
micromagneticmodel
Fix the LaTex representation of Landau-Lifshitz-Gilbert equation in the presence of Zhang-Li and Slonczewski torque terms. (#52)
0.64.0 (Jul 03, 2022)#
mumax3c
A new package
mumax3c
has been added and allows users to use mumax3 as a new calculator in addition to OOMMF.
0.63.0 (Jun 29, 2022)#
Added#
discretisedfield
Support for interactive plots based on Holoviews with
Field.hv
convenience method,Field.hv.scalar
,Field.hv.vector
, andField.hv.contour
. Refer to the package documentation for details. (#140)
micromagneticdata
Two new drive classes
OOMMFDrive
andMumax3Drive
have been added. Users should not create these directly. Instead the genericDrive
class should be used which automatically creates an object of the correct sub-type depending on the information found for the respective drive. (#29)Interactive Holoviews-based plotting for drives with
drive.hv
property. It provides the same functionality asField.hv
. (#26)
micromagneticmodel
User-defined name for a Zeeman energy term is displayed in its LaTex representation in the Jupyter notebook. (#45)
Containers (
system.energy
andsystem.dynamics
) have a new methodget(type=...)
to get all terms in the container that have the specified type. (# 50)Containers (
system.energy
andsystem.dynacmics
) now supportcontainer[index]
(__getitem__
) to obtain a term by its index. (#50)
oommfc
The input for OOMMF (
mif
file and related files) can now be created without starting the actual simulation usingDriver.write_mif(...)
. (#104)A drive (call to OOMMF) can be sent to a scheduling system such as Slurm using
Drive.schedule(...)
. All input files (mif
file and related files) are created from the running Python program. The user must pass the submission command of the scheduling system and a “header” file that defines system resources as required for the scheduling system. Furthermore, it is the user’s responsibility to ensure that OOMMF is available inside the scheduled job (e.g. by loading the correct conda environment in the header file). The command line to call OOMMF is added to the header file, the file is saved to the drive directory and subsequently a job is submitted to the scheduling system. (#104)The
OOMMFRunner
classes take an additional argumentdry_run
to return the OOMMF command call instead of calling OOMMF from a subprocess. (#104)
ubermagutil
Changed#
discretisedfield
Vector fields with zero values can now be normalised. The rescaling of the vectors is only done for non-zero values. (#149)
mag2exp
All functions do now operate on
discretisedfield.Field
objects instead ofmicromagneticmodel.System
objects. Therefore, measurements can be simulated for data that has not been created with a micromagnetic simulation as long as the data can be represented as adiscretisedfield.Field
object. (#31)
micromagneticmodel
Comparison of
micromagneticmodel.Term
objects (e.g.micromagneticmodel.Exchange
) now takes into account all attributes of the two terms. Previously, only the names of the two terms were compared. (#46)
oommfc
The
overhead
function now runs the simulations in a temporary directory. (#110)
Fixed#
discretisedfield
Wrong normalisation of the lightness component in lightness plots if not all angles are covered. (commit 2de6360)
Checks if a point is inside a
Region
(point in region
) give wrong results if the points are inside the region in some spatial direction and at the region boundary (outside within the numerical precision) in the other spatial directions failed despite the point being in the region. (#153)
micromagneticdata
data[index]
returns a drive for drive numbersindex
larger than the maximum drive number on disk (by computing module of index). (#24)
oommfc
0.62.1 (Jun 09, 2022)#
Fixed#
discretisedfield
Importing
discretisedfield
fails on some platforms becauseopenh264
is missing. (#146)
0.62.0 (May 22, 2022)#
Added#
discretisedfield
Support for exporting
Field
object to thexarray.DataArray
withto_xarray
instance method (#123).Support for initiating
Field
object from thexarray.DataArray
withfrom_xarray
class method (#123).New implementation for initialising a field from an other field with much better performance (example: initial field with
n=(100, 100, 10)
, new field withn=(10, 10, 10)
, speedup ~1000). This method does e.g. also speed up theField.plane
method (#135).The
__contains__
operator for the region (the in operatorregion1 in region2
) uses a new method to calculate the distance between the points to improve stability when edge points of the regions are very close and differences are mainly related to floating-point inaccuracies. This is done by introducing a new region propertytolerance_factor
(with a default value1e-12
) that is internally multiplied with the minimum of the edge lengths to obtain values for relative and absolute tolerance (#135).Refactoring of the matplotlib-based plotting methods for
df.Field
(df.Field.mpl...
) improve performance of the plot creation (#133).Refactoring of
df.Region.mpl
to show the correct aspect ratio of the region. This automatically also applies to the matplotlib-based plotting methods ofdf.Mesh
. A new keywordbox_aspect
(defaultbox_aspect='auto'
) can be used to set an arbitrary aspect ratio by passing a tuple. For the default value'auto'
the aspect of the region is used. You may run into problems with overlapping ticks or axis labels. These cannot currently be dealt with easily in an automatic fashion and require manual adjustment after the plot is created (by passing an axis object) if proper axis ticks and labels are required (#134).New implementation for reading and writing
vtk
files. Files can now be written in textual (txt
), binary (bin
) or xml (xml
) representation. The field data is now stored to vtk cell data (previously: point data). Some subsequent plotting operations in other tools (e.g. plotting isosurfaces) typically requires a conversion from cell data to point data in that tools first (e.g. by using a filter in Paraview).discretisedfield
can still read the old vtk files (with the values stored as point data) and tries to do that automatically when the provided file can’t be read with the new method. In particular for writing huge speedups compared to the old implementation are possible (example:n=(200, 200, 100)
written in binary representation, speedup > 1000). By default data is written in binary format. (#129)A
units
property has been added to theField
class to store the units of the field values. Note, that units are mostly used for plotting and are removed during all mathematical operations. Units are automatically read fromovf
files if present. (#141)An additional class method
coordinate_field
has been added to theField
class. It takes a mesh and creates a 3d vector field with values equal to the coordinates of the respective cell midpoints. (#144)
micromagneticdata
Support for converting all magnetisation data of a
Drive
into anxarray.DataArray
withto_xarray
instance method. (#18)Multiple drives of the same type (with the same independent variable
drive.x
can be combined into a newmicromagneticdata.CombinedDrive
. Combining is also supported viadrive1 << drive2
which “appends”drive1
todrive2
. The combined drive allows iteration over all magnetisation snapshots of the individual drives. (#22)
oommfc
When using the
TimeDriver
withverbose=2
a simple status bar is displayed to show the simulation progress. Note, that the shown information is only a rough hint as the progress is measured based on the total number of stepsn
and the number of files already written to disk. (#100)
ubermagutil
Removed#
Fixed#
discretisedfield
Changes in the calculation of the demag tensor to avoid zero-division problems and
nan
values in the demag field. (#137)
oommfc
Using the
DockerOOMMFRunner
did not work in combination with SELinux because the directiories inside the docker image were not readable/writable. TheDockerOOMMFRunner
now has an additional optional argument to enable read/write access with SELinux (#95).
0.61.2 (Mar 17, 2022)#
Fixed#
0.61.0 (Feb 22, 2022)#
General#
Support Cnv, D2d, and T(O) crystallographic class DMI and magneto-elastic (MEL) extensions in conda-installed Ubermag on Windows, in addition to MacOS and Linux.
Added#
discretisedfield
Support for
filter_field
in plotting methodField.mpl.lighness
.HTML representation for
Region
,Mesh
,Field
, andFieldRotator
inside Jupyter notebook (#105).New implementation for the Field initialisation significantly improves performance when initialising a field with a dictionary. Speedups of up to ~10_000 can be obtained if the dictionary does not contain callables. (#114, #117)
New implementation for reading and writing
ovf
(omf
) files with huge performance improvements. For aField
containing 1 million cells we obtained the following execution times (on a standard notebook):mode
filesize
reading
writing
old
new
speedup
old
new
speedup
bin4
2.9M
1730 ms
21 ms
82
63000 ms
56 ms
1125
bin8
5.8M
1860 ms
52 ms
52
64000 ms
84 ms
762
text
15M
4920 ms
401 ms
12
69000 ms
4510 ms
15
The new default is
bin8
(binary represenation with double precision) instead oftxt
(#121).
oommfc
Enables Cnv, D2d, and T(O) crystallographic class DMI and magneto-elastic (MEL) extensions on Windows hosts (no more need for Docker).
ExeOOMMFRunner
can be used on Windows. Limitation: On Windows it is not possible to run multiple simulations in parallel without using Docker.OOMMF output is now by default written in binary format (double precision). There is a new option in the driver’s
drive
method (ovf_format
) to change the output format (#77).OOMMF can now run silently without anything printed. To use it pass the option
verbose=0
to<DRIVER>.drive
. The default isverbose=1
which prints one summary line about the used runner and the runtime. This is the old behaviour. (#80).
Changed#
discretisedfield
Keywords for
Field.mpl()
renamed toscalar_kw
andvector_kw
(#108).
micromagneticmodel
Variable names for time-dependent fields and currents changed (for consistency reasons).
Fixed#
discretisedfield
Simultaneous use of
filter_field
andsymmetric_clim
inField.mpl.scalar
resulted in wrong colorbar limits (#106).
oommfc
Specifying two Zeeman fields with H defined via a
df.Field
broke the simulation (#191)The name of the hysteresis field of the
HysteresisDriver
has been renamed toB_hysteresis
. This solves an issue of having two magnetic fields with the same name if a hysteresis simulation is performed with an additional zeeman field.
0.60.0 (Oct 1, 2021)#
General#
Unified website containing all documentation: https://ubermag.github.io
Versions in sync across all packages
Switch to Jupyter lab 3 (should improve situation with
K3d
inside Jupyter lab).
Added#
discretisedfield
Fourier transform for
discretisedfield.Field
(reference).Custom labels for vector components in
discretisedfield.Field
(reference).New plotting interface for
discretisedfield.Field
anddiscretisedfield.Region
for bothmatplotlib
andK3d
. Plotting functions can be accessed asField.mpl.*
(and for convenienceField.mpl()
) formatplotlib
and similarly forK3d
.Improved lightness plotting and new contour line plot.
Full support for complex values in
discretisedfield.Field
.Rotations of
discretisedfield.Field
objects (documentation).discretisedfield.Field
now supports allnumpy ufuncs
.Calculation of the demag tensor and demag field in
discretisedfield.tools
(reference).
mag2exp
New subpackage
mag2exp
to simulate experimental measurement (documentation).
micromagneticmodel
Generalisation of OOMMF extensions
DMI_Cnv
andDMI_D2d
to support grains oriented alongx
,y
, orz
(new names, e.g.DMI_Cnv_z
) (documentation).Support for arbitrary time-dependence for external magnetic fields (
micromagneticmodel.Zeeman
) and spin-polarised currents (micromagneticmodel.Slonczewski
andmicromagneticmodel.ZhangLi
) (documentation).
oommfc
Support for OOMMF extension
Xf_ThermHeunEvolver
,Xf_ThermSpinXferEvolver
, andUHH_ThetaEvolve
for simulations at finite temperature.Control over the default runner in
oommfc
viaoommfc.runner
object (documentation).
ubermag
Convenient control over logging of all subpackages via
ubermag.setup_logging
(documentation).
ubermagtable
Fourier transform for
ubermagtable
(documentation).
Fixed#
discretisedfield
Wrong colourbar positioning in
discretisedfield.mpl*
in figures containing multiple subplots.Fixed aspect ratio for
quiver
plots indiscretisedfield.Field
.
micromagneticmodel
Creating a term
micromagneticmodel.Slonczewski
twice with the same dictionary forP
orLambda
results in aValueError
oommfc
ubermagtable
0.51 (Feb 10, 2021)#
New subpackage
discretisedfield.tools
containing functions to operate ondiscretisedfield.Field
objects.New integration syntax.