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
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 . 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 wave5] for Ãij). The vector of polarizations Pj must satisfy the system of equations Eq. (3) is a system of 3N linear equations. The polarizability tensors αj are obtained from lattice dispersion relation theory [5–7] or other techniques . The matrix Ã depends only on the ratio of interdipole separation to wavelength. After Ã has been calculated, Eq. (4) can be solved for Pj, using iterative techniques when N ≫ 1.
1.2. Method 1
To calculate the electromagnetic field outside and inside the target boundary one can proceed as follows. Once the Pj are obtained from Eq. (4) the electric field at location i can be calculated fromEq. (5) one can immediately obtain the electric field E = Einc + Escat as Eq. (5); this method was implemented in program ddfield in version 7 of DDSCAT  and in ADDA . However, if the number of locations Nloc is large this method of direct summmation, with complexity O(3Ntarget × 3Nloc), 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 caseEq. (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 in such a case. Because this algorithm employs fast-Fourier transform (FFT) techniques  to speed the matrix-vector multiplications, the complexity of the algorithm is O[3Ntarget+vacuum × M log(3Ntarget+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 .
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|k0d < 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 Ntarget dipole sites to obtain the polarizations vector Ptarget. 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 solutionEq. (5) can be performed efficiently using FFTs  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 Pj at the original target dipole sites. The second calculation extends the original target shape with the vacuum sites with Pi = 0 at which E is to be calculated. This gives the following extended polarization vector
For a sphere with diameter D = 40d 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.5D×1.5D×1.5D (60×60×60 lattice sites) centered on the sphere. The refractive index is m = 0.96 + 1.01i 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 , 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 , 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 Ntarget × Nnearfield scaling for Method 1 vs. the N log N scaling of Method 3, where Ntarget is the number of dipoles in the target, Nnearfield is the number of points where the nearfield is calculated, and N = Ntarget + Nnearfield.
The computational differences between Methods 2 and 3 depend on the problem configuration, i.e., the number Nnearfield 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 Nnearfield/Ntarget ≈ (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 logN. 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 Ptarget, and the additional time required for the nearfield calculation after Ptarget has been found. For this case, the time required to iteratively solve for Ptarget is about 5 times greater than the time required by the subsequent nearfield calculation.
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.
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).
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]