Energy#

class micromagneticmodel.Energy(terms=None)#

Energy terms container class.

Parameters:

terms (list) – A list of energy terms.

Examples

  1. 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 item is 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.

density

effective_field

energy

get

Return a list of all terms of type type in the container.