We developed a new numerical procedure to study dynamical behavior in
micromagnetic systems, This procedure solves the damped Gilbert equati
on for a continuous magnetic medium, including all interactions in sta
ndard micromagnetic theory in three-dimensional regions of arbitrary g
eometry and physical properties. The magnetization is linearly interpo
lated in each tetrahedral element in a finite element mesh from its va
lue on the nodes, and the Galerkin method is used to discretize the dy
namic equation, We compute the demagnetizing field by solution of Poss
ion's equation and treat the external region by means of an asymptotic
boundary condition. The procedure is implemented in the general purpo
se dynamical micromagnetic code (GDM). GDM uses a backward differentia
l formula to solve the stiff ordinary differential equations system an
d the generalized minimum residual method with an incomplete Cholesky
conjugate gradient preconditioner to solve the linear equations. GDM i
s fully parallelized using MPI and runs on massively parallel processo
r supercomputers, clusters of workstations, and single processor compu
ters. We have successfully applied GDM. to studies of the switching pr
ocesses in isolated prolate ellipsoidal particles, and in a system of
multiple particles.