3. Simulation procedure

The main simulation procedure consists of a series of Monte Carlo steps, and it is based on the classical Metropolis algorithm applied to the so-called spin continuous approach. However, the main difference lies in the cluster-building procedure which is executed with a small probability Pcl, as shown in Figure 1.

procedure of the cluster building is the key and important point. We used the Wolff

where Ecoupling is the exchange interaction energy between the neighboring spins. The local information entropy is computed in the defined sphere around each node. In general, the choice of properties (used in the entropy calculation) will depend on the problem being considered; however, for magnetic systems, the natural limit of cluster growth is the change in the value and direction of magnetic anisotropy K. Therefore, an optimal feature is a set of three components [Kx, Ky, Kz], whereby the nonmagnetic nodes do not participate in the entropy calculations. In addition, at the beginning of each cluster-building procedure, the α coefficient is drawn that will weaken (α < 1) or strengthen (α > 1) the influence of a local property disorder on the system clusterization. Moreover, it is recommended that from time to time (typically about 20% cases), it completely ignores the impact of

The presented algorithm gives some freedom of the cluster building for which the thermodynamic balance is fulfilled. Indeed, even if the cluster rotation slightly disturbs the balance, the remaining single-spin MCM iterations restore it again. The only condition is that the Pcl and θ values are relatively low (it can be determined experimentally for cases when the results do not depend on the parameters).

change

common area

cluster search

suggest PWolff = 0.2

Srange The range of local information entropy The range of local entropy should be selected

add <sup>¼</sup> <sup>1</sup> � exp �βEcoupling h i � � exp �αSloc � � (13)

add expressed by the formula

Note, it affects the energy changes in a single step. A large θ value will freeze the system, while the small will make it very loose as well as more iterations will be needed to obtain the same

If many independent clusters in the system are expected, then the value of the parameter should be raised to give everyone a chance to be analyzed. However, high values may destroy the

depending on the geometry of the system. The larger range increases the chance to separation between the magnetic grains and a small

Typically, we suggest Niter = 3 N where N is the

For α < 1 and for α > 1, the Sloc impact will be depressed and strengthened, respectively. The best approach is to draw an α value before each

In some cases, you can build a cluster ignoring the impact of local entropy. Typically, we

thermodynamic equilibrium

number of all spins in the system

We propose Nstep = 400

algorithm but with the modified adding probability P<sup>0</sup>

Application of Local Information Entropy in Cluster Monte Carlo Algorithms

disorder and builds a cluster based on the standard Wolff method.

Parameter Description Recommendation and notes

θ The angle at which the direction of the spin or cluster can be changed in a

Pcl Probability of cluster analysis instead of spin in a single iteration

Niter The number of iterations contained in

calculate the average spin of the

Nstep The number of MC steps used to

one MC step

system <SZ>

α Modifier of the impact of local information entropy

PWolff The probability of searching for a cluster based only on the Wolff

method

A guide of the parameters used in the algorithm.

Table 1.

145

single iteration

P0

DOI: http://dx.doi.org/10.5772/intechopen.88627

First of all, a random node i of the system is chosen, and then it is decided, regarding the probability Pcl, whether to analyze the selected node or build a cluster, starting from the node as a seed. In the first case, the algorithm goes to the typical Metropolis procedure and spin continuous method, i.e., the spin direction is randomly modified by angle �θ, and then the energy difference ΔE between the new and the old configuration is calculated. The energy of the system is computed in the frame of the 3D Heisenberg model:

$$E = -\sum\_{i,j} f\_{i\overline{j}} \mathbf{S}\_{i\overline{j}} \cdot \mathbf{S}\_{\overline{j}} - \sum\_{i} K\_{i} (\mathbf{S}\_{i\cdot} \cdot \boldsymbol{n}\_{i})^{2} - g\mu\_{B}\mu\_{0} \sum\_{i} H\_{i\cdot} \cdot \mathbf{S}\_{i\cdot} + D \sum\_{i,j} \frac{\mathbf{S}\_{i\cdot} \cdot \mathbf{S}\_{\overline{j}} - \mathfrak{J} (\mathbf{S}\_{i\cdot} \cdot \boldsymbol{e}\_{\overline{j}\overline{j}}) (\mathbf{S}\_{\overline{j}\cdot} \cdot \boldsymbol{e}\_{\overline{j}\overline{j}})}{r\_{\overline{j}}^{3}} \tag{12}$$

where Jij is the exchange parameter, Si is the spin vector on site i, Ki is the anisotropy constant (per site), ni is the easy magnetization axis, g is the Lande factor, μ<sup>B</sup> is the Bohr magneton, μ<sup>0</sup> is the vacuum permeability, Hi is the magnetic field on site i, D is the dipolar constant, eij is the directional versor between the ith and jth nodes, and rij is the distance between the ith and jth nodes. The change is accepted with the Metropolis acceptance probability. In the second case, the algorithm is similar; however, it is necessary to find a cluster around the selected node and, if it exists, carry out a coherent rotation of all spins belonging to the cluster. The

Figure 1. Schematic diagram of the used algorithm.

Application of Local Information Entropy in Cluster Monte Carlo Algorithms DOI: http://dx.doi.org/10.5772/intechopen.88627

procedure of the cluster building is the key and important point. We used the Wolff algorithm but with the modified adding probability P<sup>0</sup> add expressed by the formula

$$P\_{add}' = \left[\mathbf{1} - \exp\left(-\beta E\_{coupling}\right)\right] \exp\left(-a\mathbf{S}^{dc}\right) \tag{13}$$

where Ecoupling is the exchange interaction energy between the neighboring spins.

The local information entropy is computed in the defined sphere around each node. In general, the choice of properties (used in the entropy calculation) will depend on the problem being considered; however, for magnetic systems, the natural limit of cluster growth is the change in the value and direction of magnetic anisotropy K. Therefore, an optimal feature is a set of three components [Kx, Ky, Kz], whereby the nonmagnetic nodes do not participate in the entropy calculations. In addition, at the beginning of each cluster-building procedure, the α coefficient is drawn that will weaken (α < 1) or strengthen (α > 1) the influence of a local property disorder on the system clusterization. Moreover, it is recommended that from time to time (typically about 20% cases), it completely ignores the impact of disorder and builds a cluster based on the standard Wolff method.

The presented algorithm gives some freedom of the cluster building for which the thermodynamic balance is fulfilled. Indeed, even if the cluster rotation slightly disturbs the balance, the remaining single-spin MCM iterations restore it again. The only condition is that the Pcl and θ values are relatively low (it can be determined experimentally for cases when the results do not depend on the parameters).


#### Table 1.

3. Simulation procedure

frame of the 3D Heisenberg model:

JijSi � Sj �<sup>X</sup>

i

Ki Si ð Þ � ni

<sup>E</sup> ¼ �<sup>X</sup> i,j

Figure 1.

144

Schematic diagram of the used algorithm.

The main simulation procedure consists of a series of Monte Carlo steps, and it is based on the classical Metropolis algorithm applied to the so-called spin continuous approach. However, the main difference lies in the cluster-building procedure

First of all, a random node i of the system is chosen, and then it is decided, regarding the probability Pcl, whether to analyze the selected node or build a cluster, starting from the node as a seed. In the first case, the algorithm goes to the typical Metropolis procedure and spin continuous method, i.e., the spin direction is randomly modified by angle �θ, and then the energy difference ΔE between the new and the old configuration is calculated. The energy of the system is computed in the

Theory, Application, and Implementation of Monte Carlo Method in Science and Technology

<sup>2</sup> � <sup>g</sup>μBμ<sup>0</sup>

where Jij is the exchange parameter, Si is the spin vector on site i, Ki is the anisotropy constant (per site), ni is the easy magnetization axis, g is the Lande factor, μ<sup>B</sup> is the Bohr magneton, μ<sup>0</sup> is the vacuum permeability, Hi is the magnetic field on site i, D is the dipolar constant, eij is the directional versor between the ith and jth nodes, and rij is the distance between the ith and jth nodes. The change is accepted with the Metropolis acceptance probability. In the second case, the algorithm is similar; however, it is necessary to find a cluster around the selected node and, if it exists, carry out a coherent rotation of all spins belonging to the cluster. The

X i

Hi � Si þ D

X i,j

Si � Sj � 3 Si � eij

� � Sj � eij � �

(12)

r3 ij

which is executed with a small probability Pcl, as shown in Figure 1.

A guide of the parameters used in the algorithm.

Finally, one MC step consists of Niter iterations presented in Figure 1, and the Nstep steps are taken to obtain the magnetization of the system <Sz> (the average spin in the external field direction).

more than 10 times (depending on the probability of cluster analysis and the system size) and maintains the correctness of results. Figure 2 shows a comparison of computation time (needed for 400 MC steps) for different Pcl, system size, and its magnetic properties. On this graph, the independent quantity is a number of threads applied for the simulations (HP ProLiant DL580 G7, 4x Intel Xeon 8C X7560

Application of Local Information Entropy in Cluster Monte Carlo Algorithms

Generally, this aspect of calculations is very complex. Nevertheless, one can conclude that the parallelization is more effective for the systems with small num-

In order to show an efficiency of the disorder-based cluster MC algorithm and its comparison with the classical Wolff method, the two systems containing magneti-

The difference between classical and disorder-based approaches lies in the defi-

Example of the system with one-bridge coupling between the hard and soft spheres. The graphs on the right show

cross sections (z-x plane) for different y values equal to 10 (a), 25 (b) and 40 (c).

50 50 50 (1,25,000) nodes; the spins are arranged in shapes of joined spheres with hard and soft magnetic properties. The bonding between the spheres, further called "bridges," is different for the two cases, and it equals 1 or 7 nodes, receptively. Figure 3 depicts an example of the system with one-bridge coupling between the hard and soft spheres. The parameters of the magnetic phases and simulation

4. Application of the method to multiphase magnetic systems

cally hard and soft phases were analyzed. The 3D system space consists of

nition of adding probability. It can be demonstrated by the cluster-building

2.27 GHz).

Figure 3.

147

ber of the cluster-building trials.

DOI: http://dx.doi.org/10.5772/intechopen.88627

procedure are listed in Table 2.

The most important parameters of the algorithm, their possible values as well as our recommendations from a practical point of view are summarized in Table 1.

The algorithm can be, in some aspects, paralleled [20–23]. The main limitations of the parallelization process are due to three reasons. First of all, each step in the Monte Carlo procedure should be based on the system modified in the previous step. In particular, the decision to accept the new spin direction depends on the current direction of the neighboring spins due to the exchange energy. Consequently, a situation in which different threads are testing a new configuration for the two neighboring spins at the same time should be refused. Similarly, simultaneous analysis of the whole cluster and individual spins inside it (as well as spins interacting with it) is not allowed. The second thing to keep in mind is to ensure that each state of the system can be selected with the same probability. This means that none of the actions can interfere with the probability of choosing a spin for analysis. For example, the spin cannot be temporarily omitted in the draw as well as the analyzed cluster must always be found in the real time and cannot be taken from a fixed database. Finally, it should be taken into account that a change of the spin direction inside a cluster, which is constructed based on the P<sup>0</sup> add probability, may disrupt the thermodynamic balance of the system. Therefore, from the statistical point of view, after each change of the cluster spins, there should be many iterations analyzing single spins in the cluster and whole system.

Despite all the above restrictions, there are three time-consuming problems in the algorithm which can be parallelized: the main MC loop, the calculation of cluster energy as well as the cluster-building procedure around the chosen spin. Our experience shows that the parallelization of the algorithm accelerates the computation time

Figure 2. Comparison of computation time (400 MC steps) for different Pcl, system size, and its magnetic properties.

Application of Local Information Entropy in Cluster Monte Carlo Algorithms DOI: http://dx.doi.org/10.5772/intechopen.88627

more than 10 times (depending on the probability of cluster analysis and the system size) and maintains the correctness of results. Figure 2 shows a comparison of computation time (needed for 400 MC steps) for different Pcl, system size, and its magnetic properties. On this graph, the independent quantity is a number of threads applied for the simulations (HP ProLiant DL580 G7, 4x Intel Xeon 8C X7560 2.27 GHz).

Generally, this aspect of calculations is very complex. Nevertheless, one can conclude that the parallelization is more effective for the systems with small number of the cluster-building trials.
