# Discrete dipole approximation

Discrete dipole approximation (DDA), also known as coupled dipole approximation, is a method for computing scattering of radiation by particles of arbitrary shape and by periodic structures. Given a target of arbitrary geometry, one seeks to calculate its scattering and absorption properties by an approximation of the continuum target by a finite array of small polarizable dipoles. This technique is used in a variety of applications including nanophotonics, radar scattering, aerosol physics and astrophysics.

## Basic concepts

The basic idea of the DDA was introduced in 1964 by DeVoe who applied it to study the optical properties of molecular aggregates; retardation effects were not included, so DeVoe's treatment was limited to aggregates that were small compared with the wavelength. The DDA, including retardation effects, was proposed in 1973 by Purcell and Pennypacker who used it to study interstellar dust grains. Simply stated, the DDA is an approximation of the continuum target by a finite array of polarizable points. The points acquire dipole moments in response to the local electric field. The dipoles interact with one another via their electric fields, so the DDA is also sometimes referred to as the coupled dipole approximation.
Nature provides the physical inspiration for the DDA - in 1909 Lorentz showed that the dielectric properties of a substance could be directly related to the polarizabilities of the individual atoms of which it was composed, with a particularly simple and exact relationship, the Clausius-Mossotti relation (or Lorentz-Lorenz), when the atoms are located on a cubical lattice. We may expect that, just as a continuum representation of a solid is appropriate on length scales that are large compared with the interatomic spacing, an array of polarizable points can accurately approximate the response of a continuum target on length scales that are large compared with the interdipole separation.
For a finite array of point dipoles the scattering problem may be solved exactly, so the only approximation that is present in the DDA is the replacement of the continuum target by an array of N-point dipoles. The replacement requires specification of both the geometry (location of the dipoles) and the dipole polarizabilities. For monochromatic incident waves the self-consistent solution for the oscillating dipole moments may be found; from these the absorption and scattering cross sections are computed. If DDA solutions are obtained for two independent polarizations of the incident wave, then the complete amplitude scattering matrix can be determined. Alternatively, the DDA can be derived from volume integral equation for the electric field. This highlights that the approximation of point dipoles is equivalent to that of discretizing the integral equation, and thus decreases with decreasing dipole size.
With the recognition that the polarizabilities may be tensors, the DDA can readily be applied to anisotropic materials. The extension of the DDA to treat materials with nonzero magnetic susceptibility is also straightforward, although for most applications magnetic effects are negligible.
There are several reviews of DDA method.
The method was improved by Draine, Flatau, and Goodman, who applied the fast Fourier transform to solve fast convolution problems arising in the discrete dipole approximation (DDA). This allowed for the calculation of scattering by large targets. They distributed an open-source code DDSCAT. There are now several DDA implementations, extensions to periodic targets, and particles placed on or near a plane substrate. Comparisons with exact techniques have also been published. Other aspects, such as the validity criteria of the discrete dipole approximation, were published. The DDA was also extended to employ rectangular or cuboid dipoles, which are more efficient for highly oblate or prolate particles.

## Fast Fourier Transform for fast convolution calculations

The Fast Fourier Transform (FFT) method was introduced in 1991 by Goodman, Draine, and Flatau for the discrete dipole approximation. They utilized a 3D FFT GPFA written by Clive Temperton. The interaction matrix was extended to twice its original size to incorporate negative lags by mirroring and reversing the interaction matrix. Several variants have been developed since then. Barrowes, Teixeira, and Kong in 2001 developed a code that uses block reordering, zero padding, and a reconstruction algorithm, claiming minimal memory usage. McDonald, Golden, and Jennings in 2009 used a 1D FFT code and extended the interaction matrix in the x, y, and z directions of the FFT calculations, suggesting memory savings due to this approach. This variant was also implemented in the MATLAB 2021 code by Shabaninezhad and Ramakrishna. Other techniques to accelerate convolutions have been suggested in a general context along with faster evaluations of Fast Fourier Transforms arising in DDA problem solvers.

## Conjugate gradient iteration schemes and preconditioning

Some of the early calculations of the polarization vector were based on direct inversion and the implementation of the conjugate gradient method by Petravic and Kuo-Petravic. Subsequently, many other conjugate gradient methods have been tested. Advances in the preconditioning of linear systems of equations arising in the DDA setup have also been reported.

## Thermal discrete dipole approximation

Thermal discrete dipole approximation is an extension of the original DDA to simulations of near-field heat transfer between 3D arbitrarily-shaped objects.

## Discrete dipole approximation codes

Most of the codes apply to arbitrary-shaped inhomogeneous nonmagnetic particles and particle systems in free space or homogeneous dielectric host medium. The calculated quantities typically include the Mueller matrices, integral cross-sections (extinction, absorption, and scattering), internal fields and angle-resolved scattered fields (phase function). There are some published comparisons of existing DDA codes.

### General-purpose open-source DDA codes

These codes typically use regular grids (cubical or rectangular cuboid), conjugate gradient method to solve large system of linear equations, and FFT-acceleration of the matrix-vector products which uses convolution theorem. Complexity of this approach is almost linear in number of dipoles for both time and memory.
| Name | Authors | Language | Updated | Features |
| DDSCAT | Draine and Flatau | Fortran | 2019 (v. 7.3.3) | Can also handle periodic particles and efficiently calculate near fields. Uses OpenMP acceleration. |
| DDscat.C++ | Choliy | C++ | 2017 (v. 7.3.1) | Version of DDSCAT translated to C++ with some further improvements. |
| ADDA | Yurkin, Hoekstra, and contributors | C | 2020 (v. 1.4.0) | Implements fast and rigorous consideration of a plane substrate, and allows rectangular-cuboid voxels for highly oblate or prolate particles. Can also calculate emission (decay-rate) enhancement of point emitters. Near-fields calculation is not very efficient. Uses Message Passing Interface (MPI) parallelization and can run on GPU (OpenCL). |
| OpenDDA | McDonald | C | 2009 (v. 0.4.1) | Uses both OpenMP and MPI parallelization. Focuses on computational efficiency. |
| DDA-GPU | Kieß | C++ | 2016 | Runs on GPU (OpenCL). Algorithms are partly based on ADDA. |
| VIE-FFT | Sha | C/C++ | 2019 | Also calculates near fields and material absorption. Named differently, but the algorithms are very similar to the ones used in the mainstream DDA. |
| VoxScatter | Groth, Polimeridis, and White | Matlab | 2019 | Uses circulant preconditioner for accelerating iterative solvers |
| IF-DDA | Chaumet, Sentenac, and Sentenac | Fortran, GUI in C++ with Qt | 2021 (v. 0.9.19) | Idiot-friendly DDA. Uses OpenMP and HDF5. Has a separate version (IF-DDAM) for multi-layered substrate. |
| MPDDA | Shabaninezhad, Awan, and Ramakrishna | Matlab | 2021 (v. 1.0) | Runs on GPU (using Matlab capabilities) |

### Specialized DDA codes

These list include codes that do not qualify for the previous section. The reasons may include the following: source code is not available, FFT acceleration is absent or reduced, the code focuses on specific applications not allowing easy calculation of standard scattering quantities.
| Name | Authors | Language | Updated | Features |
| DDSURF, DDSUB, DDFILM | Schmehl, Nebeker, and Zhang | Fortran | 2008 | Rigorous handling of semi-infinite substrate and finite films (with arbitrary particle placement), but only 2D FFT acceleration is used. |
| DDMM | Mackowski | Fortran | 2002 | Calculates T-matrix, which can then be used to efficiently calculate orientation-averaged scattering properties. |
| CDA | McMahon | Matlab | 2006 | |
| DDA-SI | Loke | Matlab | 2014 (v. 0.2) | Rigorous handling of substrate, but no FFT acceleration is used. |
| PyDDA | Dmitriev | Python | 2015 | Reimplementation of DDA-SI |
| e-DDA | Vaschillo and Bigelow | Fortran | 2019 (v. 2.0) | Simulates electron-energy loss spectroscopy and cathodoluminescence. Built upon DDSCAT 7.1. |
| DDEELS | Geuquet, Guillaume and Henrard | Fortran | 2013 (v. 2.1) | Simulates electron-energy loss spectroscopy and cathodoluminescence. Handles substrate through image approximation, but no FFT acceleration is used. |
| T-DDA | Edalatpour | Fortran | 2015 | Simulates near-field radiative heat transfer. The computational bottleneck is direct matrix inversion (no FFT acceleration is used). Uses OpenMP and MPI parallelization. |
| CDDA | Rosales, Albella, González, Gutiérrez, and Moreno | | 2021 | Applies to chiral systems (solves coupled equations for electric and magnetic fields) |
| PyDScat | Yibin Jiang, Abhishek Sharma and Leroy Cronin | Python | 2023 | Simulates nanostructures undergoing structural transformation with GPU acceleration. |

## Gallery of shapes

* Scattering by periodic structures such as slabs, gratings, of periodic cubes placed on a surface, can be solved in the discrete dipole approximation.
* Scattering by infinite object (such as cylinder) can be solved in the discrete dipole approximation.