API

Note that not all of the classes and method displayed here are available to the user from Python. Also note that getters and setters are ignored here.

class Cu2OSeO3 : public Sample
class CellAtom
class Dipole

Public Functions

std::vector<double> calculateField(double targetX, double targetY, double targetZ)

Calculate the field due to a single dipole at an arbitrary point.

Return
The dipole magnetic field as a vector.
Parameters
  • x: The x-position of the point at which we wish to evaluate the dipole field.
  • y: The y-position of the point at which we wish to evaluate the dipole field.
  • z: The z-position of the point at which we wish to evaluate the dipole field.

class LorentzSphere

Public Functions

std::vector<double> calculateDipoleField()

Evaluate the dipole field by summing up the contributions from the individual dipoles within the Lorentz sphere.

Return
The dipole field as a vector.

std::vector<double> calculateLorentzField()

Evaluate the Lorentz field for the Lorentz sphere.

Return
The Lorentz field as a vector.

class MomentField

Public Functions

std::vector<double> getMoment(double x, double y, double z)

Get the magnetic moment for an atom placed at an arbitrary point.

Parameters
  • x: The x-position of the point to obtain the moment
  • y: The y-position of the point to obtain the moment
  • z: The z-position of the point to obtain the moment

class Sample

Subclassed by Cu2OSeO3

Public Functions

py::array_t<double> getDipoleField(double x, double y, double z, double radius)

Get the field as a result of dipoles wihtin a Lorentz sphere at an arbitrary point.

Return
The dipolar field as a vector.
Parameters
  • x: The x-position of the point at which the dipole field is to be evaluated.
  • y: The y-position of the point at which the dipole field is to be evaluated.
  • z: The z-position of the point at which the dipole field is to be evaluated.
  • radius: The radius of the Lorentz sphere.

py::array_t<double> getLorentzField(double x, double y, double z, double radius)

Get the Lorentz field for a Lorentz sphere of a given radius at an arbitrary point.

Return
The Lorentz field as a vector.
Parameters
  • x: The x-position of the point at which the dipole field is to be evaluated.
  • y: The y-position of the point at which the dipole field is to be evaluated.
  • z: The z-position of the point at which the dipole field is to be evaluated.
  • radius: The radius of the Lorentz sphere.

py::array_t<double> getTotalField(double x, double y, double z, double radius)

Get the total field (dipolar + Lorentz) at a given point.

Return
The total field as a vector.
Parameters
  • x: The x-position of the point at which the dipole field is to be evaluated.
  • y: The y-position of the point at which the dipole field is to be evaluated.
  • z: The z-position of the point at which the dipole field is to be evaluated.
  • radius: The radius of teh Lorentz sphere.

class SpectrumCreator

Public Functions

py::array_t<double> outputSpectrum()

Obtain a 1d array of magnetic field components sampled throughout the crystal, which can be used to generate a spectrum.

Return
1d array of magnetic field components sampled through the crystal.

class VectorFieldCreator

Public Functions

py::array_t<double> outputBField()

Outputs the information required to plot a 2D slice of the magnetic field within the sample.

Return
A 2d array of the form [[x1, x2, …], [y1, y1, …], [B_x1, B_x2, …], [B_y1, B_y2, …]] where xi and yi are the x and y positions respectively, and Bxi and Byi are the x- and y-components of the magnetic fields at these points.

py::array_t<double> outputMField()

Outputs the information required to plot the magnetic moment projected onto a 2D plane.

Return
A 2d array of the form [[x1, x2, …], [y1, y1, …], [M_x1, M_x2, …], [M_y1, M_y2, …]] where xi and yi are the x and y positions respectively, and Bxi and Byi are the x- and y-components of the magnetic fields at these points.