C++ mpi module for stochmagnet_main Package
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
SM_DMIOperator Class Reference

This class is describes the anti-symmetric Dzyaloshinskii–Moriya interaction operator. More...

#include <SM_DMIOperator.h>

Inheritance diagram for SM_DMIOperator:
Inheritance graph
[legend]
Collaboration diagram for SM_DMIOperator:
Collaboration graph
[legend]

Public Member Functions

virtual CORE_UniquePointer< SM_SliceOperatorNewInstance () const override
 create a New instance of this More...
 
virtual tMemSize getMemorySize () const
 return the memory size of the class and the memory size of all its attributes/associations More...
 
virtual void computeMagneticFieldSlice (const tIndex &timeIndex, const SM_Network &network, const SM_Material &material, const tIndex &startIndex, const tIndex &endIndex, const tReal *S, const tBoolean &alpha, const tIndex &nH, tReal *H) const
 compute the anisotropy magnetic field by virtual method More...
 
virtual tReal computeSpinEnergy (const tIndex &i, const tIndex &timeIndex, const SM_Network &network, const SM_Material &material, const SM_RealField &S) const final
 compute the i-th spin heisenberg energy More...
 
virtual tReal computeEnergySlice (const tIndex &timeIndex, const SM_Network &network, const SM_Material &material, const tIndex &startIndex, const tIndex &endIndex, const tReal *S) const
 compute the energy at time t by virtual method for all particles in [startIndex,endIndex[ More...
 
- Public Member Functions inherited from SM_SliceOperator
virtual tMemSize getContentsMemorySize () const
 return nthe memory size of the included associations More...
 
const tString & getName () const
 return the operator name More...
 
virtual void copy (const SM_SliceOperator &op)
 copy More...
 
virtual void adimensionize (const tReal &cH)
 adimensionize operator with characteric field value in J More...
 
virtual void discretize (const SM_Network &network, const SM_Material &material)
 discretize the operator on the network More...
 
virtual void updateState (const tIndex &timeIndex, const SM_Network &network, const SM_Material &material, const SM_RealField &S)
 update the stae of the operator at time index More...
 
virtual tString toString () const override
 return string representaton of the operator
 
- Public Member Functions inherited from SM_Object
 SM_Object (void)
 create
 
virtual ~SM_Object (void)
 destroy
 
- Public Member Functions inherited from CORE_Object
template<class T >
std::shared_ptr< T > getSharedPointer ()
 return the shared pointer for this More...
 
template<class T >
std::shared_ptr< const T > getConstSharedPointer () const
 return a const shared pointer for this More...
 
template<class T >
tBoolean isInstanceOf () const
 test if the clas T is an instance of this class More...
 
tString getClassName () const
 return the name of the class More...
 
tString getPointerString () const
 retrun the pointer of the class as a string More...
 
tString getIdentityString () const
 retrun the string identification of the class More...
 

Static Public Member Functions

static CORE_UniquePointer< SM_DMIOperatorNew ()
 build a new instance of the operator More...
 
static void ComputeSpinEnergy (const tIndex &nNeighbors, const tIndex *neighboringParticles, const tReal *vD, const tBoolean &incD, const tReal *S, const tReal *Si, tReal &Ei)
 computes the exchange energy of a spin i and all its neighboring spins. More...
 
- Static Public Member Functions inherited from CORE_Object
static tBoolean EnableMemoryStack (const tBoolean &isMemoryChecked)
 enable the memory stack More...
 
static void EnableMemoryStack ()
 enable the memory stack
 
static void DisableMemoryStack ()
 disable the memory stack
 
static tBoolean IsMemoryStackEnabled ()
 return trur if the memory stack is enabled
 
static tString MemoryStackToString ()
 get the memory stack in string More...
 
static tIndex GetRegisteredClassesNumber ()
 get the memory stack in string More...
 
- Static Public Member Functions inherited from SM_LinearSliceOperator
static tReal ComputeEnergy (const SM_Network &network, const SM_Material &material, const tIndex &startIndex, const tIndex &endIndex, const tReal *S, const tInteger &nH, const tReal *H)
 compute the energy by virtual method More...
 

Protected Member Functions

 SM_DMIOperator (void)
 create a network class
 
virtual ~SM_DMIOperator (void)
 destroy
 
- Protected Member Functions inherited from SM_SliceOperator
 SM_SliceOperator (void)
 create a network class
 
virtual ~SM_SliceOperator (void)
 destroy
 
void setName (const tString &name)
 set the name More...
 
- Protected Member Functions inherited from CORE_Object
 CORE_Object ()
 build an instance of the object
 
virtual ~CORE_Object ()
 destroy the instance of object std

 
- Protected Member Functions inherited from SM_LinearSliceOperator
 SM_LinearSliceOperator (void)
 create a network class
 
virtual ~SM_LinearSliceOperator (void)
 destroy
 

Detailed Description

This class is describes the anti-symmetric Dzyaloshinskii–Moriya interaction operator.

The DMI energy of a spin i is \( E_i= - \displaystyle \sum_{j \neq i} D_{ij} \cdot S_i \wegde S_j \)

where \( D_{ij} \)$ is expressed in Joules ( \(J\)).

In order to have \(\displaystyle \forall i \in [0,P[, \forall k in [0,3[, H_k(P_i)=-\frac{1}{\mu_s} \frac{dE}{dS_i}(P_i).\delta_k\), where \( \delta k \) is the k-unit vector direction

the corresponding magnetic excitation field of the spin \( i\) is: \( H(P_i)=H^i=\frac{1}{\mu_s} \sum_{j \neq i} \S_j \wedge D_{ij} \).

The total DMI energy is the half of the sum of all spin energy in order not to take into accoung energy interaction between spin i and j twice and to verify the above relation which link the energy and the magnetic field:

\( E= - \frac{1}{2}. \displaystyle \sum_ i \sum_{j \neq i} D_{ij} S_i \wedge S_j \)

The adimensionized formulation is :

where \(a=10^{-10}m=1\) Angstrom, \(\mu_B\) is the Bohr magneton \(\mu_B=9.2740.10^{-24} J.T^{-1}\) and \(\mu_0=4.\pi.10^{-7} T^2.J^{-1}.m^3 \) the vaccum permeability whe obtain: the general expression \( h=-\frac{1}{\tilde \mu_s} \frac{de}{dS_i}(P_i)\).

For the DMI operator it gives:

The uml organization of the package is

Author
Stephane Despreaux
Version
2.0

Member Function Documentation

◆ computeEnergySlice()

tReal SM_DMIOperator::computeEnergySlice ( const tIndex &  timeIndex,
const SM_Network network,
const SM_Material material,
const tIndex &  startIndex,
const tIndex &  endIndex,
const tReal *  S 
) const
virtual

compute the energy at time t by virtual method for all particles in [startIndex,endIndex[

Parameters
[in]timeIndex: index of time
[in]network: network
[in]material: material of the network
[in]startIndex: start index of the particle to compute the energy
[in]endIndex: end index of the particle to compute the energy
[in]Sunit direction of magnetic spin moment of size nParticles x dim
Returns
the energy of the operator It returns \( E=\frac{1/2} \sum_i E_i \)

Implements SM_SliceOperator.

◆ computeMagneticFieldSlice()

void SM_DMIOperator::computeMagneticFieldSlice ( const tIndex &  timeIndex,
const SM_Network network,
const SM_Material material,
const tIndex &  startIndex,
const tIndex &  endIndex,
const tReal *  S,
const tBoolean &  alpha,
const tIndex &  nH,
tReal *  H 
) const
virtual

compute the anisotropy magnetic field by virtual method

Parameters
[in]timeIndex: time step index
[in]network: network
[in]material: material of the network
[in]startIndex: start index of the particle to compute the energy
[in]endIndex: end index of the particle to compute the energy
[in]Sunit direction of magnetic spin moment of size nParticles x dim
[in]alphasum operator 0 or 1
[in]nHnumber of elements of H
[in,out]Htotal magnetic field of size nH x dim

Computes \( H=alpha.H+H_{op} \)

\( H_{op}= K. \nabla_{S_i} Phi(S_i,U) \)

Implements SM_SliceOperator.

◆ computeSpinEnergy()

tReal SM_DMIOperator::computeSpinEnergy ( const tIndex &  i,
const tIndex &  timeIndex,
const SM_Network network,
const SM_Material material,
const SM_RealField S 
) const
finalvirtual

compute the i-th spin heisenberg energy

Parameters
[in]i: index of the spin
[in]timeIndex: time step index
[in]network: network
[in]material: material of the network
[in]Sunit direction of magnetic spin moment of size nParticles x dim
Returns
the energy of the operator

Implements SM_SliceOperator.

◆ ComputeSpinEnergy()

static void SM_DMIOperator::ComputeSpinEnergy ( const tIndex &  nNeighbors,
const tIndex *  neighboringParticles,
const tReal *  vD,
const tBoolean &  incD,
const tReal *  S,
const tReal *  Si,
tReal &  Ei 
)
inlinestatic

computes the exchange energy of a spin i and all its neighboring spins.

Parameters
[in]nNeighborsnumber of neighboring particles
[in]neighboringParticlesindices of the neighboring particles of the particle i
[in]vDDMI energy factors per direction
[in]incD: increment on D values (0 for constant)
[in]Sdirections of the magnetic moment of all the spins
[in]Sibegin iterator on direction of the spin i
[out]Eienergy of the spin \( E_i= - D_{ij}. \sum_{j=0}^{j=v-1} S_i \wedge S_j \)

◆ getMemorySize()

virtual tMemSize SM_DMIOperator::getMemorySize ( ) const
inlinevirtual

return the memory size of the class and the memory size of all its attributes/associations

Returns
the memory size of the class and the memory size of its attributes/associations in bytes The mamory size is :
  • the added size of the base classes which contains:
    • the primary attributes size depends on the order: (first delare the smallest attributes size
    • all virtual functions costs <pointer-size> (4 32xor 8 64x) bytes by virtual function
    • virtual inherihtance will increase of (4 or 8) bytes
  • we add the size of the contains values of the attributes : for example the size of a string is the length of the string 1 octet = 1 byte 1 Ko = 1024 bytes 1 Mo = 1024 Ko 1 Go = 1024 Mo

Reimplemented from SM_LinearSliceOperator.

◆ New()

static CORE_UniquePointer<SM_DMIOperator> SM_DMIOperator::New ( )
inlinestatic

build a new instance of the operator

Returns
an unique pointer of the operator

◆ NewInstance()

virtual CORE_UniquePointer<SM_SliceOperator> SM_DMIOperator::NewInstance ( ) const
inlineoverridevirtual

create a New instance of this

Returns
an unique pointer to the instance

Implements SM_SliceOperator.


The documentation for this class was generated from the following files: