Download NMAG User Manual Documentation

Transcript
NMAG User Manual Documentation, Release 0.2.1
Values are the petsc KSP-solver tolerances for the Dirichlet and von Neumann Laplace
solvers used internally to compute the magnetic scalar potential from magnetic charge density.
4.2.1 advance_time
Module: nmag
Object: Simulation.advance_time
Arguments: (self, target_time, max_it=-1, exact_tstop=None)
This method carries out the time integration of the Landau-Lifshitz and Gilbert equation.
Parameters
target_time [SI Object] The simulation will run until this time is reached. If the target_time is
zero, this will simply update all fields.
max_it [integer] The maximum number of iterations (steps) to be carried out in this time integration call. If set to -1, then there is no limit.
exact_tstop [boolean] When exact_tstop is True, the time integration is advanced exactly up to
the given target_time. When False, the time integration ends “close” to the target_time.
The latter option can result in better performance, since the time integrator is free to choose
time steps which are as wide as possible. When exact_tstop is not given, or is None, the
default value for this option will be used. The default value can be set using the method
set_params, which should hence be used to control the behaviour of the hysteresis and relax
methods.
4.2.2 get_subfield
Module: nmag
Object: Simulation.get_subfield
Arguments: (self, subfieldname, units=None)
Given a subfieldname, this will return a numpy-array containing all the data (one element for each site).
Parameters
subfieldname [string] The name of the subfield, for example m_Py or H_demag.
units : SI object
Optional parameter. If it is provided, then the entity is expressed in these units. If
it is not provided, then the correct SI dimensions for this subfield are looked up, and
SI-values are returned.
If you would like to see simulation units in the output, then use SI(1).
In short: if you omit the second parameter, you will obtain SI values.
Returns data : numpy-array
4.2.3 get_subfield_positions
Module: nmag
Object: Simulation.get_subfield_positions
Arguments: (self, subfieldname, pos_units=SI(1,[’m’,1.0]))
This function provides the positions of the sites for data obtained with get_subfield.
132
Chapter 4. Command reference