Thin filmmicromagnetics are a broad class ofmaterials withmany technological applications, primarily inmagneticmemory. The dynamics of the magnetization distribution in these materials is traditionally modeled by the Landau–Lifshitz– Gilbert (LLG) equation. Numerical simulations of the LLG equation are complicated by the need to compute the stray field due to the inhomogeneities in the magnetization which presents the chief bottleneck for the simulation speed. Here, we introduce a new method for computing the stray field in a sample for a reduced model of ultra-thin film micromagnetics. The method uses a recently proposed idea of optimal finite difference grids for approximating Neumann-to-Dirichlet maps and has an advantage of being able to use non-uniform discretization in the film plane, as well as an efficient way of dealing with the boundary conditions at infinity for the stray field.We present several examples of themethod’s implementation and give a detailed comparison of its performance for studying domain wall structures compared to the conventional FFT-based methods. 2006 Elsevier Inc. All rights reserved.