# Synergistic use of ADDA and IFDDA to enhance iterative solvers in the discrete dipole approximation

Clément Argentin, Maxim A. Yurkin

► To cite this version:

Clément Argentin, Maxim A. Yurkin. Synergistic use of ADDA and IFDDA to enhance iterative solvers in the discrete dipole approximation. Bremen Workshop on Light Scattering 2025, University of Bremen, Mar 2025, Bremen, Germany. pp.28-34. hal-05060837

HAL Id: hal-05060837

https://hal.science/hal-05060837v1

Submitted on 8 May 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Synergistic use of ADDA and IFDDA to enhance iterative solvers in the discrete dipole approximation

C. Argentin¹ and M. A. Yurkin¹

¹Université Rouen Normandie, INSA Rouen Normandie, CNRS, CORIA UMR 6614 - Rouen, F-76000, France, argentic@coria.fr

We present a new workflow that seamlessly combines IFDDA and ADDA to capitalize on the strengths of each code. Specifically, we use IFDDA to generate advanced initial fields (e.g., the uGu scalar approximation) and give them to ADDA's solvers. Our initial tests on large, optically soft spheres show that using IFDDA's uGu initialization in ADDA can accelerate iterative solver and thus reduce overall computation time.

## Introduction

Light scattering by complex or inhomogeneous objects is commonly simulated using the discrete dipole approximation (DDA) [1]. In the DDA, the target is divided into a set of voxels (dipoles), and the resulting coupled dipole interactions are solved iteratively to obtain the internal and, further, scattered fields. Although straightforward in principle, the method can be computationally demanding because it requires solving a large, dense system of linear equations.

Various open-source DDA implementations exist [1]. For example, ADDA emphasizes high performance through the message passing interface (MPI) standard, as well as portability, and provides extensive features to calculate scattering quantities [2]. In contrast, IFDDA (Institut-Fresnel or Idiot-Friendly DDA) targets problems involving multi layered media or microscopy configurations, offering specialized treatments for substrates, preconditioning solutions, and alternative initial-field
options [3]. Despite their differing focuses, both codes rely on
iterative methods such as the biconjugate gradient stabilized
(BiCGSTAB) or quasi-minimal residual (QMR) to handle the
dense matrix-vector problem. When the object is large or has a
refractive index significantly different from the ambient medium,
these methods may require numerous iterations, making any
method that reduces their convergence time extremely valuable.

In practice, one might want to compute the direct scattering
pattern multiple times for a wide range of particle sizes, shapes,
and optical properties. For large, optically soft particles, where
$|m - 1| \ll 1$ and $x \gg 1$ (where $m$ is the refractive index and
$x = ka$ is the size parameter, with the wave vector $k$ and the ef-
fective particle radius $a$), optimizing the DDA iterative solution
becomes essential, as the target may need hundreds of millions
of voxels. Employing more advanced initial guesses (e.g., scalar
approximations) or preconditioners can substantially reduce the
required number of iterations and thus the overall computational
time.

Combining ADDA and IFDDA

Our motivation for a synergistic approach is that, although
ADDA and IFDDA both implement the DDA, they each have
distinctive strengths. By combining them, we aim to: lever-
age the advanced initial guesses from IFDDA’s scalar solutions;
exploit ADDA’s high-performance architecture (MPI support,
portability, and efficiency) to handle large systems more effi-
ciently; integrate these steps via Python scripts, so that users
can seamlessly switch between IFDDA and ADDA depending
on the simulation scenario.

This synergy is particularly relevant for large, optically soft
spheres, where an accurate initial guess can reduce the number
of iterations or even, in extreme cases, enabling a reasonable
convergence [4].

A key step toward unifying ADDA and IFDDA involved en-
abling a fully scriptable workflow in IFDDA, which was origi-
nally designed with a graphical user interface. To achieve this,
we introduced modifications in its Fortran source to accept command line arguments. These changes allow IFDDA to run automatically from external scripts without any user intervention.

We also introduced command-line argument parsing to read scattering parameters, such as object geometry, polarizability type, iterative methods and corresponding convergence threshold, from a configuration file. As a result, a Python script can dynamically construct a set of simulation configurations, run IFDDA for each configuration, and extract the corresponding field distributions in a batch process.

Once an IFDDA run is completed, the computed internal field, in particular the uGu scalar approximation [6] can be extracted and transformed to serve as the starting guess for ADDA's iterative method. A secondary script then transforms IFDDA's parameters definitions into ADDA's command-input format, ensuring that both geometry and material parameters coincide between the two codes. When ADDA is subsequently launched, it can benefit from the refined initial field provided by IFDDA.

We validated this workflow by running multiple tests with different objects and scattering problems while specifying various iterative methods and DDA formulations in both ADDA and IFDDA. Importantly, some (but not all) of those simulation options have exact equivalence between the two codes. If any of such equivalent combinations is used, the initial residual and final simulated quantities agree within many (potentially all shown) digits, much better than the accuracy of both codes in comparison with some reference. These comparisons proved consistent interoperability across the two codes.

## Results

To assess the benefit of reusing IFDDA's advanced initial fields in ADDA, we performed a set of numerical experiments on large, optically soft spheres. Specifically, we generated a uGu field in IFDDA, by taking advantage of its scalar approximation, and used it as the initial guess for ADDA's iterative method. For
comparison, we also ran ADDA using a zero initial guess (i.e., null field) and with an approximate WKB (Wentzel-Kramers-Brillouin) field. Our focus was on monitoring the number of iterations required for convergence and the relative residual value, defined here as

$$ \eta^{(k)} = \frac{\| \mathbf{A} \mathbf{x}^{(k)} - \mathbf{b} \|}{\| \mathbf{b} \|}, \qquad (1) $$

where the components of the linear system $\mathbf{A}\mathbf{x} = \mathbf{b}$ are the field after $k$ iterations $\mathbf{x}^{(k)}$, the interaction matrix $\mathbf{A}$, and potentially scaled incident field $\mathbf{b}$. Convergence is declared once $\eta^{(k)}$ drops below a specified threshold (here, $10^{-6}$).

Figure 1(a) shows a convergence plot for a sphere ($m = 1.05$ and $x = 50$) with the QMR method and the radiative reaction correction for the polarizability [5]. While it is definitely not the optimal formulation, it is the one which is implemented exactly the same in both codes. The curves compare: zero field initialization (green dashed line), a standard but often suboptimal approach; WKB field (red solid line), a known approximation that can capture forward propagation effects; uGu field (black dotted line), a scalar approximation of the linear system. In the latter case, the electric field is assumed to remain polarized along a single direction, transforming the vector problem into a scalar system. As shown by [6, 7], the solution of this scalar system can be obtained rapidly, and using it as the starting guess in the full DDA system often reduces the number of iterations.

One can observe that zero initialization starts with $\eta = 1$ since the initial field $\mathbf{x}_0$ is set to zero field, making $\mathbf{b}$ normalized by itself in Eq. 1. In contrast, uGu and WKB begin from more physically meaningful guesses, leading to the starting residual already below 1, thus requiring fewer iterations to reach a target threshold.

Notably, the uGu curve which requires the less number of iteration to converge, achieving a reduction by nearly 29% in the iteration count relative to the zero and 17% to WKB approach. The relative acceleration values will be even more impressive if the convergence threshold is set to a higher value, e.g., $10^{-3}$. This outcome is consistent with earlier IFDDA studies, which
<figure><img src="image_2.png" /><figcaption>Figure 1: Residual of the iterative method in logarithmic scale versus the iteration count, for a sphere with $x = 50$ and two values of $m$ (1.05, and 1.1), using three different initial fields: uGu, WKB, and zero.</figcaption></figure>

demonstrated that a physically refined scalar guess can accelerate the iterative solver.

Figure 1(b) displays the same convergence plot but for a higher refractive index value $m = 1.1$, thus, a higher iteration count. Once again, employing the uGu initialization from IFDDA yields the most substantial speedup, maybe less effective for large $m$, nearly 12% faster than WKB and 21% than zero.

However, it is worth noting that uGu itself is computed by solving a three-times smaller scalar system in IFDDA with its own stopping criterion $\eta_s$. Therefore, an additional computation time is needed to obtain this initial field. In practice, [7] showed that setting $\eta_s = 10^{-2}$ is sufficient. Then, decreasing $\eta_s$ reduces neither the iteration count nor the initial residual. Our tests corroborate that setting $\eta_s = 10^{-2}$ for uGu generation enables a good compromise between the accuracy of the initial field and the overall computational load. By considering the uGu computational time as extra iterations, we must add about 3 and 15 iterations for $m = 1.05$ and $m = 1.1$, respectively, shifting the uGu curves close to those from the WKB approach. Nevertheless, as highlighted in [7], a suitable preconditioner can reduce this time by accelerating both the scalar and full-vector DDA
solvers, thus restoring or even increasing the overall speedup.

Conclusion

We have demonstrated the interoperability and, hence, robustness of both IFDDA and ADDA codes for a range of DDA formulations and iterative methods. Combining the two codes through a single Python script enhances the DDA efficiency, particularly for large, optically soft spheres. By producing a more physically accurate initial field, ADDA’s iterative solver avoids many steps required when starting from a naive guess. In future work, we plan to extend this synergy to a wider range of particles, including much larger ones, while investigating preconditioning solutions that reduce runtime for both the scalar and vector iterative solutions.

References

[1] M. A. Yurkin, *Discrete dipole approximation*, in Light, Plasmonics and Particles (Elsevier, 2023), M. P. Menguc and M. Francoeur, eds., pp. 167–198.

[2] M. A. Yurkin, A. G. Hoekstra, *The discrete dipole approximation code ADDA: Capabilities and known limitations*, J. Quant. Spectrosc. Radiat. Transfer **112** (2011), 2234–2247.

[3] P. Chaumet, D. Sentenac, G. Maire, M. Rasedujjaman, T. Zhang, A. Sentenac, IFDDA, an easy-to-use code for simulating the field scattered by 3D inhomogeneous objects in a stratified medium: tutorial, J. Opt. Soc. Am. A **38** (2021), 1841–1852.

[4] K. G. Inzhevatkin, M. A. Yurkin, *Uniform over size approximation of the internal fields for scatterers with low refractive-index contrast*, J. Quant. Spectrosc. Radiat. Transfer **277** (2022), 107965.
[5] B. T. Draine, *The Discrete-Dipole Approximation and Its Application to Interstellar Graphite Grains*, Astrophys. J. **333** (1988), 848.

[6] P. C. Chaumet, G. Maire, A. Sentenac, *Scalar approximation of Maxwell equations: derivation and accuracy*, J. Opt. Soc. Am. A **39** (2022), 1462.

[7] P. C. Chaumet, G. Maire, A. Sentenac, *Accelerating the discrete dipole approximation by initializing with a scalar solution and using a circulant preconditioning*, J. Quant. Spectrosc. Radiat. Transfer **298** (2023), 108505,