Dynamics#

class micromagneticmodel.Dynamics(terms=None)#

Dynamics terms container class.

Parameters:

terms (list) – A list of dynamics terms.

Examples

  1. Defining dynamics terms container.

>>> import micromagneticmodel as mm
...
>>> terms = [mm.Precession(gamma0=mm.consts.gamma0), mm.Damping(alpha=0.1)]
>>> dynamics = mm.Dynamics(terms=terms)
>>> len(dynamics)  # 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.

get

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