How to use the micromagneticmodel.Zeeman function in micromagneticmodel

To help you get started, we’ve selected a few micromagneticmodel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ubermag / oommfc / oommfc / hamiltonian / zeeman.py View on Github external
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