Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 Sep 19;19(9):e0303674.
doi: 10.1371/journal.pone.0303674. eCollection 2024.

The Ithildin library for efficient numerical solution of anisotropic reaction-diffusion problems in excitable media

Affiliations

The Ithildin library for efficient numerical solution of anisotropic reaction-diffusion problems in excitable media

Desmond Kabus et al. PLoS One. .

Abstract

Ithildin is an open-source library and framework for efficient parallelized simulations of excitable media, written in the C++ programming language. It uses parallelization on multiple CPU processors via the message passing interface (MPI). We demonstrate the library's versatility through a series of simulations in the context of the monodomain description of cardiac electrophysiology, including the S1S2 protocol, spiral break-up, and spiral waves in ventricular geometry. Our work demonstrates the power of Ithildin as a tool for studying complex wave patterns in cardiac tissue and its potential to inform future experimental and theoretical studies. We publish our full code with this paper in the name of open science.

PubMed Disclaimer

Conflict of interest statement

The authors have declared that no competing interests exist.

Figures

Fig 1
Fig 1. Ithildin can be used to solve reaction-diffusion problems in excitable media.
Required inputs for the software are: the diffusion tensor and geometry of a medium—such as the heart muscle, a reaction term—the so-called model, and source terms—typically a stimulation protocol. Ithildin can then calculate the evolution of the model variables in the medium over time. During calculation, Ithildin records relevant spatio-temporal data and metadata, as well as detecting rotor cores as filaments. The data visualized here are taken from several simulations which will be discussed below.
Fig 2
Fig 2. Stencils for isotropic diffusion (a) and orthotropic diffusion (b) with numbering of the involved grid points.
Fig 3
Fig 3. Ventricle geometry with fiber direction, colored by the fiber helix angle.
Fig 4
Fig 4. Inhomogeneities in Sim 1.
The field inhom describes where unexcitable obstacles or exterior points are located with the value inhom = 0 and which cell model is to be used inside if inhom > 0. This figure also visualizes the filament trajectories colored by time, cf. section 4.7. Birth of a tip is denoted by stars, their deaths by crosses, and tips that are still around at the end of the simulation by points. The three trajectories with the longest lifetime are numbered by indices 0 through 2.
Fig 5
Fig 5. The S1S2 protocol illustrated for Sim 2.
The first and third row display the transmembrane voltage u at selected frames in time, and the second and fourth row the state space phase [17, 47]. The first stimulus is applied in the first frame in the hatched region at the left edge. The sensor location is marked with a cross. Right after the third frame, the sensor triggers the second stimulus in the hatched region at the bottom edge. A spiral wave forms. The phase singularity at the center of the spiral is tracked as the white curve, which is dotted for the entire trajectory of the phase singularity, and solid for its trajectory since the previous frame.
Fig 6
Fig 6. Extracted time traces of Sim 1.
The first two panels (a, b) contain the model variables u and v, followed by data computed by model wrappers, namely the diffusion term ∇ ⋅ Du (c) and the LAT (d), at an interior point, cf. section 4.5. Panel (e) contains the pseudo-EGM at an exterior point, next to the 2D domain, cf. section 4.6. The last panel (f) contains the number of rotors detected via phase singularities, cf. section 4.7. The black vertical lines indicate times at which a stimulus was applied.
Fig 7
Fig 7. Illustration of the filament point tracking algorithm.
Each coordinate plane adjacent to a grid point (i, j, k) is checked for an intersection of two surfaces (purple and orange lines) which are usually isosurfaces of state variables in u_. In this example, a filament point (white dot) will be found in the yz-face.
Fig 8
Fig 8. Phase defect detection for a single meandering spiral in Sim 1.
By recording the activation times of the transmembrane voltage Vm (top row), the activation time phase φ [17, 51] can be computed (middle row). Where this phase is discontinuous, a phase defect is localized. This is visualized as the phase defect density ϱ (bottom row). In these four frames, a single rotor is tracked shortly after its formation. Due to conduction block, which can be seen as an extended phase defect line, the spiral moves through the medium. Afterwards, the spiral remains mostly stationary, leading to a shorter phase defect line.
Fig 9
Fig 9. Phase defect detection during figure-of-eight spiral wave pair creation in Sim 1.
Visualization in the same style as Fig 8. A long conduction block line breaks apart into two rotors.
Fig 10
Fig 10. Final frame of Sim 4 of the BOCF model in ventricle geometry.
The classical filament is plotted as the purple lines. The phase defect surface is contained in the gray contour.
Fig 11
Fig 11. Results of the cardiac electrophysiology benchmark.
The benchmark was proposed by Niederer et al. (2011) [56] and is implemented in Sim 5. To ease comparisons with the paper introducing the benchmark, we present our results in a similar style. In panels (a)-(c), we present the LAT in the medium at different spatial and temporal resolutions. Coloring according to LAT is consistent across these panels. In panel (d), we measure the computational speed of Ithildin at different number of used processes. A linear fit is shown in the double-logarithmic plot which excludes the data point at Nproc = 8.

References

    1. Tolkien JRR. The Lord of the Rings: The Fellowship of the Ring. Allen & Unwin; 1954.
    1. Clayton RH, Bernus O, Cherry EM, Dierckx H, Fenton FH, Mirabella L, et al.. Models of cardiac tissue electrophysiology: Progress, challenges and open questions. Progress in Biophysics and Molecular Biology. 2011;104(1-3):22–48. doi: 10.1016/j.pbiomolbio.2010.05.008 - DOI - PubMed
    1. Fenton F, Karma A. Vortex dynamics in three-dimensional continuous myocardium with fiber rotation: Filament instability and fibrillation. Chaos: An Interdisciplinary Journal of Nonlinear Science. 1998;8(1):20–47. doi: 10.1063/1.166311 - DOI - PubMed
    1. Niederer SA, Lumens J, Trayanova NA. Computational models in cardiology. Nature Reviews Cardiology. 2019;16(2):100–111. doi: 10.1038/s41569-018-0104-y - DOI - PMC - PubMed
    1. Gillette K, Gsell MAF, Prassl AJ, Karabelas E, Reiter U, Reiter G, et al.. A Framework for the generation of digital twins of cardiac electrophysiology from clinical 12-leads ECGs. Medical Image Analysis. 2021;71:102080. doi: 10.1016/j.media.2021.102080 - DOI - PubMed

LinkOut - more resources