A software toolkit for TMS electric-field modeling with boundary element fast multipole method: an efficient MATLAB implementation
Related Experiment Video
Updated: Dec 25, 2025

Finite Element Modelling of a Cellular Electric Microenvironment
Published on: May 18, 2021
Sergey N Makarov1,2,3, William A Wartman1, Mohammad Daneshzand2
1Electrical & Computer Engineering Department, Worcester Polytechnic Institute, Worcester, MA 01609 United States of America.
Objective:
To present and disseminate our transcranial magnetic stimulation (TMS) modeling software toolkit, including several new algorithmic developments, and to apply this software to realistic TMS modeling scenarios given a high-resolution model of the human head including cortical geometry and an accurate coil model.
Approach:
The recently developed charge-based boundary element fast multipole method (BEM-FMM) is employed as an alternative to the 1st order finite element method (FEM) most commonly used today. The BEM-FMM approach provides high accuracy and unconstrained numerical field resolution close to and across cortical interfaces. Here, the previously proposed BEM-FMM algorithm has been improved in several novel ways.
Main Results:
The improvements resulted in a threefold increase in computational speed while maintaining the same solution accuracy. The computational code based on the MATLAB® platform is made available to all interested researchers, along with a coil model repository and examples to create custom coils, head model repository, and supporting documentation. The presented software toolkit may be useful for post-hoc analyses of navigated TMS data using high-resolution subject-specific head models as well as accurate and fast modeling for the purposes of TMS coil/hardware development.
Significance:
TMS is currently the only non-invasive neurostimulation modality that enables painless and safe supra-threshold stimulation by employing electromagnetic induction to efficiently penetrate the skull. Accurate, fast, and high resolution modeling of the electric fields may significantly improve individualized targeting and dosing of TMS and therefore enhance the efficiency of existing clinical protocols as well as help establish new application domains.
Related Concept Videos
Electrostatic Boundary Conditions
The surface integral of an electric field is given by Gauss's law in integral form and is related to...
Electrostatic Boundary Conditions in Dielectrics
Consider a case where both the mediums across a boundary are two different dielectric materials. Recall that the electric field and electric displacement are proportional and related through the material's permittivity....
Magnetostatic Boundary Conditions
Boundary Conditions for Current Density
Electromagnetic Fields
However, the observation of...
Plane Electromagnetic Waves II

