How to use the micromagneticmodel.DMI 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 / dmi.py View on Github external
import sys
import numbers
import micromagneticmodel as mm


class DMI(mm.DMI):
    """Dzyaloshinskii-Moriya energy term.

    This energy term models DM energy term, defined by the DM energy
    constant `D` and crystalographic class `crystalclass`. `D` is a
    scalar value with J/m2 units.

    .. math::

           \\mathbf{w_\\text{dmi}} = \\left\\{
           \\begin{array}{ll}
           D \\mathbf{m} \\cdot (\\nabla \\times \\mathbf{m}), &
           \\text{for}\\,\\,T(O) \\\\ D ( \\mathbf{m} \\cdot \\nabla m_{z} -
           m_{z} \\nabla \\cdot \\mathbf{m}), & \\text{for}\\,\\,C_{nv} \\\\
           D\\mathbf{m} \\cdot \\left( \\frac{\\partial
           \\mathbf{m}}{\\partial x} \\times \\hat{x} - \\frac{\\partial
           \\mathbf{m}}{\partial y} \\times \\hat{y} \\right), &