In the main program all global variables are defined (cf. table ). The simulation is initialized by a call to the function
init_par
. Then, the time step loop is entered. From the current magnetization distribution the effective fields for each computational cell is calculated by a call to the function calc_bloc
. Next, the time integration function timestep
is called, to update the magnetization vectors according to the chosen time integration algorithm. Finally, all interesting data like the contributions to the total energy and the total magnetization are calculated, the time average values and histograms updated, and the results written to log files. At regular intervals the magnetization distribution is saved for visualization with the postprocessing programs AVS and Geomview by the subroutine magdistwrite
. When the maximum number of time steps is reached, the time step loop is exited, the average values, histograms, number of switching events, etc., are written to log files and the program exits.