This method is mostly used as soon as a spatial discretization
based on Finite Differences (FD) [52] can be defined
over a structured mesh. This occurs for example, if one considers
a magnetic body with rectangular geometry and subdivides it into a
collection of square rectangular prisms with edges
parallel to the coordinate axes. To start our discussion we recall
the fact that the solution of magnetostatic
problem (3.1)-(3.2)
can be obtained in terms of the scalar potential such
that
, solution of the following boundary
value problem:
The boundary value problem (3.3) admits the
following solution [13]:
(3.4)
By using the divergence theorem, the surface integral can be
rewritten as volume integral. Equation (3.4) can be
put in the compact form:
where
is the demagnetizing tensor. The
product
gives the magnetostatic field produced at location
by an
elementary magnetic moment situated at location
. The
expression (3.7) remains formally
unchanged if one assumes suitable discretization over
elementary cells. For instance, if we subdivide the magnetic body
into
rectangular square prisms with edges parallel
to the coordinate axes, with
cells along the
axis respectively, each cell can be uniquely determined by means
of three indexes . As far as magnetization within the cells
is concerned, there are two approaches proposed in literature. The
first is often referred to as constant volume
charges3.1
method, that is,
is supposed to be constant
within each cell. The second approach supposes the magnetization
uniform within each cell. A comparison between these two
approach has been performed in Ref. [53] with respect to
the solution of the standard problem no. 2 (see mag website
[79] for details).
Thus, apart from this particular choice, one can rewrite
Eq. (3.7) as a discrete
convolution:
(3.8)
where is the demagnetizing tensor associated to the
prism cell :
(3.9)
The discrete
convolution (3.8) can be
computed by means of the Discrete Fourier Transform (DFT), which
can be implemented very efficiently with the well-known algorithm
referred to as Fast Fourier Transform [60]. In fact, the
time-domain convolution can be changed into a scalar product in
frequency space using the Fourier transform. To properly take care
of the finite size effect of the system and, therefore, to avoid
circular convolution, the standard zero-padding
techniques [64] can be used. In fact, the inverse
Fourier transform will yield the correct field in real space, if
the number of cells in each dimension after zero-padding is not
less than twice the number of physical cells. The latter
requirement ensures that the inferred periodic boundary condition
of this enlarged region with padded zeros will not affect the
physical data in real space after the inverse FFT is performed. In
fact, to perform the FFT which does require overall periodicity,
and yet not to allow the cells in the simulated region to be
affected by the fields in the extended periods, the void buffer
area between a physical cell and the first image cell in the
adjacent period must exceed the interaction force range given by
the number of the cells [65].
Assuming that the dimensions of the zero-padded discretization
grid are
, along the directions
respectively, and referring for instance to the component of
, the discrete
convolution (3.8) can be
written as:
(3.10)
where
(
)
are
matrices. The Discrete Fourier
Transform (DFT)
of
can be expressed as:
(3.11)
where is the imaginary unit
and
are the frequency domain variables.
Analogous expressions can be written for
and
. Therefore, the discrete convolution theorem
states that Eq. (3.10)
can be written in frequency domain as sum of matrix
element-by-element product:
(3.12)
The component
can be obtained by computing the
inverse FFT of the expression (3.12).
Therefore, the cost of the evaluation of the demagnetizing field
can be summarized as follows:
In the preprocessing stage of the simulation, the FFTs of
the 9 demagnetizing matrices
(
)
has to be evaluated and stored in memory.
Figure:
Computational cost
scaling plot. Dashed line represents
scaling.
Dash-dotted line represents
scaling. Solid line
represents
scaling.
For each computation of the demagnetizing field, six FFTs
has to be computed: three related to magnetization matrices,
namely
and three
inverse FFTs of the components
in frequency domain.