Numerical computer simulations of magnetization processes help understanding and improving the properties of magnetic materials. New alloys can be ``designed'' and their specific behaviour predicted. Their magnetic properties are described by the dynamic (time dependent) micromagnetic Landau-Lifshitz-Gilbert equations. Finite element methods provide a reliable technique for the solution of these partial differential equations. They are very flexible concerning material parameters, desired accuracy, and material inhomogeneities.
The error caused by the discretization of the problem can be estimated during the calculations. It will be small in areas where the magnetization is uniform and larger where the magnetization changes quickly. An appropriate local refinement strategy will add elements in those areas with large errors. Consequently the discretization error will be reduced and more accurate results obtained.
It is the purpose of this paper to present an implementation of a suitable refinement algorithm and an application, the simulation of a hard magnetic cube.