## Abstract

A near-field calculation of light electric field intensity inside and in the vicinity of a scattering particle is discussed in the discrete dipole approximation. A fast algorithm is presented for gridded data. This algorithm is based on one matrix times vector multiplication performed with the three dimensional fast Fourier transform. It is shown that for moderate and large light scattering near field calculations the computer time required is reduced in comparison to some of the other methods.

© 2011 Optical Society of America

## 1. Methods

#### 1.1. Introduction

Given a target of arbitrary geometry we seek to calculate the electromagnetic field outside and inside the target boundary [1–4]. Exact solutions to Maxwell’s equations are known only for special geometries such as spheres, spheroids, or infinite cylinders, so approximate methods are in general required. The discrete dipole approximation (DDA) is one such method. The basic theory of the DDA has been presented elsewhere [5]. Conceptually, the DDA consists of approximating the target of interest by an array of polarizable points. Once the polarizability tensors *α _{j}* are specified, Maxwell’s equations can be solved accurately for the dipole array. For a monochromatic incident plane wave

**P**

*of the dipoles in the target oscillate coherently. Each dipole*

_{j}*i*is affected by the incident wave plus the electric field at location

*i*due to all the other point dipoles

**Ã**

*). The vector of polarizations*

_{ij}**P**

*must satisfy the system of equations*

_{j}*N*dipoles, Eq. (3) is a system of 3

*N*linear equations. The polarizability tensors

*α*are obtained from lattice dispersion relation theory [5–7] or other techniques [8]. The matrix

_{j}**Ã**depends only on the ratio of interdipole separation to wavelength. After

**Ã**has been calculated, Eq. (4) can be solved for

**P**

*, using iterative techniques when*

_{j}*N*≫ 1.

#### 1.2. Method 1

To calculate the electromagnetic field outside and inside the target boundary one can proceed as follows. Once the **P*** _{j}* are obtained from Eq. (4) the electric field at location

*i*can be calculated from

**P**

*are now known dipole polarizations. The interaction matrix*

_{j}**Ã**

*is spatially invariant and depends only on the displacement between*

_{ij}*i*and

*j*. For the special case of near field calculation at the dipole locations inside the target, instead of performing sums in Eq. (5) one can immediately obtain the electric field

**E**=

**E**

_{inc}+

**E**

_{scat}as

*α*depends only on the local refractive index

_{i}*m*. In many applications one is often interested in the near field outside the target. This can be evaluated directly from Eq. (5); this method was implemented in program ddfield in version 7 of DDSCAT [9] and in ADDA [10]. However, if the number of locations

*N*

_{loc}is large this method of direct summmation, with complexity

*O*(3

*N*

_{target}× 3

*N*

_{loc}), is computationally very slow.

#### 1.3. Method 2

It is possible to solve the near field problem by extending the target shape with pseudo-vacuum sites such that refractive index *m* is set close to 1 for the vacuum sites and solving scattering problem Eq. (3) directly. In such case

**E**at grid sites is obtained directly from Eq. (6). The problem with such an approach is that the iterative procedure is carried out for an extended target and that (for example, in the current DDSCAT implementation) the refractive index of pseudo-vacuum sites can not be set exactly to 1 as ${\alpha}_{i}^{-1}\to \infty $ in such a case. Because this algorithm employs fast-Fourier transform (FFT) techniques [11] to speed the matrix-vector multiplications, the complexity of the algorithm is

*O*[3

*N*

_{target+vacuum}×

*M*log(3

*N*

_{target+vacuum})], where

*M*is number of conjugate gradient iterations. This can be much faster than method 1, but is burdened by the need to include the pseudo-vacuum sites in the iterative solution of Eq. (4). This method is also mentioned in documentation of the ADDA code [8].

A requirement of the original DDA calculation is that the grid spacing *d* be small enough that the structure in both **E** and the target be well-resolved (the usual criterion is |*m*|*k*_{0}*d* < 0.5) and therefore this grid is well-suited for sampling the near-field.

## 2. Method 3 - main results

It is possible to calculate the near-field sums in Eq. (5) by using just one matrix times vector operation. To calculate **E** on a user-selected grid one first does a DDA calculation for the target shape with *N*_{target} dipole sites to obtain the polarizations vector **P**_{target}. Then, using the original lattice on which the dipoles are located, we define a rectangular volume within which we wish to compute **E**. The matrix times vector calculation in Eq. (5) is performed, giving the solution

*O*[3

*N*

_{target+sites}× log(3

*N*

_{target+sites})]. This method exploits the fact that calculation of Eq. (5) can be performed efficiently using FFTs [11] provided the near-field sites are located on the regular rectangular grid including the original target.

## 3. Implementation and results

We now discuss implementation of Method 3 in DDSCAT, taking advantage of efficient matrix-vector calculation using FFTs. In addition, the matrix **Ã** is not explicitly stored. We perform two calculations using DDSCAT. First we solve for the polarization **P*** _{j}* at the original target dipole sites. The second calculation extends the original target shape with the vacuum sites with

**P**

*= 0 at which*

_{i}**E**is to be calculated. This gives the following extended polarization vector

*N*

_{ext}. The grid contains all of the original sites and extended vacuum sites.

For a sphere with diameter *D* = 40*d* the results are presented in Fig. 1. The total internal and near field electric field intensity is shown in a rectangular volume of size 1.5*D*×1.5*D*×1.5*D* (60×60×60 lattice sites) centered on the sphere. The refractive index is *m* = 0.96 + 1.01*i* and size parameter *x* = 5. For this highly absorptive case the intensity of the total electric field is small inside the sphere.

Figure 2 compares the computational time requirements for the different methods. For each method we show the total computational time, including iterative solution for the polarization. All computations were performed in single precision with DDSCAT 7.2, except for the Method 1 nearfield computation, which used the program ddfield from the DDSCAT 7.1 distribution. The polarization solution was required to converge to an error tolerance of 10^{−5}. In Method 2, the pseudovacuum refractive index was set to 1 + 10^{−6}. For Methods 1 and 3 we used the PBCGST method from the Parallel Iterative Methods (PIM) package [12], which converged in 11–12 iterations. For Method 2, the PBCGST method failed to converge because of numerical problems associated with the small polarizabiities of the pseudovacuum sites, and we instead used the PBCGS2 method [13], which required 26 iterations.

Method 3 is about 10 times faster than Method 2. For a 90×90×90 grid, Method 3 is about 500 times faster than Method 1. The difference in computation time between Method 1 and Method 3 is largely due to the *N*_{target} × *N*_{nearfield} scaling for Method 1 vs. the *N* log *N* scaling of Method 3, where *N*_{target} is the number of dipoles in the target, *N*_{nearfield} is the number of points where the nearfield is calculated, and *N* = *N*_{target} + *N*_{nearfield}.

The computational differences between Methods 2 and 3 depend on the problem configuration, i.e., the number *N*_{nearfield} of pseudo-vacuum dipoles needed for the extended problem, the value of the refractive index used for the pseudo-vacuum dipole sites, and the conjugate gradient method used. In the limiting case of *no* additional pseudo-vacuum dipoles, i.e. when near field is only needed inside the target, the numerical complexity of Methods 2 and 3 is the same. In the limit of very large number of pseudo-vacuum sites in comparison to occupied target sites the time difference will be dominated by the matrix times vector multiplications. Such difference depends on number of iterations and number of matrix times vector multiplications needed per conjugate gradient method iteration (typically between 6–12). In more realistic cases of similar numbers of target sites and pseudo-vacuum sites, like the one presented here (with *N*_{nearfield}/*N*_{target} ≈ (81/4*π*) ≈ 6.5) the total time for method 2 and 3 is dominated by the solution time itself, i.e. it is proportional to *MN* log*N*. However, at least in the DDSCAT implementation, the accuracy of method 2 is limited because the solution diverges for refractive index equal to vacuum.

Also shown are timings for the two parts of Method 3: the time required to solve for **P**_{target}, and the additional time required for the nearfield calculation after **P**_{target} has been found. For this case, the time required to iteratively solve for **P**_{target} is about 5 times greater than the time required by the subsequent nearfield calculation.

## 4. Summary

A new method (Method 3) for calculation of the near field in the Discrete Dipole Approximation is presented. It exploits the fact that calculation of sums in Eq. (5) can be performed efficiently for sites defined on a regular rectangular grid which includes the original target. The method is consistently faster in comparison to Method 1 even for moderate amount of dipoles such as 40×40×40 dipole grid. The method is implemented in version 7.2 of the public-domain code DDSCAT.

## Acknowledgments

BTD was supported in part by NSF grant AST-1008570.

## References and links

**1. **A. G. Hoekstra, J. Rahola, and P. Sloot, “Accuracy of internal fields in volume integral equation simulations of light scattering,” Appl. Opt. **37**, 8482–8497 (1998). [CrossRef]

**2. **H. Xu, “Electromagnetic energy flow near nanoparticles.I: single spheres,” J. Quant. Spectrosc. Radiat. Transfer **87**, 53–67 (2004). [CrossRef]

**3. **P. W. Barber and S. C. Hill, “Light scattering by particles: computational methods,” World Scientific Publishing, Singapore, ISBN:9971-50-813-3 (1990).

**4. **M. Karamehmedovic, R. Schuh, V. Schmidt, T. Wriedt, C. Matyssek, W. Hergert, A. Stalmashonak, G. Seifert, and O. Stranik, “Comparison of numerical methods in near-field computation for metallic nanoparticles,” Opt. Exp. **19**, 8939–8953 (2011). [CrossRef]

**5. **B. T. Draine and P. J. Flatau, “Discrete dipole approximation for scattering calculations,” J. Opt. Soc. Am. A **11**, 1491–1499 (1994). [CrossRef]

**6. **B. T. Draine and J. J. Goodman, “Beyond Clausius-Mossotti: Wave Propagation on a Polarizable Point Lattice and the Discrete Dipole Approximation,” Astrophys. J. **16**, 1198–1200 (1993).

**7. **D. Gutkowicz-Krusin and B. T. Draine, “Propagation of Electromagnetic Waves on a Rectangular Lattice of Polarizable Points,” arXiv:astro-ph/0403082 (2004).

**8. **M. A. Yurkin, M. Min, and A. G. Hoekstra, “Application of the discrete dipole approximation to very large refractive indices: Filtered coupled dipoles revived,” Phys. Rev. E **82**, 036703-1–036703-12 (2010). [CrossRef]

**9. **B. T. Draine and P. J. Flatau, “Discrete-dipole approximation for periodic targets: theory and tests,” J. Opt. Soc. Am. A **25**, 2693–2703 (2008). [CrossRef]

**10. **M. A. Yurkin and A. G. Hoekstra, “The discrete-dipole-approximation code ADDA: capabilities and known limitations,” J. Quant. Spectrosc. Radiat. Transfer, doi: [CrossRef] (2011).

**11. **J. J. Goodman, B. T. Draine, and P. J. Flatau, “Application of FFT Techniques to the Discrete Dipole Approximation,” Opt. Lett. **16**, 1198–1200 (1991). [CrossRef] [PubMed]

**12. **R. da Cunha and T. Hopkins, “PIM 2.0 The Parallel Iterative Methods Package for Systems of Linear Equations User’s Guide (Fortran 77 version),” Technical report. UKC, University of Kent, Canterbury, UK (1996).

**13. **G. Sleijpen and H. van der Vorst, “Reliable updated residuals in hybrid BiCG methods,” Computing , **56**, 141–163 (1996). [CrossRef]