A fast direct solver for surface-based whole-head modeling of transcranial magnetic stimulation

S. N. Makaroff, Z. Qi, M. Rachh, W. A. Wartman, K. Weise, G. M. Noetscher, M. Daneshzand, Zhi De Deng, L. Greengard, A. R. Nummenmaa

Research output: Contribution to journalArticlepeer-review


When modeling transcranial magnetic stimulation (TMS) in the brain, a fast and accurate electric field solver can support interactive neuronavigation tasks as well as comprehensive biophysical modeling. We formulate, test, and disseminate a direct (i.e., non-iterative) TMS solver that can accurately determine global TMS fields for any coil type everywhere in a high-resolution MRI-based surface model with ~ 200,000 or more arbitrarily selected observation points within approximately 5 s, with the solution time itself of 3 s. The solver is based on the boundary element fast multipole method (BEM-FMM), which incorporates the latest mathematical advancement in the theory of fast multipole methods—an FMM-based LU decomposition. This decomposition is specific to the head model and needs to be computed only once per subject. Moreover, the solver offers unlimited spatial numerical resolution. Despite the fast execution times, the present direct solution is numerically accurate for the default model resolution. In contrast, the widely used brain modeling software SimNIBS employs a first-order finite element method that necessitates additional mesh refinement, resulting in increased computational cost. However, excellent agreement between the two methods is observed for various practical test cases following mesh refinement, including a biophysical modeling task. The method can be readily applied to a wide range of TMS analyses involving multiple coil positions and orientations, including image-guided neuronavigation. It can even accommodate continuous variations in coil geometry, such as flexible H-type TMS coils. The FMM-LU direct solver is freely available to academic users.

Original languageEnglish (US)
Article number18657
JournalScientific reports
Issue number1
StatePublished - Dec 2023

ASJC Scopus subject areas

  • General


Dive into the research topics of 'A fast direct solver for surface-based whole-head modeling of transcranial magnetic stimulation'. Together they form a unique fingerprint.

Cite this