For the deterministic time integration two algorithms have been used so far: An implicit backward difference integration scheme and a Runge-Kutta type explicit method. Since the latter is quite similar to the deterministic part of the Heun scheme, it has been used as a template. The data structures and the interface to vecuws
have been reused. Thus, the necessary updates have been reduced to a minimum and the maintenance of the finite element program is kept simple.
The call in the time step loop of the main program vecuws
to the Runge-Kutta time integration subroutine rkc
has been replaced by a call to the stochastic time integration subroutine rks
. Its subroutine header with a description of the expected parameters is given in figure . In
rks
the stochastic Heun scheme is implemented as given in section .
The second argument, which is passed to rks
is the subroutine, which calculates the effective field. This subroutine is implemented as rkx
. The evaluation of the effective field is based on the energy terms given in section [15]. The demagnetizing field is calculated with the hybrid finite element/boundary element method and a magnetic scalar potential as described section
.
Then, the increments for the magnetization vectors are evaluated in calc_mdotx
. In this subroutine, the thermal field is computed and added to the effective field. Of course, for the Heun method it is necessary to calculate two different increments, one for the Euler type predictor and the true increment, which is a function of the current magnetization and the result of the Euler type predictor (cf. section ).
The sequence of subroutines, which are called from vecuws
for the time integration is plotted as a directed graph in figure .
|