Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import micromagneticmodel as mm
class SpinTEvolver(mm.Evolver):
"""Zhang-Li evolver.
Only attributes in ``_allowed_attributes`` can be defined. For details on
possible values for individual attributes and their default values, please
refer to ``Anv_SpinTEvolve`` documentation
(https://www.zurich.ibm.com/st/nanomagnetism/spintevolve.html).
Examples
--------
1. Defining evolver with a keyword argument.
>>> import oommfc as oc
...
>>> evolver = oc.SpinTEvolver(method='rk4')
2. Passing an argument which is not allowed.
import micromagneticmodel as mm
class CGEvolver(mm.Evolver):
"""Conjugate-Gradient evolver.
Only attributes in ``_allowed_attributes`` can be defined. For details on
possible values for individual attributes and their default values, please
refer to ``Oxs_CGEvolver`` documentation (https://math.nist.gov/oommf/).
Examples
--------
1. Defining evolver with a keyword argument.
>>> import oommfc as oc
...
>>> evolver = oc.CGEvolver(method='Polak-Ribiere')
2. Passing an argument which is not allowed.
import micromagneticmodel as mm
class EulerEvolver(mm.Evolver):
"""Euler evolver.
Only attributes in ``_allowed_attributes`` can be defined. For details on
possible values for individual attributes and their default values, please
refer to ``Oxs_EulerEvolver`` documentation (https://math.nist.gov/oommf/).
Examples
--------
1. Defining evolver with a keyword argument.
>>> import oommfc as oc
...
>>> evolver = oc.EulerEvolver(min_timestep=0)
2. Passing an argument which is not allowed.
import micromagneticmodel as mm
class RungeKuttaEvolver(mm.Evolver):
"""Runge-Kutta evolver.
Only attributes in ``_allowed_attributes`` can be defined. For details on
possible values for individual attributes and their default values, please
refer to ``Oxs_RungeKuttaEvolver`` documentation
(https://math.nist.gov/oommf/).
Examples
--------
1. Defining evolver with a keyword argument.
>>> import oommfc as oc
...
>>> evolver = oc.RungeKuttaEvolver(method='rk4')
2. Passing an argument which is not allowed.