Energy#
- class micromagneticmodel.Energy(terms=None)#
Energy terms container class.
- Parameters:
terms (list) – A list of energy terms.
Examples
Defining energy terms container.
>>> import micromagneticmodel as mm ... >>> terms = [mm.Exchange(A=1e-12), mm.Demag()] >>> energy = mm.Energy(terms=terms) >>> len(energy) # the number of terms 2
Methods
__add__Binary
+operator.__contains__Determine whether a term of the same type as
itemis in the container.__dir__Extension of the
dir(self)list.__eq__Relational operator
==.__getattr__Accessing an individual term from the container.
__getitem__Access individual terms from the container by index.
__iter__Generator yielding all terms in the container.
__len__The number of terms in the container.
__repr__Representation string.
__sub__Binary
-operator.densityeffective_fieldenergygetReturn a list of all terms of type
typein the container.