Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import oommfc.util as ou
import micromagneticmodel as mm
class Zeeman(mm.Zeeman):
"""Zeeman energy term.
This energy term models Zeeman energy term, defined by the
external magnetic field `H`.
.. math::
w_{z} = -\\mu_{0}M_\\text{s}\\mathbf{m} \\cdot \\mathbf{H}
`H` is a three-dimensional vector with real component values and
A/m units.
`H` can be either contant in space or spatially varying. If it is
constant, a single value is passed, e.g. `H = (0, 0, 1e5)`. On the
other hand, if it varies in space, there are two ways how that can
be defined. The first one is using a dictionary, where the keys