Abstract
Objective. In our recent work pertinent to modeling of brain stimulation and neurophysiological recordings, substantial modeling errors in the computed electric field and potential have sometimes been observed for standard multi-compartment head models. The goal of this study is to quantify those errors and, further, eliminate them through an adaptive mesh refinement (AMR) algorithm. The study concentrates on transcranial magnetic stimulation (TMS), transcranial electrical stimulation (TES), and electroencephalography (EEG) forward problems. Approach. We propose, describe, and systematically investigate an AMR method using the boundary element method with fast multipole acceleration (BEM-FMM) as the base numerical solver. The goal is to efficiently allocate additional unknowns to critical areas of the model, where they will best improve solution accuracy. The implemented AMR method’s accuracy improvement is measured on head models constructed from 16 Human Connectome Project subjects under problem classes of TES, TMS, and EEG. Errors are computed between three solutions: an initial non-adaptive solution, a solution found after applying AMR with a conservative refinement rate, and a ‘silver-standard’ solution found by subsequent 4:1 global refinement of the adaptively-refined model. Main results. Excellent agreement is shown between the adaptively-refined and silver-standard solutions for standard head models. AMR is found to be vital for accurate modeling of TES and EEG forward problems for standard models: an increase of less than 25% (on average) in number of mesh elements for these problems, efficiently allocated by AMR, exposes electric field/potential errors exceeding 60% (on average) in the solution for the unrefined models. Significance. This error has especially important implications for TES dosing prediction—where the stimulation strength plays a central role—and for EEG lead fields. Though the specific form of the AMR method described here is implemented for the BEM-FMM, we expect that AMR is applicable and even required for accurate electromagnetic simulations by other numerical modeling packages as well.
Keywords: adaptive mesh refinement, boundary element method, fast multipole method, transcranial magnetic stimulation, transcranial electrical stimulation, boundary element fast multipole method, electroencephalography
1. Introduction
In the last decade, noninvasive electrical neurostimulation methods have been increasingly popular topics of research and application for a wide variety of psychiatric disorders. Transcranial magnetic stimulation (TMS), in which an electromagnetic coil placed on the scalp induces electrical currents in the brain, has been applied to depression (Brunoni et al 2017), anxiety (Diefenbach et al 2016), and addiction (Antonelli et al 2021), among other uses. Transcranial electrical stimulation (TES), in which electrodes placed on the scalp inject current directly through the intervening tissues into the brain, has been applied to study problems including Alzheimer’s Disease (Cespón et al 2019), depression (Al-Kaysi et al 2017), and epilepsy (Del Felice et al 2015). Electroencephalography (EEG) has been applied in conjunction with both TMS and TES (Del Felice et al 2015, Al-Kaysi et al 2017, Cespón et al 2019, Tremblay et al 2019) to quantify and localize neuronal responses to stimulation by these methods.
As these methods have been applied to more problems and with greater requirements for precision, pre-stimulation planning and post-stimulation analysis have become vital components of experimental design. The planning and analysis both have been relying increasingly on accurate numerical electromagnetic analysis by open-source packages such as SimNIBS (Thielscher et al 2015), ROAST (Huang et al 2019), and BEM-FMM (Makarov et al 2020a). Such methods, however, are only as accurate as the computational models upon which they operate—frequently segmented from structural magnetic resonance imaging (MRI) data by medical image processing packages such as headreco (Nielsen et al 2018). In 2020, Gomez et al (2020) carried out an investigation on, among other parameters, the necessary computational mesh resolution to accurately simulate TMS trials under various electromagnetic solver formulations. The process was time and attention intensive, requiring construction of progressively higher and higher resolution meshes and comparison against a presumed-accurate result. The meshes in this study were refined globally, resulting in a 4× increase in number of surface elements per refinement level or an 8× increase in number of volumetric elements per refinement level. These are expensive model size increases for guarantees of accurate simulation, but they are the only available means to achieve such a guarantee without a more efficient mechanism.
To this end, we introduce, investigate, and describe a fast, automated adaptive mesh refinement (AMR) method applicable to TES, TMS, and EEG modeling problems. AMR is understood as an automated local refinement of a computational mesh in domains where the discretization error is highest. It is repeated until a user-specified convergence criterion (e.g. relative error between two iterations becomes less than 0.1%) or termination criterion (30 AMR steps elapsed) is met. AMR is a chief feature of commercial ANSYS FEM (Finite Element Method) software for demanding low-frequency, high-frequency, and power applications (Ansys et al 2020). The method is implemented and tested as an extension of our Boundary Element Fast Multipole Method (BEM-FMM), which has been applied to model all three mentioned stimulation/recording modalities (Makarov et al 2020a, 2020b, 2021) in addition to other problems (Iyer et al 2021, Makaroff et al 2023). While several previous bioelectric studies have discussed the effects of meshing accuracy and segmentation accuracy on the solution—see Laakso and Hirata (2012), Windhoff et al (2013), Petrov et al (2017), Piastra et al (2018), Rahmouni et al (2018), Indahlastari et al (2019), Saturnino et al (2019a), Saturnino et al (2019b), Gomez et al (2020), Soldati and Laakso (2020)—to the authors’ knowledge, none of them and none of the major open-source electromagnetic modeling packages for electromagnetic brain stimulation have introduced or used an automated AMR method to date. Mesh refinement, if performed, has been either global (see Gomez et al 2020) or performed by hand (see Weise et al 2023a, 2023b).
Refinement can take two main forms: a geometric bisection of a given element (‘h-refinement’) or an increase of the local approximation order (‘p-refinement’). In this study, we consider only h-refinement. Given an initial finite element approximation, the basic idea of an h-adaptive method is to create a refined partition by subdividing those elements where local error estimators indicate that the error is large; the next approximation to the solution is computed using the newly created model, and the process repeats. Because of their success in practice, the use of such adaptive methods has become more widespread in recent years (Dörfler 1996, Binev et al 2004, Stevenson 2007, Cascon et al 2008). For the boundary element method (BEM), a similar methodology applies (Feischl et al 2013, 2015).
In contrast to FEM-based solvers, BEM-FMM is capable of computing the electric field (E-field) and potential (or pseudo-potential) at any given observation points, including points not known a priori and points arbitrarily close to model interfaces (Makarov et al 2020a). Where FEM-based methods must introduce additional volumetric elements to support such observation points in regions of rapidly-varying E-field, the BEM-FMM can compute a non-interpolated result that is nearly exact for the given (inexact) model geometry and the zeroth-order charge density residing upon it. Adaptive mesh refinement for BEM-FMM was initially introduced in Weise et al (2022) to accurately determine the effects of thin meningeal layers on TMS and TES problems. However, no systematic investigation of the method had yet been carried out and no other applications except for meningeal layers have been considered.
In this work, we introduce and describe the full implementation of an efficient AMR algorithm for BEM-FMM. We systematically evaluate the accuracy improvement achieved due to AMR for TMS, TES, and EEG forward problem classes on realistic human head models. The source code is available for download in an Open Science Framework (OSF) repository (Wartman 2023).
2. Materials and methods
2.1. Charge-based formulation of the boundary element fast multipole method
For TMS, TES following a current-based electrode approximation, and EEG, the BEM-FMM is formulated as a Fredholm equation of the second kind (Makarov et al 2020a, 2020b). For TES problems following a voltage-based electrode approximation, the method additionally incorporates a Fredholm equation of the first kind at the electrode surfaces (Makarov et al 2021).
The present BEM-FMM makes several assumptions about the problem being modeled. First, it assumes that the model can be divided into compartments of homogeneous, linear, isotropic, conductive media. Second, it assumes that any electromagnetic waves have a very long wavelength compared to the model dimensions, so that the problem is quasi-static in nature. Third, it assumes that any secondary magnetic fields are negligible in magnitude compared to any primary magnetic fields.
Following the assumption that compartments of the model are conductive, electric charges cannot accumulate in the volume. They must instead accumulate as surface charges at interfaces (boundaries, surfaces) between materials of different conductivities. Under the quasi-static assumption, these accumulated surface charges are sufficient to fully characterize (via Coulomb’s Law) the secondary electric field which can be added to the primary electric field to recover the total electric field at any arbitrary observation point inside, outside, or on a surface of the model. The electric potential can be similarly recovered at any arbitrary observation point.
The BEM-FMM solution procedure is carried out in two main steps to most efficiently utilize the FMM. The first step is to solve for the charge density that arises on interfaces between different materials due to a primary (external) electric field or enforced electric potential. The second step is to recover field quantities of interest (e.g. electric field, voltage, current density) at any observation points in terms of the primary field and the surface charges induced by that primary field.
Equation (1) (see Brunoni et al 2017, Makarov et al 2020a) is the continuous form of the integral equation when the excitation can be written as a primary (external) electric field
Here, is the set of all points () lying on any boundary (surface) between two materials of different properties, is an arbitrary point on a boundary, is the surface charge density at is the contrast between the conductivity just inside () and just outside () the boundary on which lies, is the unit vector normal to the boundary at is the permittivity of free space, and is the primary electric field incident on the boundary at This equation is to be solved for the surface charge density
For TMS, the primary electric field on the right-hand side of equation (1) can be written in terms of the magnetic vector potential applied by the coil when driven by a time-varying electric current as described in appendix A of Makarov et al (2020a). For TES electrodes that are assumed to inject a uniform current flux density over their area, the primary electric field can be written in terms of the injected current density and the conductivity of the interior tissue (and set to zero for any facet that does not touch an electrode) (Makarov et al 2021). For EEG, the primary field radiates from clusters of charge dipoles and can be evaluated by FMM-accelerated application of Coulomb’s Law (Makarov et al 2020b).
The head model is constructed as a collection of triangular surface meshes representing the boundaries between different tissues. The charge density is expanded in terms of zeroth-order (pulse) basis functions—in other words, the charge density is assumed to be constant over the entire surface of any individual facet m, but may vary facet-to-facet. Discretizing equation (1) via the Galerkin method, equation (2) is obtained
In equation (2), denotes the total number of triangular surface elements in the model. Equation (2) can be rewritten in matrix form as
Note that the matrix is never explicitly constructed in the BEM-FMM; instead, the FMM (Greengard et al 1987, Gimbutas et al 2019, fmmlib3db 2021) is applied in conjunction with a sparse near-field correction to directly compute the matrix-vector product when necessary. The on-diagonal elements describe the self-interaction of the planar charge density on triangle The off-diagonal elements describe the average normal component of the E-field contributed to triangle by a charge density residing on triangle
For triangles sufficiently distant (>2 to 5 average triangle radii) from each other, can be approximated as:
where and denote the respective centroids of triangles and Interactions of this form can be accelerated by the FMM. For triangles close to each other, the full double integral over both triangles must be precomputed and applied as a correction to the FMM-accelerated initial computation.
In the matrix equation formulation, the elements of are given by
The system is solved iteratively for using the Generalized Minimum Residual Method (GMRES). Once the charge solution is known, the secondary electric field can be recovered at any observation point not residing directly on a model surface according to equation (7):
This computation can be similarly accelerated via the FMM.
2.2. BEM-FMM formulation for voltage electrodes
Certain problems modeled by the BEM-FMM cannot be straightforwardly written in terms of a primary electric field. For example, if electrodes in a TES problem are assumed to maintain constant electric potentials on their surfaces (‘voltage electrodes’), then the injected current flux density is not necessarily spatially constant and cannot be used to estimate a primary electric field. In this case, the primary electric field is 0 everywhere, and an alternative constraint specified in equation (8) is applied to a subset of where the potential is externally enforced. This constraint is a Fredholm equation of the first kind.
Here, denotes the electric potential that is enforced at For locations that do not touch electrodes or otherwise have an enforced voltage, = 0 and equation (1) is applied as usual. The matrix-fill expression that replaces equation (4) for facets governed by equation (8) is:
where is arranged such that the facets requiring treatment by equation (8) occupy the first rows. For facets sufficiently distant from each other, the FMM can be applied similarly to equation (5). The corresponding entries of are given by:
The different scales of the first-kind and second-kind Fredholm equations implicitly place greater weight on the electrode facets and slow the convergence of the GMRES solution. To alleviate this phenomenon, a left preconditioner is constructed by explicitly forming and inverting This preconditioner directly solves the electrode interactions in isolation from the rest of the model, and GMRES refines the solution to account for the entire model.
For more details on the voltage electrode formulation, we refer interested readers to appendix A of Makarov et al (2021).
2.3. Accuracy limit: 0th order (pulse) basis functions
As stated, the BEM-FMM solves for the charge density that accumulates at interfaces between tissues of differing conductivities. From this charge density, any quantities of interest (e.g. electric field, current density, or electric potential) can be recovered at arbitrarily-positioned observation points, including observation points very close to or lying on the charged interfaces. Under the assumption that the BEM-FMM has produced a physically realistic and accurate charge distribution, the desired quantities can be computed at arbitrary observation points with high accuracy.
The assumption of a realistic charge distribution may sometimes be violated due to the BEM-FMM’s use of zeroth order (pulse) basis functions. These basis functions effectively hold the charge density spatially constant over the area of any given triangle. In complex regions of the model—for example, in regions of sharp curvature or with multiple boundaries in close proximity—the initial mesh may not provide enough facets to support a charge density that varies sufficiently rapidly in a spatial sense. Such infidelity can give rise to multiple sources of error. The more benign is a local error that affects accuracy of field calculations at observation points in the vicinity of the complex region. The more complex is error that affects triangle-to-triangle interactions during the solver’s iterative phase, as this error can propagate to distant regions of the model. As will be shown, EEG and TES forward problems are particularly susceptible to this latter error because their primary electric fields are localized to small regions and depend on triangle-to-triangle interactions to propagate their effects through the model.
2.4. Algorithmic description: AMR applied to BEM-FMM
To mitigate the aforementioned shortcoming of the zeroth order basis functions, an AMR scheme was incorporated into the BEM-FMM. This scheme is based on h-refinement, meaning that it operates by subdividing existing mesh elements into a larger number of smaller elements. It aims to improve the quality of the initial charge solution and subsequent electric field reconstructions by selectively increasing the mesh resolution in critical or complex areas of the model, without unnecessarily increasing mesh resolution in areas experiencing fields or charge densities with low spatial variation. It efficiently allocates additional degrees of freedom in the locations where they will best improve solution accuracy.
As currently implemented, the BEM-FMM augmented by AMR is carried out in alternating steps of ‘Solve’ and ‘Refine’. During the ‘Solve’ step, the incident stimulus/constraints are applied to the current version of the model, and the charge solution is obtained using an iterative solver (GMRES). To preserve existing solution progress, the final charge density solution from the prior model step is chosen as the initial estimate for the charge density solution for the current model. During the ‘Refine’ step, the current model and solution are evaluated, certain facets are selected for subdivision, and neighbor integrals are recomputed. The ‘Refine’ step creates a new model that has the same geometry as the prior model but introduces a greater number of unknowns.
Facets are selected for subdivision according to the total charge upon them (i.e. where is the area of facet ). For each surface in the model, a user-specified proportion of facets belonging to that surface are selected for refinement in order of highest to lowest absolute value of total charge. This allocation on a per-surface basis distributes the locations of refinement throughout the model, as otherwise they would tend to be allocated exclusively to the location of the strongest source (e.g. TES electrodes). Distributing the locations of refinement in this manner helps smooth the convergence of the solution and prevent instances where the error function reaches a local minimum.
Refinement is performed via simple barycentric subdivision, wherein three additional vertices are inserted at the midpoints of each selected triangle’s edges to break it into four sub-triangles. These new triangles are coplanar with and similar to the original triangle. No remeshing operation needs to be performed to restore mesh connectivity or manifoldness, as the BEM-FMM with zeroth-order pulse bases is unaffected by mesh manifoldness or lack thereof. This is a principal advantage of the proposed method.
The new triangles inherit the charge density of the original triangle to preserve solution progress. The charge density is not scaled upon inheritance since it is by definition already expressed per unit area. Figure 1 shows an example of a small region of a mesh after multiple adaptive refinement steps.
Multiple termination criteria can be defined for the adaptive refinement method. A natural termination condition may involve, for example, monitoring the convergence of the electric field in a predefined region of interest (ROI) and terminating when the relative error between adaptive steps drops below a predefined threshold. This is the termination condition used in this study. Another natural metric is the error between the charge density (solution) vectors produced by subsequent AMR steps, which would decrease the computational time required by removing the need to carry out (e.g.) an E-field recovery step after every AMR pass.
2.5. Expected performance of AMR
If denotes the refinement rate (fraction of facets refined per adaptive pass) and denotes the number of adaptive passes applied, then the number of facets (unknowns) in the mesh after refinement is given by:
where and denote the total number of facets pre- and post-refinement, respectively. If the average mesh edge length in the model pre-refinement is denoted by then the edge length of an average facet subjected to maximum possible refinement is given simply by
Equations (11) and (12) show that this implementation of AMR grows the model exponentially and is capable of increasing the mesh resolution exponentially in critical regions. If the number of AMR iterations were to approach infinity, it is expected that all discrete charges present in the model would be drawn equal to each other.
To put these equations into perspective with reasonable values of and (used during preliminary investigations for TES and EEG), consider Connectome Subject 110411 of the Human Connectome Project (Van Essen et al 2012, Human Connectome Project 2020) meshed by the headreco pipeline (Nielsen et al 2018). Pre-refinement, this model has 1.04 M facets and average edge length 1.44 mm. After 16 adaptive refinement steps at a refinement rate of 1% per step (), the number of facets (unknowns) would increase by 60.5% to 1.67 M facets. If a certain average facet in a critical region were subdivided on every adaptive pass, its edge length would be scaled by a factor of 1.526e-5, resulting in a final edge length of 22.0 nm.
By contrast, suppose one iteration of global barycentric subdivision were applied. The mesh size would increase by 300% (total 4.16 M facets), but the edge length would only be scaled by a factor of 0.5: an average edge would decrease from 1.44 to 0.72 mm. Compared to global refinement, AMR applied in this format is capable of increasing the mesh resolution to very high levels in vital regions while allocating the new unknowns efficiently.
2.6. Human head models under test
The human head models considered in the following accuracy tests are 16 subjects from the Human Connectome Project (Van Essen et al 2012, Human Connectome Project 2020). Surface mesh models for these subjects were generated using the headreco pipeline (Nielsen et al 2018). These models have 1.06 M facets on average, have an average triangle edge length of 1.43 mm, and contain seven tissues. The tissues are air, skin, skull, cerebrospinal fluid (CSF), gray matter (GM), white matter (WM), ventricles, and eyes as shown in figures 2(c), (d). In general, we refer to a given boundary by the name of its interior tissue. For example, the ‘gray matter surface’ would refer to the GM/CSF boundary.
A second set of models was derived based on these 16 Connectome subject models in the spirit of our prior work (Weise et al 2022), where we investigated the impact of meningeal layers that are not commonly segmented by the major packages. These 16 extended models contain additional tissue boundaries constructed by expansion or contraction of existing boundaries as shown in figures 2(e), (f). The skin volume was subdivided into layers of skin, fat, and muscle. The skull volume was subdivided into two layers of cortical bone separated by one layer of cancellous (spongy) bone. Layers representing the dura mater, arachnoid mater, and pia mater were introduced in the CSF volume outside the GM. In this study, we are proposing to add to existing segmentations skin, fat, and muscle of the scalp, outer table, diploë, and inner table of the skull, and three brain meninges, all via known anatomical rules:
2.6.1. Scalp → skin, fat, muscle
To partition space between skin and bone shells, the following data can be used: skin—20%, fat—40%, muscle—40%. These values are widely used in safety studies for magnetic resonance radio-frequency coils (Khadka and Bikson (2020) and other sources cited there). Other references (e.g. Jiang et al 2020) predict the conductivities.
2.6.2. Skull → outer table, diploë, inner table
Based on data from Lynnerup et al (2005), Boruah et al (2015), Lillie et al (2015), Lillie et al (2016), Kozlov et al (2020) for 300 subjects, the following estimates can be deduced in the frontal lobe: outer table (cortical)—30%; diploë (cancellous)—40%; inner table (cortical)—30%. For the parietal lobe, the diploë thickness may exceed 50% (Lillie et al 2016). The following values can be used there: outer table—30%; diploë—50%; inner table—20%. A smooth transition is automatically made from one lobe to another. Variations of this scheme are easily programmable. The conductivity values from Dannhauer et al (2011) can be used: cortical bone: 6.4 mS m−1, cancellous bone: 29 mS m−1.
2.6.3. CSF → dura mater, arachnoid, true CSF, pia mater
Here, we can use integral data given in Kuchiwaki et al (1997), Bashkatov et al (2003), Dannhauer et al (2011), Saboori and Sadegh (2015), Alexander et al (2017): 1.11 mm for dura, 0.2 mm for arachnoid, and 0.1 mm for pia mater except in the longitudinal fissure. Further algorithmic details are given in (Weise et al 2022). The final models have 1.59 M facets on average with an average triangle edge length of 1.45 mm.
It is critical to note that these 14-tissue models are introduced for the sole purpose of testing the AMR method, and not for the purpose of comparing their solutions against their corresponding 7-tissue models. Based on previous work (Weise et al 2022), it is expected that the extra tissues have a substantial impact on TES and EEG simulations, and that accurate segmentation of these tissues will be necessary for future applications. The construction of these tissues based on anatomical rules represents an attempt to characterize the solvability and convergence of this future class of problem. The solutions themselves may be inaccurate due to the conjectural nature of the models.
Tables 1 and 2 contain the conductivities assigned to each tissue type appearing in the 14-tissue and 7-tissue models, respectively. Entries marked by an asterisk (*) denote values that were computed by a weighted average of composite tissues’ individual conductivities. The ‘Skin’ conductivity for the 7-tissue model was computed by a weighted average of the ‘Skin’, ‘Fat’, and ‘Muscle’ conductivities from the 14-tissue model with weights assigned according to relative thicknesses of these layers—0.2, 0.4, and 0.4 respectively. Similarly, the ‘Bone’ conductivity for the 7-tissue model was computed by a weighted average of the ‘Cortical Bone’ (0.6) and ‘Trabecular Bone’ (0.4) tissues. The conductivities in table 2 for cortical bone and trabecular bone were taken from Dannhauer et al (2011), meninges from Jiang et al (2020), skin/fat/muscle from IT’IS Foundation (2018), and all others from Weise et al (2020).
Table 1.
Tissue | Conductivity (S m–1) |
---|---|
Skin* | 0.1989 |
Bone* | 0.0177 |
Eyes | 1.2000 |
Cerebrospinal fluid | 1.6540 |
Gray matter | 0.2750 |
White matter | 0.1260 |
Ventricles | 1.6540 |
Table 2.
Tissue | Conductivity (S m–1) | Tissue | Conductivity (S m–1) |
---|---|---|---|
Skin | 0.1700 | Dura mater | 0.1000 |
Fat | 0.0573 | Arachnoid mater | 0.1250 |
Muscle | 0.3550 | Cerebrospinal fluid | 1.6540 |
Eyes | 1.2000 | Pia mater | 0.1500 |
Cortical bone | 0.0064 | Gray matter | 0.2750 |
Trabecular bone | 0.0290 | White matter | 0.1260 |
Ventricles | 1.6540 |
2.7. Testing impact of AMR: general setup
To explore the impact and importance of AMR itself, three distinct quasi-static modalities of forward problem were investigated: TES, TMS, and EEG. Simulations were carried out both on the simple 7-tissue models and on the complex 14-tissue models. In all cases, the source either targets (TES, TMS) or originates in (EEG) the left motor hand area ().
For each model and each forward problem mode, three solutions were computed. The initial solution was found by solving the model as-is, without invoking AMR. The second solution was found after subjecting the model to AMR with the following parameters: refinement rate = 1% of facets per step, maximum number of refinement steps = 30, and E-field (TES, TMS) or voltage (EEG) in the observation region changes by less than 1% from one AMR pass to the next. The final solution was computed after subjecting the adaptively-refined model to a final global refinement step, where every facet in the adaptively-refined model was indiscriminately subdivided into four sub-facets. These solutions will be referred to respectively as the ‘standard’ (STD), ‘adaptive mesh refinement’ (AMR), and ‘reference’ (REF) cases.
Errors were computed between the STD/REF, STD/AMR, and AMR/REF solutions in manners appropriate for the mode of forward problem. The first error describes the amount of improvement possible due to AMR. The second describes the improvement achieved by applying AMR with the stated configuration. The third describes the remaining available improvement that could be achieved through a higher refinement rate or stricter convergence criterion (greater number of AMR steps).
Most simulation parameters were consistent across the problem classes, and they were set to extremely conservative values to minimize sources of error unrelated to the AMR method. Table 3 summarizes these common simulation parameters, together with typical values that may be used for simple or difficult problems as a reference.
Table 3.
Parameter | Selected value | Typical value, simple problem | Typical value, difficult problem |
---|---|---|---|
FMM precision | 1e–6 | 1e–2 | 1e–4 |
GMRES target residual, initial | 1e–5 | 1e–4 | 1e–3 |
GMRES target residual, general | 1e–5 | 1e–4 | 1e–3 |
GMRES max iterations, initial | 100 | 20 | 50 |
GMRES max iterations, general | 50 | 20 | 50 |
The FMM precision was set to 1e-6, where a value of 1e-2 is sufficient for typical problems and 1e-4 is usually used for difficult problems. For almost all invocations of GMRES, the termination criteria were (a) relative residual of 1e-5 or (b) 50 iterations elapsed (a condition which was required when dealing with the 14-tissue models). Since GMRES is invoked on every adaptive step and the solution vectors are rolled forward from step to step, the GMRES convergence usually saturates over the course of the AMR method, provided that the refinement method itself is converging. To support a fair comparison with the refined solutions, it is required that GMRES convergence must also saturate for the initial non-adaptive solution. For this reason, the maximum number of GMRES iterations for the initial (NA) solution was set to 100.
Further information on the mode-specific stimulus and evaluated error metrics is given in the subsequent sections.
2.8. Testing impact of AMR: transcranial electrical stimulation
To model transcranial electrical stimulation, five voltage electrodes were placed on the skin surface in a focal ring configuration (Datta et al 2009) above the motor hand area. The electrodes were circular with radii of 5 mm, and the four return electrodes were separated from the central active electrode by 30 mm center-to-center. Figure 3(a) shows the problem geometry for Connectome Subject 122620.
For the initial solution and all subsequent adaptively-refined solutions, the charge solution was first found for an applied potential of +1 V on the central active electrode and −1 V on the four return electrodes, then linearly scaled to achieve an injected current of 1 mA on the central electrode. Injected current was computed according to
where denotes the conductivity of skin, denotes the set containing the indices of all facets belonging to the central electrode, denotes the electric field just inside the skin surface at model facet denotes the unit normal vector of facet pointing out of the skin surface, and denotes the area of facet To rescale the charge solution and achieve an injected current of 1 mA, the computed charge density vector was multiplied by This method grants control over the total injected current without enforcing a spatially-constant current density over the electrode surface, since the spatially-constant field may be unrealistic except for purpose-built electrodes.
A local preemptive refinement step of two iterations of 4:1 subdivision was carried out on skin and electrode facets within a sphere centered on the central electrode and large enough to enclose all electrodes. The skin surface (including electrodes) was then excluded from further adaptive or global refinement. This preemptive refinement was performed because unsupervised AMR of the voltage electrodes can quickly (16× increase in number of entries per AMR step) grow the preconditioner described in section (2.2) to an unwieldy size. A useful side effect for the purpose of this study is that the preemptive refinement step prevents modification of the immediate source of injected current by the AMR method; this improves parity with the TMS results (whose coils’ current filaments are never adaptively subdivided) and the EEG results (for which the cortical dipoles are never rearranged, subdivided, or otherwise altered in density). For Connectome Subject 122620, each of the five 5 mm-radius electrodes comprised 1600–1800 facets after preemptive refinement.
For the purpose of evaluating the AMR’s E-field convergence criterion, an observation region in the vicinity of the GM target point was constructed. Within a radius of 2 cm from the target point, observation points were placed halfway between the GM and WM surfaces (i.e. on the midlayer) with density approximately equal to the triangular mesh nodal density. The total electric fields from all three solutions were computed at these observation points. Inter-step errors in the E-field were evaluated by applying the L21 norm given in equation (14) to these lists of E-field measurements. This error norm, as well as the relative difference measure (RDM) given in equation (15), was also applied in the post-simulation analysis of error between the STD/REF, STD/AMR, and AMR/REF solutions.
In equation (14), denotes the Euclidean 2-norm, and denotes the electric field measured at the ROI observation point with index In equation (15), the operators in the denominators of the test and base terms refer to the matrix 2-norm, and the operator indicates that the difference of the test and base terms is to be taken in the L21-norm sense of equation (14). Stated intuitively, measures the relative change in overall E-field magnitude, while measures a joint change in spatial distribution of E-field strength and E-field direction. All errors were computed using the total electric field.
2.9. Testing impact of AMR: transcranial magnetic stimulation
To model transcranial magnetic stimulation, a model of a C-B60 coil (MagVenture, Denmark) was positioned according to a target placed on the motor hand area at the GM surface. The coil was placed such that its centerline was normal to the skin surface and passed through the target point on the GM surface, the angle between the fissure longitudinalis and the dominant E-field direction along the coil’s centerline was approximately 45 degrees, and the shortest distance from any part of the skin to any part of the coil windings was 10 mm to account for the coil housing. The coil was modeled as a collection of 17k elementary current segments, and the incident electric field was calculated in terms of these elements’ magnetic vector potential. The coil was driven by a sinusoidal current of amplitude 5 kA and frequency 3 kHz, and the problem was solved at the instant when the time derivative of that current was maximized (94 kA ms−1). Figure 3(b) shows the problem and coil geometry for Connectome Subject 122620.
The ROI for this method was the same as for TES: observation points were placed at the midlayer surface halfway between GM and WM within a sphere of radius 2 cm centered on the GM target point. Convergence was again evaluated using the L21 norm of the total E-field sampled in the ROI.
2.10. Testing impact of AMR: electroencephalography
The EEG problem is configured differently from the TMS and TES problems in terms of the location of the sources, definition of the observation region, and quantity measured at the observation region. The sources used in this study are finite-length current dipoles (a current source and current sink) placed roughly halfway between the GM and WM surfaces (cortical layer III/IV) within a sphere of radius 2.3 mm centered on a target point (a wall of the central sulcus) at the motor hand area. The dipoles are oriented approximately normal to the cortex and are assigned a current density following the Okada–Murakami constant of (Murakami and Okada 2015). Figure 3(c) shows the dipole location and distribution for Connectome Subject 122620.
The observation region is defined as the set of centroids of all facets belonging to the skin surface, and the field quantity to be evaluated at this surface is the electric potential instead of the E-field. The convergence error metric applied in this case was the 2-norm error given in equation (16) below, and the RDM error metric given in equations (17a )–(17b ) was used for subsequent analysis.
where
In equation (16), and are the vectors of voltages measured at the centroids of all skin surface facets and denotes the Euclidean vector norm. In equations (17a )–(17b ), denotes the area of ROI facet denotes entry of denotes entry of and and iterate over all facets in the ROI.
To achieve good convergence, the 14-tissue EEG test cases required two deviations from the standard treatment applied to the other cases. First, the pia mater surface was removed from the models due to the complicated interaction between the finite-length dipole sources and the double-layer of GM/pia mater charges separated by less than 0.1 mm. Second, the refinement rate was increased from 1% to 3% of model facets per refinement step.
2.11. Computational resources and runtime
The AMR method was developed and tested on a shared machine running Windows Server 2022 Standard and MATLAB R2022b with a 56-core Intel Xeon Gold 6348 CPU at 2.60 GHz with 512 GB of RAM. For execution, the simulations were dispatched to a heterogeneous computing cluster with resource requests of 32 cores and 250 GB of RAM to be certain to accommodate the largest (16.5 M facet) 14-tissue REF models. Post-simulation resource usage reports indicate that 100 GB would have been sufficient.
The execution time of all components of the BEM-FMM with AMR—FMM field computation, GMRES iterations, mesh refinement, sparse neighbor integral matrix construction—scales nearly linearly with model size. Every subsequent AMR iteration with the specified parameters increases the mesh size by 3% over the previous mesh. The corresponding computational time can therefore be estimated as:
where is the total number of AMR steps that elapse, is the refinement rate, is the time to solve the initial model and perform one AMR operation, and is the total elapsed time.
A critical observation, however, is that the total time is often significantly less than because the number of GMRES iterations tends to decrease as increases and the solution begins to converge. This is because we use the final result of the previous iteration as the starting guess for the next iteration, as mentioned in section (2.4). For example, for TES for the 7-tissue model of Subject 122620, AMR ran for steps at a refinement rate of and was 135 s. The estimated elapsed time was therefore 873 s, but the actual runtime was 366 s. At the same time, the corresponding 14-tissue model had s, for an estimated s, and the actual runtime was 5600 s. The larger runtime is due to the slower convergence of GMRES across AMR steps, which we attribute to the tightly spaced shells in this model.
3. Results
3.1. Impact of AMR: transcranial electrical stimulation
Figure 4 shows the final refinement maps for the bone, CSF, GM, and WM meshes of Connectome Subject 122620 for the TES test. The color scale denotes the number of subdivisions that were applied in the construction of a given facet in the final model. For example, a facet colored light blue is the product of one 4:1 subdivision step; its edge length is equal to its original (parent) facet’s edge length divided by 2 and its area is equal to its parent’s area divided by 4. An orange facet in this particular figure is the product of three consecutive 4:1 subdivision steps; i.e. its edge length is equal to the original (great-grandparent) facet’s edge length divided by 8, and its area is equal to the original facet’s area divided by 64. Facets in dark blue have not been subdivided at all in the course of the AMR method.
Figure 5 shows the electric field magnitudes in the observation region as well as element-wise absolute differences in the field magnitudes across refinement levels for the 7-tissue and 14-tissue models of Connectome Subject 122620. Figure 6 presents several summary convergence metrics for all 16 subjects: the number of AMR passes elapsed to achieve convergence by subject, the average (over 16 subjects) and maximum inter-pass charge and E-field errors, and the average and maximum number of GMRES iterations required for each adaptive refinement pass. Finally, table 4 summarizes and compares observation region L21 and RDM errors with the other modalities. Errors were computed on a per-model basis; the table presents the average of those errors over the 16 models in each class. The individual model errors are presented in appendix A.
Table 4.
Model and problem | STD/REF (L21, RDM) | STD/AMR (L21, RDM) | AMR/REF (L21, RDM) |
---|---|---|---|
7-tissue, focal TES | 68.12%, 4.21% | 64.87%, 4.49% | 3.34%, 1.19% |
14-tissue, focal TES | 165.54%, 62.92% | 174.20%, 63.37% | 10.37%, 3.58% |
7-tissue, TMS | 1.44%, 0.46% | 0.69%, 0.27% | 1.02%, 0.32% |
14-tissue, TMS | 3.53%, 1.95% | 1.83%, 0.68% | 2.36%, 1.47% |
7-tissue, EEG | 99.67%, 49.37% | 100.13%, 48.62% | 2.67%, 1.94% |
13-tissue, EEG | 101.37%, 57.58% | 100.12%, 60.03% | 8.48%, 6.98% |
Note that the number of elapsed AMR passes shown in figure 6 differs from the maximum refinement level shown in figure 4. The reason for the discrepancy is that only 1% of triangles (per our choice of r = 1%) are subdivided on each step according to the total-charge-based cost function. If a facet were refined 11 consecutive times (i.e. on every AMR pass for the 14-tissue model of Connectome Subject 122620), this would imply that its total charge had been in the 99th percentile on each of the 10 previous steps, in addition to the start of the 11th. By the start of the 11th pass, the facet’s area and corresponding weight would have been reduced by a factor of Except for facets extremely close (e.g. on the order of nanometers) to sources, such a small facet is not likely to remain in the 99th percentile for total charge on all adaptive passes, and other facets would be selected in its place.
3.2. Impact of AMR: transcranial magnetic stimulation
Figure 7 shows the refinement map for the bone, CSF, GM, and WM meshes of Connectome Subject 122620 for the TMS test. Figure 8 shows the electric field magnitudes in the observation region as well as element-wise absolute differences in the field magnitudes across refinement levels for the 7-tissue and 14-tissue models of Connectome Subject 122620. Figure 9 provides convergence summary results for both model classes, table 4 presents aggregate error metrics over all subjects, and subject-specific errors are presented in appendix A. It appears that TMS is a rather trivial case where the initial resolution of the model is usually sufficient, even with 14 tissues.
3.3. Impact of AMR: electroencephalography
Figure 10 shows the refinement maps for the skin, bone, CSF, GM, and WM meshes of Connectome Subject 122620 for the 7-tissue and 14-tissue EEG tests. Figure 11 shows a visual comparison of the voltage measured on the skin surface for the same subject as well as element-wise differences in that voltage across the refinement levels. Figure 12 captures convergence metrics, table 4 captures aggregate error metrics, and appendix A captures subject-specific errors.
Table 4 summarizes the 2-norm errors computed for the 7-tissue and 14-tissue models for the voltage evaluated over the skin surface. The average error over 14 models is given; per-model errors are presented in appendix A.
3.4. Performance summary
Table 4 captures multiple summary errors for the three stimulation modes and the two classes of model. As stated previously, the error between the STD and REF cases describes the magnitude of improvement possible due to AMR. The error between the STD and AMR cases describes the improvement that was achieved by AMR, and the error between the AMR and REF cases describes the further improvement that would be possible if the AMR method were carried out for a greater number of iterations or using a higher refinement rate.
Table 5 summarizes the average model size increases that were required to achieve the convergence conditions of the AMR method for each problem class. Recall that the 13-tissue EEG problem was carried out with a refinement rate of 3% of facets per AMR step rather than the 1% rate used in all other methods; the required model size increase for this problem class should make the motivation for that decision apparent. Additionally, the average and standard deviation of number of AMR steps (over 16 subjects per problem class) are reported.
Table 5.
Model and problem | Avg. model size increase | Avg. AMR steps | Std. dev. AMR steps |
---|---|---|---|
7-tissue, focal TES | 12.64% | 5.0 | 0.9 |
14-tissue, focal TES | 67.70% | 18.9 | 4.1 |
7-tissue, TMS | 2.87% | 1.1 | 0.3 |
14-tissue, TMS | 5.17% | 1.8 | 1.2 |
7-tissue, EEG | 21.12% | 6.4 | 2.5 |
13-tissue, EEG | 128.16% | 15.8 | 9.9 |
4. Discussion
For TMS simulations, there appears to be little benefit from using AMR to model the electric field arising at the midlayer surface. The main reason for this is that the primary electric field from the coil typically dominates the secondary field by a factor of 2–1 or greater. No matter how well the mesh is refined, the coil’s incident field directly dictates the charges induced at the interfaces as well as two thirds of the total electric field at the observation surface. By reciprocity, it is also expected that MEG modeling would not benefit substantially from AMR in this format since the magnetic field of the localized current sources is weakly affected by the conductivity interfaces. Even a full-model pass of 4:1 barycentric subdivision that increases the model size by 300% only results in roughly a 4% E-field magnitude deviation for the 14-tissue model.
In stark contrast, for TES simulations, AMR becomes very important for accurate E-field simulations. In this case, the primary electric field is zero (except for electrode facets in the case of constant-current electrodes), and the secondary electric field both arises from and dictates the final distribution of the interfacial charges. The electric field at the observation surface has two orders of dependency on the underlying charge distribution: first, the charge-to-charge interaction must properly distribute the charges, and second, the charges must have sufficient resolution to accurately recover the secondary electric field at the observation surface. High mesh resolution is required along the main current paths to accurately model the current distribution. For example, the total current flowing into the GM of Connectome Subject 122620 decreased by 21% over the course of the AMR for the focal TES electrode montage. An appropriately high-resolution mesh is necessary to prevent even minute current deviations due to discretization error. This is highlighted by the results shown in tables 4 and 5: a 13% (on average) increase in number of unknowns, appropriately distributed by the AMR method, results in a correction to E-field magnitude at the midlayer surface on the order of (on average) 65%. For the 14-tissue TES case, the E-field direction also was subject to a change in direction and/or relative distribution of magnitude of 64%, though a model size increase of 68% was necessary to achieve sufficient resolution in this case. As inter-electrode distance increases, it has been observed that a larger refinement rate or a greater number of adaptive refinement steps are required to adequately resolve the longer and less focal current paths.
EEG forward problems also benefit substantially from AMR, for similar reasons to the TES case. In the case of EEG, the sources are highly singular dipoles that lie within millimeters of model boundaries. Similarly to TES, most current sourced by the cortical dipoles will shunt back to their negative ends without crossing the GM/CSF boundary, let alone reaching the skin. Discretization error in the vicinity of the dipoles can dramatically alter current paths in this critical region and produce radically different voltage distributions at the skin surface. This case is illustrated in figure 11. The 7 and 13-tissue models each demonstrate large changes in skin surface voltage magnitude and distribution as captured by tables 4 and 5. Similarly to TES, the 7-tissue EEG case achieves such changes after only a 21% increase in number of unknowns on average.
The 65% changes in overall E-field strength for TES may have an impact when trying to predict dosing for clinical applications of TES (Bikson et al 2012); however, the small RDM errors (for the 7-tissue models) indicate that the spatial E-field distribution is unchanged in this case and that errors in E-field strength may be compensated by increasing/decreasing the injected current. A far more important case is that of electroconvulsive therapy or ECT (Peterchev et al 2010, Deng et al 2013), where an incorrect dose prediction can have a substantial negative effect on a patient’s health.
The mesh refinement algorithm as implemented has one very significant limitation: the mesh refinement step does not improve the fidelity of the mesh to the underlying geometry. As previously stated, all subtriangles introduced by the AMR method are coplanar to their respective parent triangles. As a result, the method strictly introduces additional unknowns into the geometry specified by the initial mesh. Further, charges tend to accumulate at sharp edges in the mesh. When every triangle’s normal vector points in a unique direction with respect to its neighbors, this phenomenon’s impact is minimized. When large regions of locally-coplanar triangles border other large regions of locally-coplanar triangles, charges may accumulate disproportionately along the lines of triangles attached to the border. This accumulation represents a deviation from the underlying problem geometry.
Apart from the obvious desire to use a more accurate model, several approaches may be adopted to minimize these effects. One option is to interpolate the local mesh curvature and translate new vertices to lie upon the interpolated surface. Another is to apply smoothing methods after interpolating additional vertices, although this option risks altering the geometry of the initial mesh. A memory-intensive solution may be to develop a very high-resolution reference mesh and resample new vertices from that reference mesh during refinement. This particular solution would have the added benefit of enabling the initial mesh to start with an even lower resolution, saving computational time. Finally, higher-order curvilinear boundary representations (BREPs) of head compartments could be used, if available.
Multiple improvements could be made to improve the convergence and execution time of the proposed AMR method. In many situations, especially the highly singular EEG problems, it is possible for a facet’s total charge after subdivision (1/4 of the total pre-subdivision charge) to remain greater than the threshold selected for subdivision. A natural improvement would be to preemptively apply a second (third, fourth, …) round of barycentric subdivision to such facets, as the subdivision time is negligible compared to the time that must be spent recomputing neighbor integrals and iteratively solving the refined model. Another possible speed improvement could be achieved by only recomputing neighbor integrals for subdivided facets rather than recomputing all integrals. Other metrics for facet selection, such as current flux through faces, may also speed up convergence for certain problem classes.
An open problem is the appropriate selection of the refinement rate Large values of tend to increase the number of unnecessary unknowns introduced into the problem at each AMR step. When is too small, neighboring facets in critical regions may be refined on (e.g.) alternating AMR steps, causing erratic convergence behavior that can cause the method to terminate early. This is the phenomenon that prompted the increase from to for the 13-tissue EEG models.
5. Conclusion
In this work, we have described and implemented a conceptually simple, yet effective and computationally efficient AMR method for the quasi-static charge-based boundary element method with fast multipole acceleration (BEM-FMM). We have demonstrated large improvements to the accuracy of electric potential and electric field measurements at observation surfaces for TES/EEG primary field quantities and no degradation of accuracy for TMS/MEG primary field quantities. For the standard 7-tissue TES and EEG forward problems, an increase of only 25% in number of unknowns, allocated efficiently by AMR, reveals changes of 65% or more in the electric field or potential at observation surfaces. The present local AMR method is tailored to the BEM-FMM with 0th order basis functions: it takes advantage of the BEM-FMM’s robustness against manifoldness defects to avoid a full remeshing procedure, thus saving time and minimizing computational complexity. To our knowledge, other methods do not support this feature .
Acknowledgments
Research reported in this publication was supported by the National Institute of Mental Health of the National Institutes of Health under Award Numbers R01MH130490 and R01MH128421, as well as the National Institute of Biomedical Imaging and Bioengineering of the National Institutes of Health under Award Number R01EB035484. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.
Contributor Information
William A Wartman, Email: wawartman@wpi.edu.
Konstantin Weise, Email: kweise@cbs.mpg.de.
Manas Rachh, Email: mrachh@flatironinstitute.org.
Leah Morales, Email: lmorales@wpi.edu.
Zhi-De Deng, Email: zhi-de.deng@nih.gov.
Aapo Nummenmaa, Email: anummenmaa@mgh.harvard.edu.
Sergey N Makaroff, Email: snmakaroff@wpi.edu.
Data availability statement
The data that support the findings of this study will be openly available following an embargo at the following URL/DOI: https://osf.io/253qb/?view_only=3a3ef2e963654bf384ccfa2813ab3a12. Data will be available from March 1 2024.
References
- Alexander S L, Rafaels K, Gunnarsson C A, Weerasooriya T. Morphological characterization of the frontal and parietal bones of the human skull. US Army Res. Lab ARL-TR- 79. 2017;62 https://apps.dtic.mil/sti/pdfs/AD1029208.pdf . [Google Scholar]
- Al-Kaysi A M, Al-Ani A, Loo C K, Powell T Y, Martin D M, Breakspear M, Boonstra T W. Predicting tDCS treatment outcomes of patients with major depressive disorder using automated EEG classification. J. Affective Disorders. 2017;208:597–603. doi: 10.1016/j.jad.2016.10.021. [DOI] [PubMed] [Google Scholar]
- Ansys, Inc. Canonsburg, PA, USA Ansys Distribution Materials. Lecture 3: HFSS FEM Solution Setup. 2020;R2 Corporate website: https://ansys.com/ [Google Scholar]
- Antonelli M, Fattore L, Sestito L, Di Giuda D, Diana M, Addolorato G. Transcranial magnetic stimulation: a review about its efficacy in the treatment of alcohol, tobacco and cocaine addiction. Addictive Behav. 2021;114:106760. doi: 10.1016/j.addbeh.2020.106760. [DOI] [PubMed] [Google Scholar]
- Bashkatov A N, Genina E A, Sinichkin Y P, Kochubey V I, Lakodina N A, Tuchin V V. Glucose and mannitol diffusion in human dura mater. Biophys. J. 2003;85:3310–8. doi: 10.1016/S0006-3495(03)74750-X. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Bikson M, Rahman A, Datta A. Computational models of transcranial direct current stimulation. Clin. EEG Neurosci. 2012;43:176–83. doi: 10.1177/1550059412445138. [DOI] [PubMed] [Google Scholar]
- Binev P, Dahmen W, DeVore R. Adaptive finite element methods with convergence rates. Numer. Math. 2004;97:219–68. doi: 10.1007/s00211-003-0492-7. [DOI] [Google Scholar]
- Boruah S, Paskoff G R, Shender B S, Subit D L, Salzar R S, Crandall J. Variation of bone layer thicknesses and trabecular volume fraction in the adult male human calvarium. Bone. 2015;77:120–34. doi: 10.1016/j.bone.2015.04.031. [DOI] [PubMed] [Google Scholar]
- Brunoni A R, Chaimani A, Moffa A H, Razza L B, Gattaz W F, Daskalakis Z J, Carvalho A F. Repetitive transcranial magnetic stimulation for the acute treatment of major depressive episodes: a systematic review with network meta-analysis. JAMA Psychiatry. 2017;74:143–52. doi: 10.1001/jamapsychiatry.2016.3644. [DOI] [PubMed] [Google Scholar]
- Cascon J M, Kreuzer C, Nochetto R H, Siebert K G. Quasioptimal convergence rate for an adaptive finite element method. SIAM J. Numer. Anal. 2008;46:2524–50. doi: 10.1137/07069047X. [DOI] [Google Scholar]
- Cespón J, Rodella C, Miniussi C, Pellicciari M C. Behavioural and electrophysiological modulations induced by transcranial direct current stimulation in healthy elderly and alzheimer’s disease patients: a pilot study. Clin. Neurophysiol. 2019;130:2038–52. doi: 10.1016/j.clinph.2019.08.016. [DOI] [PubMed] [Google Scholar]
- Dannhauer M, Lanfer B, Wolters C H, Knösche T R. Modeling of the human skull in EEG source analysis. Hum. Brain Mapp. 2011;32:1383–99. doi: 10.1002/hbm.21114. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Datta A, Bansal V, Diaz J, Patel J, Reato D, Bikson M. Gyri-precise head model of transcranial direct current stimulation: improved spatial focality using a ring electrode versus conventional rectangular pad. Brain Stimul. 2009;2:201–7. doi: 10.1016/j.brs.2009.03.005. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Del Felice A, Magalini A, Masiero S. Slow-oscillatory transcranial direct current stimulation modulates memory in temporal lobe epilepsy by altering sleep spindle generators: a possible rehabilitation tool. Brain Stimul. 2015;8:567–73. doi: 10.1016/j.brs.2015.01.410. [DOI] [PubMed] [Google Scholar]
- Deng Z D, Lisanby S H, Peterchev A V. Controlling stimulation strength and focality in electroconvulsive therapy via current amplitude and electrode size and spacing: comparison with magnetic seizure therapy. J. ECT. 2013;29:325–35. doi: 10.1097/YCT.0b013e3182a4b4a7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Diefenbach G J, Bragdon L B, Zertuche L, Hyatt C J, Hallion L S, Tolin D F, Goethe J W, Assaf M. Repetitive transcranial magnetic stimulation for generalised anxiety disorder: a pilot randomised, double-blind, sham-controlled trial. Br. J. Psychiatry. 2016;209:222–8. doi: 10.1192/bjp.bp.115.168203. [DOI] [PubMed] [Google Scholar]
- Dörfler W. A convergent adaptive algorithm for Poisson’s equation. SIAM J. Numer. Anal. 1996;33:1106–24. doi: 10.1137/0733054. [DOI] [Google Scholar]
- Feischl M, Führer T, Heuer N, Karkulik M, Praetorius D. Adaptive boundary element methods. Arch. Comput. Meth. Eng. 2015;22:309–89. doi: 10.1007/s11831-014-9114-z. [DOI] [Google Scholar]
- Feischl M, Karkulik M, Melenk J M, Praetorius D. Quasi-optimal convergence rate for an adaptive boundary element method. SIAM J. Numer. Anal. 2013;51:1327–48. doi: 10.1137/110842569. [DOI] [Google Scholar]
- fmmlib3d Helmholtz and Laplace (FMM) library in R^3. 2021 https://github.com/zgimbutas/fmmlib3d .
- Gimbutas Z, Greengard L, Magland J, Rachh M, Rokhlin V. 2019. fmm3D Documentation 0.1.0. 2019 https://github.com/flatironinstitute/FMM3D .
- Gomez L J, Dannhauer M, Koponen L M, Peterchev A V. Conditions for numerically accurate TMS electric field simulation. Brain Stimul. 2020;13:157–66. doi: 10.1016/j.brs.2019.09.015. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Greengard L, Rokhlin V. A fast algorithm for particle simulations. J. Comput. Phys. 1987;73:325–48. doi: 10.1016/0021-9991(87)90140-9. [DOI] [Google Scholar]
- Huang Y, Datta A, Bikson M, Parra L C. Realistic volumetric-approach to simulate transcranial electric stimulation—ROAST—a fully automated open-source pipeline. J. Neural Eng. 2019;16:056006. doi: 10.1088/1741-2552/ab208d. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Human Connectome Project 2020. http://humanconnectomeproject.org/
- Indahlastari A, Chauhan M, Sadleir R J. Benchmarking transcranial electrical stimulation finite element models: a comparison study. J. Neural Eng. 2019;16:026019. doi: 10.1088/1741-2552/aafbbd. [DOI] [PMC free article] [PubMed] [Google Scholar]
- IT’IS Foundation 2018. Tissue Properties Database V4-0. IT’IS Foundation. [DOI]
- Iyer V, Wartman W A, Nummenmaa A, Makarov S N. Brain Hum. Body Model. Vol. 2020. Springer; 2021. Example of steady-state electric-current modeling of a complicated cellular topology with boundary element fast multipole method; pp. 391–6. [DOI] [PubMed] [Google Scholar]
- Jiang J, Truong D Q, Esmaeilpour Z, Huang Y, Badran B W, Bikson M. Enhanced tES and tDCS computational models by meninges emulation. J. Neural Eng. 2020;17:016027. doi: 10.1088/1741-2552/ab549d. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Khadka N, Bikson M. Role of skin tissue layers and ultra-structure in transcutaneous electrical stimulation including tDCS. Phys. Med. Biol. 2020;65:225018. doi: 10.1088/1361-6560/abb7c1. [DOI] [PubMed] [Google Scholar]
- Kozlov M, Horner M, Kainz W, Weiskopf N, Möller H E. Modeling radio-frequency energy-induced heating due to the presence of transcranial electric stimulation setup at 3T. MAGMA. 2020;33:793–807. doi: 10.1007/s10334-020-00853-5. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Kuchiwaki H, Inao S, Ishii N, Ogura Y, Gu S P. Human dural thickness measured by ultrasonographic method: reflection of intracranial pressure. J. Ultrasound Med. 1997;16:725–30. doi: 10.7863/jum.1997.16.11.725. [DOI] [PubMed] [Google Scholar]
- Laakso I, Hirata A. Reducing the staircasing error in computational dosimetry of low-frequency electromagnetic fields. Phys. Med. Biol. 2012;57:N25. doi: 10.1088/0031-9155/57/4/N25. [DOI] [PubMed] [Google Scholar]
- Lillie E M, Urban J E, Lynch S K, Weaver A A, Stitzel J D. Evaluation of skull cortical thickness changes with age and sex from computed tomography scans. J. Bone Miner. Res. 2016;31:299–307. doi: 10.1002/jbmr.2613. [DOI] [PubMed] [Google Scholar]
- Lillie E M, Urban J E, Weaver A A, Powers A K, Stitzel J D. Estimation of skull table thickness with clinical CT and validation with microCT. J. Anat. 2015;226:73–80. doi: 10.1111/joa.12259. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lynnerup N, Astrup J G, Sejrsen B. Thickness of the human cranial diploe in relation to age, sex and general body build. Head Face Med. 2005;1:13. doi: 10.1186/1746-160X-1-13. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Makaroff S N, Nummenmaa A, Noetscher G, Qi Z, McIntryre C C, Bingham C S. Influence of charges deposited on membranes of human hyperdirect pathway axons on depolarization during subthalamic deep brain stimulation. J. Neural Eng. 2023;20:4. doi: 10.1088/1741-2552/ace5de. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Makarov S N, Golestanirad L, Wartman W A, Nguyen B T, Noetscher G M, Ahveninen J P, Fujimoto K, Weise K, Nummenmaa A R. Boundary element fast multipole method for modeling electrical brain stimulation with voltage and current electrodes. J. Neural Eng. 2021;18:0460d4. doi: 10.1088/1741-2552/ac17d7. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Makarov S N, Hämäläinen M, Okada Y, Noetscher G M, Ahveninen J, Nummenmaa A. Boundary element fast multipole method for enhanced modeling of neurophysiological recordings. IEEE Trans. Biomed. Eng. 2020b;68:308–18. doi: 10.1109/TBME.2020.2999271. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Makarov S N, Wartman W A, Daneshzand M, Fujimoto K, Raij T, Nummenmaa A. A software toolkit for TMS electric-field modeling with boundary element fast multipole method: an efficient MATLAB implementation. J. Neural Eng. 2020a;17:046023. doi: 10.1088/1741-2552/ab85b3. [DOI] [PubMed] [Google Scholar]
- Murakami S, Okada Y. Invariance in current dipole moment density across brain structures and species: physiological constraint for neuroimaging. Neuroimage. 2015;111:49–58. doi: 10.1016/j.neuroimage.2015.02.003. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Nielsen J D, Madsen K H, Puonti O, Siebner H R, Bauer C, Madsen C G, Saturnino G B, Thielscher A. Automatic skull segmentation from MR images for realistic volume conductor models of the head: assessment of the state-of-the-art. Neuroimage. 2018;174:587–98. doi: 10.1016/j.neuroimage.2018.03.001. [DOI] [PubMed] [Google Scholar]
- Peterchev A V, Rosa M A, Deng Z D, Prudic J, Lisanby S H E C T. ECT stimulus parameters: rethinking dosage. J. ECT. 2010;26:159–74. doi: 10.1097/YCT.0b013e3181e48165. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Petrov P I, Mandija S, Sommer I E, Van Den Berg C A, Neggers S F. How much detail is needed in modeling a transcranial magnetic stimulation figure-8 coil: Measurements and brain simulations. PLoS One. 2017;12:e0178952. doi: 10.1371/journal.pone.0178952. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Piastra M C, Nüßing A, Vorwerk J, Bornfleth H, Oostenveld R, Engwer C, Wolters C H. The discontinuous galerkin finite element method for solving the MEG and the combined MEG/EEG forward problem. Front. Neurosci. 2018;12:30. doi: 10.3389/fnins.2018.00030. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Rahmouni L, Adrian S B, Cools K, Andriulli F P. Conforming discretizations of boundary element solutions to the electroencephalography forward problem. CR. Phys. 2018;19:7–25. doi: 10.1016/j.crhy.2018.02.002. [DOI] [Google Scholar]
- Saboori P, Sadegh A. Histology and morphology of the brain subarachnoid trabeculae. Anat. Res. Int. 2015;2015:279814. doi: 10.1155/2015/279814. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Saturnino G B, Madsen K H, Thielscher A. Electric field simulations for transcranial brain stimulation using FEM: an efficient implementation and error analysis. J. Neural Eng. 2019b;16:066032. doi: 10.1088/1741-2552/ab41ba. [DOI] [PubMed] [Google Scholar]
- Saturnino G B, Thielscher A, Madsen K H, Knösche T R, Weise K. A principled approach to conductivity uncertainty analysis in electric field calculations. Neuroimage. 2019a;188:821–34. doi: 10.1016/j.neuroimage.2018.12.053. [DOI] [PubMed] [Google Scholar]
- Soldati M, Laakso I. Computational errors of the induced electric field in voxelized and tetrahedral anatomical head models exposed to spatially uniform and localized magnetic fields. Phys. Med. Biol. 2020;65:015001. doi: 10.1088/1361-6560/ab5dfb. [DOI] [PubMed] [Google Scholar]
- Stevenson R. Optimality of a standard adaptive finite element method. Found. Comput. Math. 2007;7:245–69. doi: 10.1007/s10208-005-0183-0. [DOI] [Google Scholar]
- Thielscher A, Antunes A, Saturnino G B. Field modeling for transcranial magnetic stimulation: a useful tool to understand the physiological effects of TMS?. 37th Annual Int. Conf. of the IEEE Engineering in Medicine and Biology Society (EMBC); IEEE; 2015. pp. pp 222–5. [DOI] [PubMed] [Google Scholar]
- Tremblay S, et al. Clinical utility and prospective of TMS–EEG. Clin. Neurophysiol. 2019;130:802–44. doi: 10.1016/j.clinph.2019.01.001. [DOI] [PubMed] [Google Scholar]
- Van Essen D C, et al. The human connectome project: a data acquisition perspective. Neuroimage. 2012;62:2222–31. doi: 10.1016/j.neuroimage.2012.02.018. [DOI] [PMC free article] [PubMed] [Google Scholar]
- Wartman W. 2023 July 28. BEM-FMM with AMR, 7-Tissue, 122620.OSF https://osf.io/253qb/?view_only=3a3ef2e963654bf384ccfa2813ab3a12 .
- Weise K, Numssen O, Kalloch B, Zier A L, Thielscher A, Haueisen J, Hartwigsen G, Knösche T R. Precise motor mapping with transcranial magnetic stimulation. Nat. Protoc. 2023b;18:293–318. doi: 10.1038/s41596-022-00776-6. [DOI] [PubMed] [Google Scholar]
- Weise K, Numssen O, Thielscher A, Hartwigsen G, Knösche T R. A novel approach to localize cortical TMS effects. Neuroimage. 2020;209:116486. doi: 10.1016/j.neuroimage.2019.116486. [DOI] [PubMed] [Google Scholar]
- Weise K, Wartman W A, Knösche T R, Nummenmaa A R, Makarov S N. The effect of meninges on the electric fields in TES and TMS. numerical modeling with adaptive mesh refinement. Brain Stimul. 2022;15:654–63. doi: 10.1016/j.brs.2022.04.009. [DOI] [PubMed] [Google Scholar]
- Weise K, Worbs T, Kalloch B, Souza V H, Jaquier A T, Van Geit W, Thielscher A, Knösche T R. Directional sensitivity of cortical neurons towards TMS induced electric fields. Imaging Neuroscience. 2023a;10 doi: 10.1162/imag_a_00036. [DOI] [Google Scholar]
- Windhoff M, Opitz A, Thielscher A. Electric field calculations in brain stimulation based on finite elements: an optimized processing pipeline for the generation and usage of accurate individual head models. Hum Brain Mapp. 2013;34: 923–35. doi: 10.1002/hbm.21479. [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Citations
- IT’IS Foundation 2018. Tissue Properties Database V4-0. IT’IS Foundation. [DOI]
Data Availability Statement
The data that support the findings of this study will be openly available following an embargo at the following URL/DOI: https://osf.io/253qb/?view_only=3a3ef2e963654bf384ccfa2813ab3a12. Data will be available from March 1 2024.