# Modeling and Analysis of Cardiac Hybrid Cellular Automata via GPU-Accelerated Monte Carlo Simulation

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

^{®}Simulink, a sequential C implementation running on a CPU and an NVIDIA

^{®}CUDA-based implementation running on a modern GPU. Such a comparison is a required step to evaluate the limitations and trade-offs of the different technologies as well as the reliability of our modeling approach.

## 2. Computational Models and Methods

#### 2.1. Unidirectional Hybrid Cellular Automata Model

#### 2.2. Model Behavior Evaluation

#### 2.3. Computational Methods

^{®}Simulink provides a suitable graphical programming framework enabling fast model prototyping and revision.

#### 2.3.1. Matlab^{®}Simulink

^{®}Simulink is a proprietary graphical programming environment designed to model, simulate and analyze dynamical systems. It provides a graphical block diagramming language and a set of block libraries that can be easily customized by the user. Each block represents a mathematical function and the graphical environment provides the user with the possibility to build complex models by just dragging-and-dropping blocks and connecting them, without the need to have much experience in programming. Moreover, the language enables one to derive new composite blocks out of other primitive/atomic or composite blocks.

#### 2.3.2. Central Processing Unit (CPU) and Graphics Processing Unit (GPU)

^{®}Simulink being suitable for fast model prototyping and revision, it is less efficient when it comes to handling the simulation of thousands or millions of cardiac cells. Thus, we first implemented in C-language a second version of our simulator that runs sequentially on a CPU. In this implementation, we represent the HCA model as an array of cells, avoiding the use of complex pointer-arithmetic; for example, the access to the neighboring cells and the decreasing of the cable size at runtime are performed using only integer indices instead of pointers.

^{®}GPU cards. The CUDA parallel model enables the execution of thousands of lightweight threads organized in thread blocks. Each thread executes in parallel the code of a function called kernel while using different parameters. The threads that are within the same thread block can cooperate using different mechanisms. For example, a synchronization point in the code of the kernel makes sure that all the threads must reach that point before the execution can continue. Threads in the same block can also exchange data among each other using on-chip shared memory. Threads that are located in different blocks cannot be synchronized during the kernel execution and operate independently. The CUDA environment provides the possibility to use C/C++ languages extended with built-in primitives enabling the programmer to launch thousands of threads and to specify parameters for the threads and their blocks.

## 3. Results

^{®}GeForce GTX TITAN X (with 12 GB GDDR5 of memory) and an Intel

^{®}Core

^{TM}i7-5820K CPU (with 32 GB of RAM). We used Matlab

^{®}version 2019b, including the full toolbox set for Simulink. The sample size is determined by the number of cells in the HCA as well as the number of performed time-steps in the simulations without decreasing size.

#### 3.1. Accuracy of GPU

#### 3.2. Acceleration using GPU

#### 3.3. Model Behavior

#### 3.3.1. Conduction Velocity

^{®}Simulink, we studied a maximum size of 3000 cells, recovering a conduction velocity of ∼$400\phantom{\rule{0.166667em}{0ex}}\mathsf{\mu}\mathrm{m}\phantom{\rule{-1.111pt}{0ex}}/\phantom{\rule{-0.55542pt}{0ex}}\mathrm{ms}$.

#### 3.3.2. Self-Adapting Properties: Monte Carlo Study

## 4. Discussion

^{®}Simulink very suitable for the development of rapid model prototypes. However, it is limited when it is necessary to handle large scale simulations. Furthermore, it was not possible to change the length of the cable/ring at runtime. Thus, we were not able to test the self-adapting properties described in the previous sections. In addition, the values of the variables at a certain time step cannot be updated using just the values of the previous step but rather all the values already computed in the current step. Furthermore, we found that the computational resources required to compile large HCA models with several cells were prohibitive (we could consider only models with a length of max. 3000 cells). Due to these restrictions, we could not implement the decreasing ring and the related Monte Carlo analysis in this environment. Nevertheless, as illustrated in the space-time plot shown in Figure 11b, we were able to induce electrical alternans with a trapped wave in a ring with a small number of cells by setting the value of the resistance to $2.0$.

^{®}Simulink previously discussed and that are not suitable to implement CA updating rules that depend on the values of the previous step.

## 5. Conclusions

^{®}Simulink graphical environment, a second implementation running on a CPU sequentially, and a third implementation running on a GPU in parallel. While Matlab

^{®}Simulink provides a suitable environment for fast prototyping complex models is less efficient in handling simulation instances of large HCA models. The GPU-based implementation could handle instead larger instances accelerating considerably the simulation (in our experiments, we could observe 10× speed-up with respect to the CPU-based implementation) and indeed the overall analysis of the model.

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Acknowledgments

## Conflicts of Interest

## Abbreviations

APD | Action Potential Duration |

AP | Action Potential |

CA | Cellular Automata |

CV | Conduction Velocity |

HCA | Hybrid Cellular Automata (Model) |

${R}_{V}$ | (Value of the) Resistance Variable |

## Appendix A. Model Parameters

${\mathit{\tau}}_{\mathit{v}}^{+}$ | ${\mathit{\tau}}_{1\mathit{v}}^{-}$ | ${\mathit{\tau}}_{2\mathit{v}}^{-}$ | ${\mathit{\tau}}_{\mathit{w}}^{+}$ | ${\mathit{\tau}}_{1\mathit{w}}^{-}$ | ${\mathit{\tau}}_{2\mathit{w}}^{-}$ | ${\mathit{\tau}}_{\mathit{s}1}$ | ${\mathit{\tau}}_{\mathit{s}2}$ | ${\mathit{\tau}}_{\mathit{f}\mathit{i}}$ | ${\mathit{\tau}}_{\mathit{o}1}$ | ${\mathit{\tau}}_{\mathit{o}2}$ | |
---|---|---|---|---|---|---|---|---|---|---|---|

1.4506 | 60 | 1150 | 200 | 60 | 15 | 2.7342 | 16 | 0.11 | 400 | 6 | |

${\theta}_{{v}_{\infty}}$ | ${\theta}_{w}$ | ${\theta}_{{w}_{\infty}}$ | ${\theta}_{so}$ | ${\theta}_{si}$ | ${\theta}_{o}$ | ${\tau}_{so1}$ | ${\tau}_{so2}$ | ${\tau}_{si}$ | ${\tau}_{{w}_{\infty}}$ | ${\theta}_{v}$ | ${\theta}_{v}^{-}$ |

0.006 | 0.13 | 0.006 | 0.13 | 0.13 | 0.006 | 30.0181 | 0.9957 | 1.8875 | 0.07 | 0.3 | 0.006 |

${k}_{w}^{+}$ | ${k}_{w}^{-}$ | ${k}_{s}$ | ${k}_{so}$ | ${k}_{si}$ | ${u}_{w}^{-}$ | ${u}_{s}$ | ${u}_{o}$ | ${u}_{u}$ | ${u}_{so}$ | ${w}_{\infty}^{\ast}$ | |

5.7 | 65 | 2.0994 | 2.0458 | 97.8 | 0.03 | 0.9087 | 0 | 1.55 | 0.65 | 0.94 |

## Appendix B. Tabulated Mean Squared Error

**Table A2.**MSE of u between CPU and GPU Sample size as number of cells times simulation time (in time-steps) on the

**Left**Value of the ${R}_{V}$ on

**Top**.

Sample Size|${\mathbf{R}}_{\mathbf{V}}$ | 0.5 | 1.7 | 2.0 | 2.2 | 3.0 | 3.5 |
---|---|---|---|---|---|---|

$\mathbf{1000}\phantom{\rule{0.166667em}{0ex}}\ast $20,000 | 3 $\times {10}^{-6}$ | 3 $\times {10}^{-6}$ | 1 $\times {10}^{-6}$ | 0.0 | 0.0 | 0.0 |

$\mathbf{1000}\phantom{\rule{0.166667em}{0ex}}\ast $30,000 | 8 $\times {10}^{-6}$ | 3 $\times {10}^{-6}$ | 2 $\times {10}^{-6}$ | 0.0 | 0.0 | 0.0 |

$\mathbf{1000}\phantom{\rule{0.166667em}{0ex}}\ast $40,000 | 1 $\times {10}^{-5}$ | 2 $\times {10}^{-6}$ | 5 $\times {10}^{-6}$ | 3 $\times {10}^{-6}$ | 0.0 | 0.0 |

$\mathbf{2000}\phantom{\rule{0.166667em}{0ex}}\ast $20,000 | 1 $\times {10}^{-6}$ | 1 $\times {10}^{-6}$ | 0.0 | 0.0 | 1 $\times {10}^{-6}$ | 0.0 |

$\mathbf{2000}\phantom{\rule{0.166667em}{0ex}}\ast $30,000 | 1 $\times {10}^{-6}$ | 1 $\times {10}^{-6}$ | 1 $\times {10}^{-6}$ | 1 $\times {10}^{-6}$ | 2 $\times {10}^{-6}$ | 0.0 |

$\mathbf{2000}\phantom{\rule{0.166667em}{0ex}}\ast $40,000 | 6 $\times {10}^{-6}$ | 0.0 | 2 $\times {10}^{-6}$ | 1 $\times {10}^{-6}$ | 2 $\times {10}^{-6}$ | 0.0 |

$\mathbf{3000}\phantom{\rule{0.166667em}{0ex}}\ast $20,000 | 0.0 | 1 $\times {10}^{-6}$ | 1 $\times {10}^{-6}$ | 0.0 | 0.0 | 1 $\times {10}^{-6}$ |

$\mathbf{3000}\phantom{\rule{0.166667em}{0ex}}\ast $30,000 | 1 $\times {10}^{-6}$ | 1 $\times {10}^{-6}$ | 1 $\times {10}^{-6}$ | 0.0 | 0.0 | 0.0 |

$\mathbf{3000}\phantom{\rule{0.166667em}{0ex}}\ast $40,000 | 2 $\times {10}^{-6}$ | 3 $\times {10}^{-6}$ | 1 $\times {10}^{-6}$ | 0.0 | 1 $\times {10}^{-6}$ | 0.0 |

$\mathbf{4000}\phantom{\rule{0.166667em}{0ex}}\ast $20,000 | 0.0 | 1 $\times {10}^{-6}$ | 2 $\times {10}^{-6}$ | 0.0 | 0.0 | 0.0 |

$\mathbf{4000}\ast $30,000 | 0.0 | 1 $\times {10}^{-6}$ | 7 $\times {10}^{-6}$ | 0.0 | 0.0 | 0.0 |

$\mathbf{4000}\phantom{\rule{0.166667em}{0ex}}\ast $40,000 | 1 $\times {10}^{-6}$ | 0.2 $\times {10}^{-6}$ | 1$\times {10}^{-5}$ | 0.0 | 0.0 | 1 $\times {10}^{-6}$ |

## Appendix C. Tabulated Conduction Velocity

Length|${\mathbf{R}}_{\mathbf{V}}$ | 0.5 | 1.7 | 2.0 | 2.2. | 3.0 | 3.5 |
---|---|---|---|---|---|---|

1000 | 139.059021 | 341.596832 | 384.452545 | 411.704071 | 516.145691 | 577.957764 |

2000 | 139.070541 | 341.621796 | 384.49700 | 411.740479 | 516.137329 | 578.07977 |

3000 | 341.610657 | 384.51181 | 411.752563 | 516.34583 | 578.064758 | |

4000 | 341.619690 | 384.500732 | 411.758636 | 516.133179 | 578.057251 |

## Appendix D. Tabulated Execution Times CPU vs. GPU

**Table A4.**Execution times in milliseconds for the CPU-based implementation of the decreasing ring simulation. On the left the number of cells (length) while on top the value considered for ${R}_{V}$).

Length|${\mathbf{R}}_{\mathbf{V}}$ | 0.50 | 1.00 | 1.70 | 2.00 | 2.20 | 3.00 | 3.50 |
---|---|---|---|---|---|---|---|

750 | 240.192 | 238.468 | 2.90253 | 2.8968 | 2.84844 | 2.78341 | 2.84889 |

1000 | 564.484 | 579.127 | 350.292 | 220.442 | 131.932 | 4.29828 | 4.35958 |

1250 | 969.275 | 1011.07 | 784.288 | 653.249 | 558.842 | 202.407 | 6.14406 |

1500 | 1455.63 | 1526.11 | 1319.38 | 1185.8 | 1092.33 | 718.903 | 483.882 |

1750 | 2018.12 | 2117.92 | 1939.51 | 1817.11 | 1725.46 | 1345.71 | 1100.71 |

2000 | 2660.24 | 2791.34 | 2641.93 | 2527.15 | 2439.14 | 2073.84 | 1819.97 |

2250 | 3383.76 | 3544.19 | 3429.59 | 3323.34 | 3244.67 | 2890.8 | 2640.81 |

2500 | 4183.63 | 4386.91 | 4300.8 | 4204.9 | 4133.38 | 3800.71 | 3556.48 |

2750 | 5062.56 | 5291.62 | 5246.47 | 5169.95 | 5096.36 | 4826.3 | 4566.59 |

**Table A5.**Execution times in milliseconds for the GPU-based implementation of the decreasing ring simulation. On the left the number of cells (length) while on top the value considered for ${R}_{V}$.

Length|${\mathbf{R}}_{\mathbf{V}}$ | 0.50 | 1.00 | 1.70 | 2.00 | 2.20 | 3.00 | 3.50 |
---|---|---|---|---|---|---|---|

750 | 41.8529 | 125.058 | 1.32457 | 0.146041 | 0.165624 | 1.26863 | 1.25893 |

1000 | 254.9 | 255.257 | 135.833 | 82.8866 | 48.4579 | 1.47809 | 1.4264 |

1250 | 464.078 | 488.732 | 344.528 | 266.477 | 226.149 | 77.6642 | 2.07172 |

1500 | 647.826 | 649.191 | 512.527 | 455.636 | 411.114 | 253.568 | 165.798 |

1750 | 818.234 | 820.921 | 684.815 | 625.691 | 580.426 | 423.808 | 336.593 |

2000 | 1009.94 | 1025.43 | 890.362 | 799.599 | 754.914 | 597.915 | 509.719 |

2250 | 1212.77 | 1205.46 | 1070.18 | 1023.48 | 967.128 | 808.924 | 721.257 |

2500 | 1402.38 | 1415.23 | 1282.1 | 1192.58 | 1147.75 | 986.991 | 896.333 |

2750 | 1616.38 | 1635.49 | 1480.98 | 1426.67 | 1349.12 | 1189.27 | 1099.99 |

**Table A6.**Execution times in milliseconds on CPU with cable structure for 20,000 time-steps (1.0 S); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Length | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 2.17779 | 2.91875 | 3.60391 | 4.22735 | 4.89102 | 5.48444 | 6.11441 | 6.74417 | 7.31926 |

1.0 | 2.46055 | 2.88422 | 3.59794 | 4.31426 | 5.05442 | 5.70277 | 6.33951 | 6.97667 | 7.6054 |

1.7 | 2.1395 | 2.86173 | 3.5842 | 4.28218 | 5.01475 | 5.70856 | 6.42313 | 7.08627 | 7.77064 |

2.0 | 2.15932 | 2.86457 | 3.65434 | 4.38999 | 5.14664 | 5.90104 | 6.64811 | 7.39858 | 8.11657 |

2.2 | 2.13437 | 2.84882 | 3.56744 | 4.23231 | 5.005 | 5.69307 | 6.40477 | 7.06973 | 7.81166 |

3.0 | 2.12842 | 2.8367 | 3.55478 | 4.25004 | 4.95389 | 5.68169 | 6.33873 | 7.08078 | 7.79899 |

3.5 | 2.17363 | 2.89022 | 3.68692 | 4.43204 | 5.11849 | 5.81953 | 6.59956 | 7.44243 | 8.19544 |

**Table A7.**Execution times in milliseconds on CPU with cable structure for 30,000 time-steps (1.5 s); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Length | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 3.12263 | 4.15651 | 5.21524 | 6.25149 | 7.29587 | 8.21946 | 9.22595 | 10.1734 | 11.0834 |

1.0 | 3.02776 | 4.13103 | 5.13779 | 6.21179 | 7.24284 | 8.27689 | 9.31198 | 10.3538 | 11.3794 |

1.7 | 3.07845 | 4.11506 | 5.1605 | 6.18692 | 7.07477 | 8.23436 | 9.08837 | 10.2346 | 11.1813 |

2.0 | 3.04207 | 4.15862 | 5.21818 | 6.24523 | 7.19768 | 8.42383 | 9.48892 | 10.5595 | 11.5156 |

2.2 | 3.07943 | 4.10617 | 5.05179 | 6.16922 | 7.16885 | 8.22107 | 8.97064 | 10.2735 | 11.3051 |

3.0 | 3.07324 | 4.09731 | 5.12766 | 6.14702 | 7.1781 | 8.20001 | 9.12954 | 10.2564 | 11.1974 |

3.5 | 3.11948 | 4.18857 | 5.2585 | 6.32607 | 7.39699 | 8.45868 | 9.53566 | 10.4431 | 11.6698 |

**Table A8.**Execution times in milliseconds on CPU with cable structure for 40,000 time-steps (2.0 s); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Length | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 4.07271 | 5.40147 | 6.74728 | 7.91406 | 9.49966 | 10.8645 | 12.2209 | 13.5426 | 14.7493 |

1.0 | 4.05133 | 5.39391 | 6.71023 | 8.10064 | 9.45727 | 10.7963 | 12.0464 | 13.4511 | 14.8274 |

1.7 | 4.03446 | 5.37714 | 6.7095 | 8.07219 | 9.37009 | 10.6967 | 12.088 | 13.428 | 14.7969 |

2.0 | 4.05247 | 5.35428 | 6.77558 | 8.17905 | 9.57027 | 10.9469 | 12.3277 | 13.7138 | 15.0427 |

2.2 | 4.02911 | 5.37049 | 6.68062 | 8.05332 | 9.39624 | 10.7436 | 12.0882 | 13.4151 | 14.7604 |

3.0 | 4.00694 | 5.36161 | 6.70148 | 8.04218 | 9.26858 | 10.6034 | 11.9962 | 13.3591 | 14.7013 |

3.5 | 4.06723 | 5.44716 | 6.83255 | 8.22621 | 9.59891 | 10.9868 | 12.3376 | 13.6897 | 15.1424 |

**Table A9.**Execution times in milliseconds on CPU with ring structure for 20,000 time-steps (1.0 s); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Length | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 2.40232 | 3.31226 | 4.41017 | 5.23823 | 5.90022 | 6.5286 | 7.1236 | 7.75293 | 8.39601 |

1.0 | 2.44475 | 3.39442 | 4.40293 | 5.55135 | 6.90426 | 8.30695 | 9.32327 | 10.0085 | 10.6383 |

1.7 | 2.28215 | 3.39336 | 4.46288 | 5.60701 | 6.87933 | 8.27943 | 9.80254 | 11.5531 | 13.0987 |

2.0 | 2.30926 | 3.36279 | 4.55691 | 5.751 | 7.05894 | 8.43163 | 10.0547 | 11.7666 | 13.625 |

2.2 | 2.30105 | 3.31152 | 4.44178 | 5.63829 | 6.87634 | 8.28893 | 9.81915 | 11.4697 | 13.3359 |

3.0 | 2.29924 | 3.17312 | 4.29249 | 5.56422 | 6.89196 | 8.31743 | 9.82524 | 11.3518 | 13.2487 |

3.5 | 2.3378 | 3.2688 | 4.31792 | 5.60091 | 7.08923 | 8.5631 | 10.1441 | 11.6524 | 13.6406 |

**Table A10.**Execution times in milliseconds on CPU with ring structure for 30,000 time-steps (1.5 s); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Length | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 3.54459 | 4.78716 | 6.20219 | 7.85189 | 9.68717 | 11.1427 | 11.9949 | 13.3181 | 14.2619 |

1.0 | 3.62855 | 4.96414 | 6.28532 | 7.77905 | 9.42828 | 11.2651 | 13.3017 | 15.4316 | 17.8885 |

1.7 | 3.23275 | 4.91963 | 6.4203 | 7.93681 | 9.53062 | 11.254 | 13.1553 | 15.2147 | 17.4927 |

2.0 | 3.27914 | 4.8756 | 6.47453 | 7.98471 | 9.72569 | 11.1829 | 13.0988 | 15.4282 | 17.7083 |

2.2 | 3.22943 | 4.76811 | 6.3693 | 7.92068 | 9.59352 | 11.3215 | 13.0317 | 15.2034 | 17.3761 |

3.0 | 3.22724 | 4.43279 | 6.07518 | 7.84952 | 9.5962 | 11.3885 | 13.2657 | 15.2252 | 17.3078 |

3.5 | 3.27702 | 4.52774 | 5.89123 | 7.78062 | 9.65142 | 11.5836 | 13.6047 | 15.614 | 17.8365 |

**Table A11.**Execution times in milliseconds on CPU with ring structure for 40,000 time-steps (2.0 s); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Length | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 4.68156 | 6.24452 | 7.9821 | 9.89831 | 12.0787 | 14.4919 | 17.2231 | 19.4347 | 21.376 |

1.0 | 4.8007 | 6.49978 | 8.20022 | 10.0026 | 11.9132 | 14.129 | 16.423 | 19.0493 | 21.7869 |

1.7 | 4.1721 | 6.46022 | 8.34099 | 10.1745 | 12.2067 | 14.2542 | 16.4717 | 18.822 | 21.3789 |

2.0 | 4.19316 | 6.36998 | 8.43469 | 10.4116 | 12.3426 | 14.4685 | 16.5756 | 19.0607 | 21.6732 |

2.2 | 4.15634 | 6.23683 | 8.18774 | 10.297 | 12.3056 | 14.3531 | 16.5775 | 18.9224 | 21.3154 |

3.0 | 4.17216 | 5.62696 | 7.87179 | 10.1389 | 12.3108 | 14.4984 | 16.6263 | 18.9597 | 21.552 |

3.5 | 4.22194 | 5.78749 | 7.4671 | 9.9997 | 12.4308 | 14.7216 | 17.1015 | 19.5122 | 22.0179 |

**Table A12.**Execution times in milliseconds on GPU with cable structure for 20,000 time-steps (1.0 s); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Length | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 0.848999 | 0.889333 | 1.16274 | 1.16188 | 1.18538 | 1.2662 | 1.31223 | 1.31198 | 1.31173 |

1.0 | 0.841814 | 0.871742 | 1.12612 | 1.15056 | 1.21253 | 1.26207 | 1.29615 | 1.27176 | 1.29431 |

1.7 | 0.821817 | 0.865828 | 1.11941 | 1.1427 | 1.20852 | 1.24688 | 1.27963 | 1.25492 | 1.2792 |

2.0 | 0.81353 | 0.864334 | 1.16221 | 1.14417 | 1.1649 | 1.24775 | 1.27578 | 1.29729 | 1.27352 |

2.2 | 0.837617 | 0.863485 | 1.16083 | 1.14443 | 1.16972 | 1.24371 | 1.27455 | 1.29626 | 1.27503 |

3.0 | 0.835224 | 0.861763 | 1.16146 | 1.14268 | 1.16547 | 1.23839 | 1.26714 | 1.28983 | 1.26722 |

3.5 | 0.838692 | 0.86005 | 1.15908 | 1.13851 | 1.16179 | 1.23707 | 1.26472 | 1.28604 | 1.26323 |

**Table A13.**Execution times in milliseconds on GPU with cable structure for 30,000 time-steps (1.5 s); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Length | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 1.25072 | 1.30991 | 1.76031 | 1.72492 | 1.75575 | 1.89603 | 1.95313 | 1.91431 | 2.01845 |

1.0 | 1.24637 | 1.29681 | 1.74341 | 1.71531 | 1.74496 | 1.87123 | 1.9169 | 1.88033 | 1.98441 |

1.7 | 1.24701 | 1.28753 | 1.73467 | 1.71499 | 1.76222 | 1.85481 | 1.84959 | 1.86549 | 1.96853 |

2.0 | 1.21006 | 1.2876 | 1.73608 | 1.73641 | 1.751 | 1.84913 | 1.89863 | 1.85836 | 1.89367 |

2.2 | 1.19942 | 1.29034 | 1.73257 | 1.70141 | 1.74062 | 1.84963 | 1.89708 | 1.85949 | 1.89444 |

3.0 | 1.19859 | 1.28334 | 1.73439 | 1.70766 | 1.7371 | 1.84559 | 1.88606 | 1.85213 | 1.93722 |

3.5 | 1.19992 | 1.2821 | 1.73551 | 1.70365 | 1.73056 | 1.84127 | 1.88406 | 1.85143 | 1.95201 |

**Table A14.**Execution times in milliseconds on GPU with cable structure for 40,000 time-steps (2.0 s); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Lenght | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 1.67011 | 1.6729 | 2.31525 | 2.37552 | 2.33679 | 2.50182 | 2.56793 | 2.52347 | 2.66213 |

1.0 | 1.66108 | 1.6586 | 2.32068 | 2.3599 | 2.32225 | 2.46985 | 2.51293 | 2.52608 | 2.60121 |

1.7 | 1.6577 | 1.65349 | 2.31779 | 2.35987 | 2.31778 | 2.46187 | 2.43051 | 2.56676 | 2.60954 |

2.0 | 1.65875 | 1.71481 | 2.22505 | 2.35302 | 2.34389 | 2.37236 | 2.50714 | 2.46658 | 2.61 |

2.2 | 1.65421 | 1.71005 | 2.22187 | 2.35125 | 2.36354 | 2.37544 | 2.50728 | 2.4606 | 2.60991 |

3.0 | 1.65237 | 1.69412 | 2.22313 | 2.34239 | 2.31502 | 2.44709 | 2.50181 | 2.46247 | 2.60179 |

3.5 | 1.65479 | 1.64581 | 2.21637 | 2.35296 | 2.30923 | 2.43673 | 2.44566 | 2.457 | 2.59723 |

**Table A15.**Execution times in milliseconds on GPU with ring structure for 20,000 time-steps (1.0 s); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Length | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 0.824887 | 0.858292 | 1.17756 | 1.2021 | 1.22642 | 1.22681 | 1.26353 | 1.33139 | 1.35563 |

1.0 | 0.825941 | 0.867612 | 1.17605 | 1.19598 | 1.21588 | 1.21514 | 1.24554 | 1.31283 | 1.33772 |

1.7 | 0.809318 | 0.886947 | 1.17661 | 1.19286 | 1.18617 | 1.21087 | 1.27585 | 1.30247 | 1.32589 |

2.0 | 0.837368 | 0.864277 | 1.17822 | 1.19646 | 1.21667 | 1.20694 | 1.23423 | 1.30222 | 1.32612 |

2.2 | 0.80668 | 0.859621 | 1.17954 | 1.19914 | 1.21708 | 1.20913 | 1.23555 | 1.30158 | 1.32694 |

3.0 | 0.80394 | 0.83684 | 1.15383 | 1.19679 | 1.21919 | 1.2073 | 1.23838 | 1.3031 | 1.32707 |

3.5 | 0.802061 | 0.83134 | 1.15312 | 1.19869 | 1.2175 | 1.20365 | 1.23558 | 1.3025 | 1.32064 |

**Table A16.**Execution times in milliseconds on GPU with ring structure for 30,000 time-steps (1.5 s); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Length | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 1.27212 | 1.28448 | 1.67352 | 1.78668 | 1.81432 | 1.82109 | 1.9449 | 1.9757 | 1.94173 |

1.0 | 1.23273 | 1.27832 | 1.72846 | 1.78195 | 1.78786 | 1.81367 | 1.9168 | 1.94522 | 1.91128 |

1.7 | 1.20466 | 1.28149 | 1.7647 | 1.79105 | 1.74971 | 1.80354 | 1.9112 | 1.94247 | 1.91323 |

2.0 | 1.25088 | 1.28156 | 1.70282 | 1.79137 | 1.81618 | 1.80397 | 1.85009 | 1.93807 | 1.92427 |

2.2 | 1.24949 | 1.28851 | 1.69943 | 1.79239 | 1.82037 | 1.8065 | 1.91606 | 1.94038 | 1.90788 |

3.0 | 1.25007 | 1.24273 | 1.69035 | 1.79164 | 1.82277 | 1.80618 | 1.91635 | 1.94081 | 1.91116 |

3.5 | 1.24632 | 1.24053 | 1.63994 | 1.79321 | 1.82051 | 1.80342 | 1.916 | 1.94256 | 1.91027 |

**Table A17.**Execution times in milliseconds on GPU with ring structure for 40,000 time-steps (2.0 s); ${R}_{V}$ on the

**Left**and number of cells (length) on the

**Top**.

${\mathbf{R}}_{\mathbf{V}}$|Length | 750 | 1000 | 1250 | 1500 | 1750 | 2000 | 2250 | 2500 | 2750 |
---|---|---|---|---|---|---|---|---|---|

0.5 | 1.70821 | 1.76868 | 2.24855 | 2.3773 | 2.42197 | 2.41253 | 2.55641 | 2.51397 | 2.65875 |

1.0 | 1.7082 | 1.76785 | 2.25007 | 2.37585 | 2.37959 | 2.40608 | 2.53577 | 2.49686 | 2.63478 |

1.7 | 1.66191 | 1.77 | 2.25714 | 2.38252 | 2.42265 | 2.40074 | 2.53953 | 2.49534 | 2.62592 |

2.0 | 1.60376 | 1.77124 | 2.31413 | 2.29825 | 2.42199 | 2.4419 | 2.50959 | 2.56467 | 2.5395 |

2.2 | 1.59695 | 1.77738 | 2.34387 | 2.30694 | 2.42655 | 2.40352 | 2.5453 | 2.5857 | 2.54421 |

3.0 | 1.62956 | 1.7126 | 2.33512 | 2.30269 | 2.42819 | 2.40453 | 2.54706 | 2.58898 | 2.54902 |

3.5 | 1.65474 | 1.71035 | 2.2077 | 2.35757 | 2.42943 | 2.40046 | 2.54567 | 2.55726 | 2.60797 |

## Appendix E. Implementations Additional Material

#### Appendix E.1. Matlab Simulink Block Examples

## References

- Beeler, G.W.; Reuter, H. Reconstruction of the action potential of ventricular myocardial fibres. J. Physiol.
**1977**, 268, 177–210. [Google Scholar] [CrossRef] - Luo, C.H.; Rudy, Y. A model of the ventricular cardiac action potential. Depolarization, repolarization, and their interaction. Circ. Res.
**1991**, 68, 1501–1526. [Google Scholar] [CrossRef] [Green Version] - Karma, A. Electrical alternans and spiral wave breakup in cardiac tissue. Chaos
**1994**, 4, 461–472. [Google Scholar] [CrossRef] - Iyer, V.; Mazhari, R.; Winslow, R.L. A Computational Model of the Human Left-Ventricular Epicardial Myocyte. Biophys. J.
**2004**, 87, 1507–1525. [Google Scholar] [CrossRef] [Green Version] - Hodgkin, A.L.; Huxley, A.F. A quantitative description of membrane current and its application to conduction and excitation in nerve. J. Physiol.
**1952**, 117, 500–544. [Google Scholar] [CrossRef] - Noble, D. A modification of the Hodgkin—Huxley equations applicable to Purkinje fibre action and pacemaker potentials. J. Physiol.
**1962**, 160, 317–352. [Google Scholar] [CrossRef] - Noble, D. From the Hodgkin–Huxley axon to the virtual heart. J. Physiol.
**2007**, 580, 15–22. [Google Scholar] [CrossRef] - Dierckx, H.; Fenton, F.H.; Filippi, S.; Pumir, A.; Sridhar, S. Simulating normal and arrhythmic dynamics: From sub-cellular to tissue and organ level. Front. Phys.
**2019**, 7, 89. [Google Scholar] [CrossRef] [Green Version] - Bartocci, E.; Singh, R.; von Stein, F.B.; Amedome, A.; Caceres, A.J.; Castillo, J.; Closser, E.; Deards, G.; Goltsev, A.; Ines, R.S.; et al. Teaching cardiac electrophysiology modeling to undergraduate students: Laboratory exercises and GPU programming for the study of arrhythmias and spiral wave dynamics. Adv. Physiol. Educ.
**2011**, 35, 427–437. [Google Scholar] [CrossRef] [Green Version] - Gizzi, A.; Loppini, A.; Ruiz-Baier, R.; Ippolito, A.; Camassa, A.; La Camera, A.; Emmi, E.; Di Perna, L.; Garofalo, V.; Cherubini, C.; et al. Nonlinear diffusion and thermo-electric coupling in a two-variable model of cardiac action potential. Chaos Interdiscip. J. Nonlinear Sci.
**2017**, 27, 093919. [Google Scholar] [CrossRef] [Green Version] - Fenton, F.H.; Gizzi, A.; Cherubini, C.; Pomella, N.; Filippi, S. Role of temperature on nonlinear cardiac dynamics. Phys. Rev. E
**2013**, 87, 042717. [Google Scholar] [CrossRef] [Green Version] - Ruiz Baier, R.; Gizzi, A.; Loppini, A.; Cherubini, C.; Filippi, S. Modelling Thermo-Electro-Mechanical Effects in Orthotropic Cardiac Tissue. Commun. Comput. Phys.
**2019**, 27. [Google Scholar] [CrossRef] [Green Version] - Bini, D.; Cherubini, C.; Filippi, S. On vortices heating biological excitable media. Chaos Solitons Fractals
**2009**, 42, 2057–2066. [Google Scholar] [CrossRef] - Welsh, A.J.; Delgado, C.; Lee-Trimble, C.; Kaboudian, A.; Fenton, F.H. Simulating waves, chaos and synchronization with a microcontroller. Chaos Interdiscip. J. Nonlinear Sci.
**2019**, 29, 123104. [Google Scholar] [CrossRef] - Fenton, F.; Karma, A. Vortex dynamics in three-dimensional continuous myocardium with fiber rotation: Filament instability and fibrillation. Chaos Interdiscip. J. Nonlinear Sci.
**1998**, 8, 20–47. [Google Scholar] [CrossRef] - Bueno-Orovio, A.; Cherry, E.M.; Fenton, F.H. Minimal model for human ventricular action potentials in tissue. J. Theor. Biol.
**2008**, 253, 544–560. [Google Scholar] [CrossRef] - Bartocci, E.; Corradini, F.; Berardini, M.R.D.; Entcheva, E.; Grosu, R.; Smolka, S.A. Spatial Networks of Hybrid I/O Automata for Modeling Excitable Tissue. Electron. Notes Theor. Comput. Sci.
**2008**, 194, 51–67. [Google Scholar] [CrossRef] [Green Version] - Grosu, R.; Batt, G.; Fenton, F.H.; Glimm, J.; Guernic, C.L.; Smolka, S.A.; Bartocci, E. From Cardiac Cells to Genetic Regulatory Networks. In Proceedings of the CAV 2011: The 23rd International Conference on Computer Aided Verification, Snowbird, UT, USA, 14–20 July 2011; Springer: Berlin/Heidelberg, Germany, 2011; Volume 6806, pp. 396–411. [Google Scholar] [CrossRef] [Green Version]
- Wolfram, S. Cellular automata as models of complexity. Nature
**1984**, 311, 419–424. [Google Scholar] [CrossRef] - Murray, J. Mathematical Biology II: Spatial Models and Biomedical Applications; Springer Nature: Berlin/Heidelberg, Germany, 2013. [Google Scholar] [CrossRef]
- Neumann, J.; Burks, A.W. Theory of Self-Reproducing Automata; University of Illinois Press Urbana: Champaign, IL, USA, 1966; Volume 1102024. [Google Scholar] [CrossRef]
- Amorim, R.M.; Campos, R.S.; Lobosco, M.; Jacob, C.; dos Santos, R.W. An electro-mechanical cardiac simulator based on cellular automata and mass-spring models. In Proceedings of the International Conference on Cellular Automata, Santorini, Greece, 24–27 September 2012; Springer: Berlin/Heidelberg, Germany, 2012; pp. 434–443. [Google Scholar] [CrossRef]
- Lehotzky, D.; Zupanc, G.K. Cellular Automata Modeling of Stem-Cell-Driven Development of Tissue in the Nervous System. Dev. Neurobiol.
**2019**, 79, 497–517. [Google Scholar] [CrossRef] - Grosu, R.; Smolka, S.A.; Corradini, F.; Wasilewska, A.; Entcheva, E.; Bartocci, E. Learning and Detecting Emergent Behavior in Networks of Cardiac Myocytes. Commun. ACM
**2009**, 52, 97–105. [Google Scholar] [CrossRef] [Green Version] - Bartocci, E.; Corradini, F.; Di Berardini, M.; Entcheva, E.; Smolka, S.; Grosu, R. Modeling and simulation of cardiac tissue using hybrid I/O automata. Theor. Comput. Sci.
**2009**, 410, 3149–3165. [Google Scholar] [CrossRef] [Green Version] - Andalam, S.; Ramanna, H.; Malik, A.; Roop, P.; Patel, N.; Trew, M.L. Hybrid automata models of cardiac ventricular electrophysiology for real-time computational applications. In Proceedings of the 2016 38th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), Orlando, FL, USA, 16–20 August 2016; pp. 5595–5598. [Google Scholar] [CrossRef]
- Ye, P.; Grosu, R.; Smolka, S.A.; Entcheva, E. Formal Analysis of Abnormal Excitation in Cardiac Tissue. In Proceedings of the CMSB 2008: The 6th International Conference on Computational Methods in Systems Biology, Rostock, Germany, 12–15 October 2008; Volume 5307, pp. 141–155. [Google Scholar] [CrossRef] [Green Version]
- Bartocci, E.; Lió, P. Computational Modeling, Formal Analysis, and Tools for Systems Biology. PLoS Comput. Biol.
**2016**, 12, e1004591. [Google Scholar] [CrossRef] [Green Version] - Cytrynbaum, E.N.; MacKay, V.; Nahman-Lévesque, O.; Dobbs, M.; Bub, G.; Shrier, A.; Glass, L. Double-wave reentry in excitable media. Chaos Interdiscip. J. Nonlinear Sci.
**2019**, 29, 073103. [Google Scholar] [CrossRef] - Sigalas, C.; Cremer, M.; Bose, S.; Burton, R.A. Combining tissue engineering and optical imaging approaches to explore interactions along the neuro-cardiac axis. R. Soc. Open Sci.
**2020**. [Google Scholar] [CrossRef] - Bub, G.; Glass, L.; Publicover, N.G.; Shrier, A. Bursting calcium rotors in cultured cardiac myocyte monolayers. Proc. Natl. Acad. Sci. USA
**1998**, 95, 10283–10287. [Google Scholar] [CrossRef] [Green Version] - Bartocci, E.; Cherry, E.M.; Glimm, J.; Grosu, R.; Smolka, S.A.; Fenton, F.H. Toward real-time simulation of cardiac dynamics. In Proceedings of the 9th International Conference on Computational Methods in Systems Biology, Paris, France, 21–23 September 2011; ACM: New York, NY, USA, 2011; pp. 103–112. [Google Scholar] [CrossRef] [Green Version]
- Mena, A.; Ferrero, J.M.; Matas, J.F.R. GPU accelerated solver for nonlinear reaction–diffusion systems. Application to the electrophysiology problem. Comput. Phys. Commun.
**2015**, 196, 280–289. [Google Scholar] [CrossRef] - Pires, C.W.S.; Vasconcellos, E.C.; Clua, E.W.G. GPU Memory Access Optimization for 2D Electrical Wave Propagation Through Cardiac Tissue and Karma Model Using Time and Space Blocking. In Proceedings of the International Conference on Computational Science and Its Applications, Cagliari, Italy, 1–4 July 2020; Springer: Berlin/Heidelberg, Germany, 2020; pp. 376–390. [Google Scholar] [CrossRef]
- Xu, Q.; Zhu, D. FPGA-based Experimental Validations of Electrical Activities in Two Adjacent FitzHugh–Nagumo Neurons Coupled by Memristive Electromagnetic Induction. IETE Tech. Rev.
**2020**, 1–15. [Google Scholar] [CrossRef] - Adon, N.A.; Jabbar, M.H.; Mahmud, F. FPGA implementation for cardiac excitation-conduction simulation based on FitzHugh-Nagumo model. In Proceedings of the 5th International Conference on Biomedical Engineering in Vietnam, Ho Chi Minh City, Vietnam, 16–18 June 2014; Springer: Berlin/Heidelberg, Germany, 2015; pp. 117–120. [Google Scholar] [CrossRef]
- Fenton, F.; Cherry, E. Models of cardiac cell. Scholarpedia
**2008**, 3, 1868. [Google Scholar] [CrossRef] - Hastings, H.M.; Fenton, F.H.; Evans, S.J.; Hotomaroglu, O.; Geetha, J.; Gittelson, K.; Nilson, J.; Garfinkel, A. Alternans and the onset of ventricular fibrillation. Phys. Rev. E
**2000**, 62, 4043–4048. [Google Scholar] [CrossRef] [Green Version] - Watanabe, M.; Fenton, F.; Evans, S.; Hastings, H.; Alain, K. Mechanisms for Discordant Alternans. J. Cardiovasc. Electrophysiol.
**2003**, 12, 196–206. [Google Scholar] [CrossRef] - Cherry, E.M.; Fenton, F.H. Suppression of alternans and conduction blocks despite steep APD restitution: Electrotonic, memory, and conduction velocity restitution effects. Am. J. Physiol.-Heart Circ. Physiol.
**2004**, 286, H2332–H2341. [Google Scholar] [CrossRef] [PubMed] - Gizzi, A.; Cherry, E.; Gilmour, R.F., Jr.; Luther, S.; Filippi, S.; Fenton, F.H. Effects of pacing site and stimulation history on alternans dynamics and the development of complex spatiotemporal patterns in cardiac tissue. Front. Physiol.
**2013**, 4, 71. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Islam, M.A.; Cleaveland, R.; Fenton, F.H.; Grosu, R.; Jones, P.L.; Smolka, S.A. Probabilistic reachability for multi-parameter bifurcation analysis of cardiac alternans. Theor. Comput. Sci.
**2019**, 765, 158–169. [Google Scholar] [CrossRef] - Burger, M. Inverse problems in ion channel modelling. Inverse Probl.
**2011**, 27, 083001. [Google Scholar] [CrossRef] - Clerx, M.; Beattie, K.A.; Gavaghan, D.J.; Mirams, G.R. Four ways to fit an ion channel model. Biophys. J.
**2019**, 117, 2420–2437. [Google Scholar] [CrossRef] - Weinberg, S. Ephaptic coupling rescues conduction failure in weakly coupled cardiac tissue with voltage-gated gap junctions. Chaos
**2017**, 27, 093908. [Google Scholar] [CrossRef] - Courtemanche, M.; Glass, L.; Keener, J.P. Instabilities of a propagating pulse in a ring of excitable media. Phys. Rev. Lett.
**1993**, 70, 2182. [Google Scholar] [CrossRef] - Glass, L.; Josephson, M.E. Resetting and Annihilation of Reentrant Abnormally Rapid Heartbeat. Phys. Rev. Lett.
**1995**, 75, 2059–2062. [Google Scholar] [CrossRef] - Steinberg, B.E.; Glass, L.; Shrier, A.; Bub, G. The role of heterogeneities and intercellular coupling in wave propagation in cardiac tissue. Philos. Trans. R. Soc. Math. Phys. Eng. Sci.
**2006**, 364, 1299–1311. [Google Scholar] [CrossRef] - Fink, M.; Niederer, S.A.; Cherry, E.M.; Fenton, F.H.; Koivumäki, J.T.; Seemann, G.; Thul, R.; Zhang, H.; Sachse, F.B.; Beard, D.; et al. Cardiac cell modelling: Observations from the heart of the cardiac physiome project. Prog. Biophys. Mol. Biol.
**2011**, 104, 2–21. [Google Scholar] [CrossRef] [Green Version] - Patel, R.B.; Ng, J.; Reddy, V.; Chokshi, M.; Parikh, K.; Subacius, H.; Alsheikh-Ali, A.A.; Nguyen, T.; Link, M.S.; Goldberger, J.J.; et al. Early Repolarization Associated with Ventricular Arrhythmias in Patients with Chronic Coronary Artery Disease. Circ. Arrhythmia Electrophysiol.
**2010**, 3, 489–495. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Kaboudian, A.; Cherry, E.M.; Fenton, F.H. Real-time interactive simulations of large-scale systems on personal computers and cell phones: Toward patient-specific heart modeling and other applications. Sci. Adv.
**2019**, 5. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Klabunde, R. Cardiovascular Physiology Concepts; Lippincott Williams & Wilkins: Philadelphia, PA, USA, 2011. [Google Scholar]
- Mines, G.R. On circulating excitations in heart muscles and their possible relation to tachycardia and fibrillation. Trans. R. Soc. Can.
**2010**, 1914, 43–52. [Google Scholar] - Rytand, D.A. The Circus Movement (Entrapped Circuit Wave) Hypothesis and Atrial Flutter. Ann. Intern. Med.
**1966**, 65, 125–159. [Google Scholar] [CrossRef] [PubMed] - Loppini, A.; Gizzi, A.; Ruiz-Baier, R.; Cherubini, C.; Fenton, F.H.; Filippi, S. Competing Mechanisms of Stress-Assisted Diffusivity and Stretch-Activated Currents in Cardiac Electromechanics. Front. Physiol.
**2018**, 9. [Google Scholar] [CrossRef] - Cherubini, C.; Filippi, S.; Gizzi, A.; Ruiz-Baier, R. A note on stress-driven anisotropic diffusion and its role in active deformable media. J. Theor. Biol.
**2017**, 430, 221–228. [Google Scholar] [CrossRef] - Loppini, A.; Gizzi, A.; Cherubini, C.; Cherry, E.M.; Fenton, F.H.; Filippi, S. Spatiotemporal correlation uncovers characteristic lengths in cardiac tissue. Phys. Rev. E
**2019**, 100, 020201. [Google Scholar] [CrossRef] [Green Version] - Barone, A.; Gizzi, A.; Fenton, F.; Filippi, S.; Veneziani, A. Experimental validation of a variational data assimilation procedure for estimating space-dependent cardiac conductivities. Comput. Methods Appl. Mech. Eng.
**2020**, 358, 112615. [Google Scholar] [CrossRef] - Gottwald, E.; Gottwald, M.; Dhein, S. Enhanced dispersion of epicardial activation–recovery intervals at sites of histological inhomogeneity during regional cardiac ischaemia and reperfusion. Heart
**1998**, 79, 474–480. [Google Scholar] [CrossRef] - Taggart, P.; Sutton, P.M.; Opthof, T.; Coronel, R.; Trimlett, R.; Pugsley, W.; Kallis, P. Inhomogeneous Transmural Conduction During Early Ischaemia in Patients with Coronary Artery Disease. J. Mol. Cell. Cardiol.
**2000**, 32, 621–630. [Google Scholar] [CrossRef] - McSharry, P.E.; Clifford, G.D.; Tarassenko, L.; Smith, L.A. A dynamical model for generating synthetic electrocardiogram signals. IEEE Trans. Biomed. Eng.
**2003**, 50, 289–294. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Hund, T.J.; Rudy, Y. Rate Dependence and Regulation of Action Potential and Calcium Transient in a Canine Cardiac Ventricular Cell Model. Circulation
**2004**, 110, 3168–3174. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Sarai, N.; Matsuoka, S.; Kuratomi, S.; Ono, K.; Noma, A. Role of Individual Ionic Current Systems in the SA Node Hypothesized by a Model Study. Jpn. J. Physiol.
**2003**, 53, 125–134. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Mahajan, A.; Shiferaw, Y.; Sato, D.; Baher, A.; Olcese, R.; Xie, L.H.; Yang, M.J.; Chen, P.S.; Restrepo, J.G.; Karma, A.; et al. A Rabbit Ventricular Action Potential Model Replicating Cardiac Dynamics at Rapid Heart Rates. Biophys. J.
**2008**, 94, 392–410. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Cherry, E.M.; Ehrlich, J.R.; Nattel, S.; Fenton, F.H. Pulmonary vein reentry—Properties and size matter: Insights from a computational analysis. Heart Rhythm
**2007**, 4, 1553–1562. [Google Scholar] [CrossRef] [PubMed] - Rice, J.J.; Wang, F.; Bers, D.M.; De Tombe, P.P. Approximate Model of Cooperative Activation and Crossbridge Cycling in Cardiac Muscle Using Ordinary Differential Equations. Biophys. J.
**2008**, 95, 2368–2390. [Google Scholar] [CrossRef] [PubMed] [Green Version] - Lenarda, P.; Gizzi, A.; Paggi, M. A modeling framework for electro-mechanical interaction between excitable deformable cells. Eur. J. Mech.-A/Solids
**2018**, 72, 374–392. [Google Scholar] [CrossRef] [Green Version] - McCain, M.L.; Lee, H.; Aratyn-Schaus, Y.; Kléber, A.G.; Parker, K.K. Cooperative coupling of cell-matrix and cell–cell adhesions in cardiac muscle. Proc. Natl. Acad. Sci. USA
**2012**, 109, 9881–9886. [Google Scholar] [CrossRef] [Green Version] - Rohr, S. Role of gap junctions in the propagation of the cardiac action potential. Cardiovasc. Res.
**2004**, 62, 309–322. [Google Scholar] [CrossRef] - Barone, A.; Fenton, F.; Veneziani, A. Numerical sensitivity analysis of a variational data assimilation procedure for cardiac conductivities. Chaos
**2017**, 27, 093930. [Google Scholar] [CrossRef] - Barone, A.; Michele G., C.; Alessio, G.; Simona, P.; Veneziani, A. Efficient estimation of cardiac conductivities: A proper generalized decomposition approach. J. Comput. Phys.
**2020**, 423, 109810. [Google Scholar] [CrossRef] - Campos, J.; Oliveira, R.; dos Santos, R.; Rocha, B. Lattice Boltzmann method for parallel simulations of cardiac electrophysiology using GPUs. J. Comput. Appl. Math.
**2016**, 295, 70–82, VIII Pan-American Workshop in Applied and Computational Mathematics. [Google Scholar] [CrossRef] - Arthurs, C.J.; Bishop, M.J.; Kay, D. Efficient simulation of cardiac electrical propagation using high-order finite elements II: Adaptive p-version. J. Comput. Phys.
**2013**, 253, 443–470. [Google Scholar] [CrossRef] - Yang, C.; Geng, T.; Wang, T.; Patel, R.; Xiong, Q.; Sanaullah, A.; Wu, C.; Sheng, J.; Lin, C.; Sachdeva, V.; et al. Fully integrated FPGA molecular dynamics simulations. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, Denver, CO, USA, 17–22 November 2019; pp. 1–31. [Google Scholar] [CrossRef] [Green Version]
- Bakhteri, R.; Cheng, J.; Semmelhack, A. Design and Implementation of Cellular Automata on FPGA for Hardware Acceleration. Procedia Comput. Sci.
**2020**, 171, 1999–2007. [Google Scholar] [CrossRef] - Siddiqui, F.; Amiri, S.; Minhas, U.I.; Deng, T.; Woods, R.; Rafferty, K.; Crookes, D. FPGA-Based Processor Acceleration for Image Processing Applications. J. Imaging
**2019**, 5, 16. [Google Scholar] [CrossRef] [Green Version] - Georgis, G.; Lentaris, G.; Reisis, D. Acceleration techniques and evaluation on multi-core CPU, GPU and FPGA for image processing and super-resolution. J. Real-Time Image Process.
**2019**, 16, 1207–1234. [Google Scholar] [CrossRef] [Green Version]

**Figure 2.**1D cell structures circuit schematic. Panel (

**a**) sketches a cable and Panel (

**b**) a ring with 3 cells each. Cells are represented as voltage source and the resistors in between represent the membrane resistance.

**Figure 3.**Schematic of GPU and CPU communication and memories. Left, memory interaction on a single execution grid created by a single kernel call, with N sketched (thread) blocks and multiple threads within the blocks on GPU. Right, CPU interface and legend.

**Figure 4.**Boxplots of the mean squared error E of the variable u among CPU and GPU solutions. Panel (

**a**) are sampled per ${R}_{V}$ over increasing number of executed computations ($N\ast T$) while panel (

**b**) per number of executed computations ($N\ast T$) over varying ${R}_{V}$.

**Figure 5.**Mean execution times over all cable lengths and resistance values for GPU (orange) and CPU (blue). (

**a**) Cable, (

**b**) ring, and (

**c**) decreasing ring structure.

**Figure 6.**CV (in $\mathsf{\mu}\mathrm{m}\phantom{\rule{-1.111pt}{0ex}}/\phantom{\rule{-0.55542pt}{0ex}}\mathrm{ms}$) in different sized cell rings with varying value for ${R}_{V}$.

**Figure 8.**APD bifurication diagrams of four sampled cells within the decreasing ring experiment. The original number of cells is 1000 (10 cm). Parameters of the used von Mises distribution $\mu =1.55$, $\kappa =8$.

**Figure 9.**APD bifurication diagrams of two rings with 1750 cells (17.5 cm) and different von Mises distributions: (

**a**) μ = 1.55, κ = 8; (

**b**) μ = 1.98, κ = 10.

**Figure 10.**Bifurication diagrams of four sampled cells within the decreasing ring experiment. The original number of cells is 2500 (25 cm). von Mises Distribution parameters $\mu =1.98$, $\kappa =10$.

**Figure 11.**Space-time diagram comparison. The x-axis indicates the simulation time (in ms), the y-axis the length (in mm). Colormaps refer to the voltage variable u.

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Treml, L.M.; Bartocci, E.; Gizzi, A.
Modeling and Analysis of Cardiac Hybrid Cellular Automata via GPU-Accelerated Monte Carlo Simulation. *Mathematics* **2021**, *9*, 164.
https://doi.org/10.3390/math9020164

**AMA Style**

Treml LM, Bartocci E, Gizzi A.
Modeling and Analysis of Cardiac Hybrid Cellular Automata via GPU-Accelerated Monte Carlo Simulation. *Mathematics*. 2021; 9(2):164.
https://doi.org/10.3390/math9020164

**Chicago/Turabian Style**

Treml, Lilly Maria, Ezio Bartocci, and Alessio Gizzi.
2021. "Modeling and Analysis of Cardiac Hybrid Cellular Automata via GPU-Accelerated Monte Carlo Simulation" *Mathematics* 9, no. 2: 164.
https://doi.org/10.3390/math9020164