C++ mpi module for stochmagnet_main Package
Runs

The program is running via a command line options. The structure of the command line is as follow:

programName --option-name=option_value command.

The program name can be

  • stochmagnet_main_mpi.exe : the parallel mpi version of the code
  • stochmagnet_main_omp.exe : the omp version of the code
  • stochmagnet_main_serial.exe : the serial version of the code is the omp version with no Open MP routines
  • stochmagnet_main_ompi.exe : the hybrid mpi/openmp version where only the beam is mpi-parallelized (will be deprecated in the future)

For conveniance, its is possible to generate an input file named 'input' with the options in it of the form opt-name=opt-value.

In that case, only the program name has to be launched.

The avaliable commands are:

  • curie-temperature : to run simulations with only one temperature T in Kelvin
  • curie-temperature-range : to run a cycle of temperatures in [T_0,T_1,DT]
  • hysteresis : to run hysteresis loop
  • network-builder : to generate network files
  • help : to print the help ie the list of options and commands

The avalaible options are :

core options

name comment type value
is-options-name-case-sensitive the option name is case sensitive boolean false
output-path path to generate the files string -
prefix-path prefix of all the generted files string -
log where the log is generated {'screen','file','all',no'} -
log-file file name of the log string prefix-path.log
log-mode-file mode of log {'create','append'} -
has-log-per-core a log is generated per each mpi core boolean false

parallel options

name comment type value
threads-number number of threads integer 0
cores-number number of cores integer 1

beam options

name comment type value
simulations number number of simulations integer 1
beam type of beam {'landau-lifschitz','monte-carlo'} landau-lifschitz
is-templated-run implemtation type boolean false

the option is-templated-run enables to run the templated implementation of the beam runner method.

system options

name comment type
S0 the initial values of S {'random',[Sx,Sy,Sz],txt file}
preconditioning-steps-number number of steps with no stochastic outputs integer
steps-number number of steps with stochastic outputs integer
is-S-saved saving S at the end of runing boolean

For Landau-Lifschitz beam, the system options defined the Landau-Lifschitz function and the time stepper manager.

There are 2 kinds of Landau Lifshitz functions:

\( LL(S,H)=\alpha. \left ( S \wedge H + \lambda S \wedge \left ( S \wedge H\right ) \right ) \)

or with \((S.S)=1 \),

\( LL(S,H)=\alpha. \left ( S \wedge H + \lambda \left ( (S.H) S - H \right ) \right ) \)

name comment type
LL-System the name of the Landau-Lifschitz system of S {'stratonovich-n','heun','ito','stratonovich'}
LL-lambda damping parameter real
LL-type Landau-lisfchitz function type {'LL','NLL'}
noise time noise function {'constant','inverse'}
time-step time step in second real
time-stepper type of time step computing 'constant'
use-relaxation to stop the time stepper when relaxation is reached boolean
relaxation-tolerance to detect the relaxation state real

stochastic functions options

This options modelizes the \( dW_t \) operator.

name comment type value
seed the initial seed for random function integer 0
random-distribution name of the random function {'','boost','std','trng'} -
random-generator name of the random number generator {'','mt19937','lcg64','yarn2,'mrg2','mrg3',mrg3s'}

crystal and material options

name comment type value
material-name name of material string -
mu_s atomic magnetic moment x mu_B$ real -
J Heisenberg coefficient real (J/link) -
D DMI coefficient real (J/link) -
MF-Correction spin wave MF correction real -
Ku anisotropy energy factor real (J/atom) -
U anisotropy directions real [1,0,0,0,0,0,0,0,0]
crystal-type type of anisotropy {'uniaxial','planar','cubic','uniaxial'}
adimensionize adimensionize the physical values boolean true
crystal-structure type of crustal structure {'bcc','fcc','grid1d,grid2d,griod3d,cgrid1d,cgrid2d,cgrid3d'}
crystal-cell-size size of the crystal structure real Angstrom -

network options

name comment type value
network-file name of file of the network string -
network-size number of crystal structure per direction \( N^3 \) -
network-periodicity periodicity of the network per direction boolean -
network-domain algebric definition of the domain string -

The network file format is a comment whose first word is a key to read the value of the key after it. Each comment line begins with '#'.

#version
1
#dimension
3
#periodicity per direction
isPx isPy isPz
#particles number
nPs
#halo particles number
nHs
#neighboring particles number
nNeighbors
#particles data : <index> <P.k> <neighbors number> <neighbors list>
i P.x P.y P.z n i0 i1 ... i{n-1}

halo particles has no neigbor particles number. An halo particle line contains only its index and coordinates.

The network-domain is defined by a primary geometry with parameters to define the geometry. The following algebric symbols can be used :

  • '+' : \( \bigcup \) union operator
  • '*' : \( \bigcap \) intersection operator
  • '-' : difference operator

The primary geometry can be :

  • PAVER \([x_0,x_1,y_0,y_1,z_0,z_1] \) defines a paver between points \( P(x_0,y_0,z_0) \) and \(Q(x_1,y_1,z_1) \).
  • ELLIPSOID[C,U,V,w] defines a an ellipsoid with center \( C \in R^3 \), with radius |U|,|V|,w in the direction \(U \in R^3 \) and \(V \in R^3 \). The third direction is normal to U and V
  • CYLINDER[C,U,V,h] defines a cylinder with center \(C \in R^3\), with radius |U|,|V| in the direction \(U \in R^3 \) and \(V \in R^3 \). The third direction is normal to U and V and of length h.

A unit structure cell is included in the domain if the center of the cell is inside the domain. The package math/geometry/expr parse the domain geometry.

To define a new primary geometry, a function \(R^3 \mapsto \{0,1\} \) which indicates if a point is in domain must be set.

operator options

name comment type value
use-zeeman set if zeeman operator is used boolean -
use-anisotropy set if anisotropy operator is used boolean -
use-exchange set if Heisenberg operator is used boolean -
use-dmi set if DMI operator is used boolean -
use-dipolar set if dipolar operator is used boolean -
use-macro-cell-dipolar set if macro cells demagnetized operator is used boolean -

use-dipolar and use-macro-cell-dipolar can not be set all to true

For the Zeeman operator the added option is:

name comment type value
Hext external magnetic field \(R^3 (T) \) [0,0,0]

For the macro cells demagnetized operator the added options are:

name comment type
macro-cell-demagnetized-type type of operator {'as-external','continuous'}
macro-cell-demagnetized-updating-steps-number steps number for updating demagnetized field integer
macro-cell-size size of the macro cell \( R^3 \)
macro-cell-margin grid move for macro cell network building real
macro-cell-matrix type of storage of the matrix {packed-storage','no-storage'}
macro-cell-core-type type of mpi decomposition {'master-id','all-master','no-master'}

noise options

name comment type value
temperature noise temperature real in Kelvin 0
stochastic-noise stochastic noise \(\varepsilon \) real -

The link between time independant \(\varepsilon_t=\varepsilon \) and the temperature is explained SM_TemperatureNoiseRate class

stochastic outputs options

name comment type
stochastic-drawn-steps-number number of steps to compute outputs integer
stochastic-output stochastic outputs list {'trajectory','xmf'}

cycle options

name comment type
is-step-cycle-seed-updated to update seed at each step of cycle boolean
is-cycle-restoring to restore a cycle boolean
is-stochastic-output-saved-at-each-cycle-step to save the stochastic outputs at each cycle boolean

For hysteresis cycle, more options are avaliable:

name comment type
hysteresis-Hext-range \(H_{ext} \in [H^0_{ext},H^1_{ext}] \) with steps number \( R^6 \times N \)
hysteresis-backups-number number of backups integer
hysteresis-are-critical-points-saved to save the cycle whe a critical point is reached boolean

For the time-curie cycle, the options are avaliable :

name comment type
temperature range \(T \in [T^0,T^1] \) with steps number \( R^2 \times N \)