4. Application of the method to multiphase magnetic systems

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 magnetically hard and soft phases were analyzed. The 3D system space consists of 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 procedure are listed in Table 2.

The difference between classical and disorder-based approaches lies in the definition of adding probability. It can be demonstrated by the cluster-building

#### Figure 3.

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).

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

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

direction inside a cluster, which is constructed based on the P<sup>0</sup>

analyzing single spins in the cluster and whole system.

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

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

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

Despite all the above restrictions, there are three time-consuming problems in the

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

add probability, may

the external field direction).

Figure 2.
