{'fraction_non_alphanumeric': 0.032642089093702, 'fraction_numerical': 0.017345110087045573, 'mean_word_length': 4.9297912713472485, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Recent Numerical Methods in Electrocardiology

Heart diseases are the leading cause of death in the world. Many questions have not yet been answered regarding the electrical waves propagation in cardiac tissue, and the mechanism of ventricular fibrillation that is produced by one or many spiral propagation waves of the excitation cardiac wall. Numerical modeling can play a crucial role and provides the necessary tools to answer some of these questions. However, the mathematical models, which give the best reflection of electrophysiological waves in cardiac tissue, are extremely complicated and present a significant computational challenges. The bidomain model is considered as the mathematical equations that have been used for simulating cardiac electrophysiological waves for many years (see Sundnes (2002), and Pierre (2006) and the reference therein). This model represents the cardiac tissue at a macroscopic scale by relating the transmembrane potential, the extracellular potential, and the ionic currents. The biodomain model consists of a system of two nonlinear partial differential equations coupled to a system of ordinary differential equations. From the numerical point of view, the model is computationally very expensive. The major difficulties are due to the computational grids size that must be very fine to get a realistic simulation of cardiac tissue. Indeed, the action potential is a wave with sharp depolarization and repolarization fronts and this wave travels across the whole computational domain calling for a very fine uniform mesh. One popular way of reducing the computational challenges of the bidomain model is the use of the monodomain model. This model considers a single nonlinear partial differential equation coupled with the same system of ordinary differential equations for the ionic currents. Although, it has been reported that the CPU requirements are reduced when simplifying the bidomain model to a monodomain model (see Sundnes et al. (2006)), both models still encounter computational difficulties because of the need for fine meshes and small time-steps. Many methods have been introduced in the literature to overcome these difficulties. The operator splitting is usually performed to separate the large non-linear system of ODEs and thus introduces subproblems easier to solve. A first-order (Godunov method) and a second-order (Strang method) accurate splitting technique can be employed. For more details the reader is referred to Sundnes et al. (2005), Lines, Buist, Grottum, Pullan, Sundnes & Tveito (2003); Lines, Grottum & Tveito (2003), and Weber Dos Santos et al. (2003)). To reduce the computational time at each time step, parallel computing techniques are used (see Colli Franzone & Pavarino (2004), Karpoukhin et al. (1995) and Weber dos Santos et al. (2004)). Several timestepping strategies have also been used, fully implicit ( Bourgault et al. (2003), and Murillo & Cai (2004)), and semi-implicit ( Franzone & Pavarino (2004), Ethier & Bourgault (2008))


Introduction
Heart diseases are the leading cause of death in the world. Many questions have not yet been answered regarding the electrical waves propagation in cardiac tissue, and the mechanism of ventricular fibrillation that is produced by one or many spiral propagation waves of the excitation cardiac wall. Numerical modeling can play a crucial role and provides the necessary tools to answer some of these questions. However, the mathematical models, which give the best reflection of electrophysiological waves in cardiac tissue, are extremely complicated and present a significant computational challenges. The bidomain model is considered as the mathematical equations that have been used for simulating cardiac electrophysiological waves for many years (see Sundnes (2002), and Pierre (2006) and the reference therein). This model represents the cardiac tissue at a macroscopic scale by relating the transmembrane potential, the extracellular potential, and the ionic currents. The biodomain model consists of a system of two nonlinear partial differential equations coupled to a system of ordinary differential equations. From the numerical point of view, the model is computationally very expensive. The major difficulties are due to the computational grids size that must be very fine to get a realistic simulation of cardiac tissue. Indeed, the action potential is a wave with sharp depolarization and repolarization fronts and this wave travels across the whole computational domain calling for a very fine uniform mesh. One popular way of reducing the computational challenges of the bidomain model is the use of the monodomain model. This model considers a single nonlinear partial differential equation coupled with the same system of ordinary differential equations for the ionic currents. Although, it has been reported that the CPU requirements are reduced when simplifying the bidomain model to a monodomain model (see Sundnes et al. (2006)), both models still encounter computational difficulties because of the need for fine meshes and small time-steps. Many methods have been introduced in the literature to overcome these difficulties. The operator splitting is usually performed to separate the large non-linear system of ODEs and thus introduces subproblems easier to solve. A first-order (Godunov method) and a second-order (Strang method) accurate splitting technique can be employed. For more details the reader is referred to Sundnes et al. (2005), Lines, Buist, Grottum, Pullan, Sundnes & Tveito (2003); Weber Dos Santos et al. (2003)). To reduce the computational time at each time step, parallel computing techniques are used (see Colli , Karpoukhin et al. (1995) and Weber dos Santos et al. (2004)). Several timestepping strategies have also been used, fully implicit ( Bourgault et al. (2003), and Murillo & Cai (2004)), and semi-implicit , Ethier & Bourgault (2008)) Recently, mesh adaptation methods have been introduced to reduce the size of the spatial mesh as well as the computational time. This method consists in locating finer mesh cells near the depolarisation-repolarization front position while a coarser mesh is used away from the front. In the context of isotropic unstructured meshes, the reader is referred to Cherry et al. (2003), Colli Franzone et al. (2006) and Trangenstein & Kim (2004) for more details. However, for two and three dimensional anisotropic mesh adaptation, where mesh cells are elongated along a specified direction, the reader is referred to Belhamadia (2008a;; Belhamadia et al. (2009).
The scope of this book chapter is to present the recent adaptive technique introduced in Belhamadia (2008a;b) for simulating the two-dimensional cardiac electrical activity. The method proposed reduces greatly the size of the spatial mesh as well as the computational time. Also, an accurate prediction of the depolarization and repolarization fronts is obtained showing the advantages of the proposed method.
This work is organized as follows. Section 2 presents a brief description of the bidomain and monodomain models with Aliev-Panfilov ion kinetics. Also, the finite element discretization for these models are presented. Section 3 is devoted to a description of the time-dependent adaptive strategy while the last section presents two-dimensional numerical results representing the re-entrant waves.

Mathematical Models
The bidomain and modomain models will be now presented. The first model consists of a nonlinear partial differential equation for the transmembrane potential V m coupled with an elliptic one for the extracellular potential φ e , as well as an ordinary differential equation, for at least one variable, representing the ionic currents. This system of equations takes the following form: where G i and G e are the symmetric intra-and extra-cellular conductivity tensors. The definition of the functions I ion (V m , w) and g(V m , w) depends on the ionic model. Modern cardiac ionic models include generally a set of 10 to 60 ordinary differential equations. However, in this work the Aliev-Panfilov model (see Aliev & Panfilov (1996)) is presented which consists of the following equations: If we assume equal anisotropy ratio of the intra-and extra-cellular media, it is well known that the bidomain equations can be reduced to the monodomain model. The resulting system consists of one nonlinear partial differential equation for the transmembrane potential www.intechopen.com

4GEGPV 0WOGTKECN /GVJQFU KP 'NGEVTQECTFKQNQI[
V m coupled with an ordinary differential equation for the ionic currents. The monodomain equations using Aliev-Panfilov model take the following form: Several time derivative discretization have been introduced for the bidomain model (see Ethier & Bourgault (2008), and Keener & Bogar (1998)). Also, the reader is referred to Belhamadia (2008b) for more discussion about different time schemes and their impact on twodimensional mesh adaptation. In this work, a fully implicit backward second order scheme (Gear) is employed as time discretization. Starting from V n−1 m and W n−1 at time t n−1 and from V n m and W n at time t n , Gear scheme gives: The variational formulation of the system of nonlinear equation (1) is straightforward and obtained by multiplying this system by test functions (ψ v , ψ φ , ψ w ) such that: Similarly, the variational formulation of the system of nonlinear equation (2) takes the following form: In all numerical simulations, a quadratic (P 2 ) for spatial discretization and Newton's method are employed to solve the non linear system above at each time step. Linear system resulting from Newton's method is solved by iterative methods, an incomplete LU decomposition (ILU) GMRES solver Saad (1996) from the PETSc library Balay et al. (2003).

Adaptive Method
As already mentioned, the accurate prediction of the depolarization-repolarization fronts in cardiac tissue is crucial. It is well known that a typical simulation of time-dependent cardiac electrophysiological waves using the whole heart may require about 10 7 grid points (see Cherry et al. (2003) and Ying (2005)), which leads to numerical challenges beyond the limit of the existing computational resources. To partially avoid these challenges, the mesh has to be adapted at each time step near the depolarization-repolarization fronts while coarser mesh are sufficient away from these fronts. This can be done with appropriate mesh adaptation techniques. In the context of the electrical wave of the heart, two different methods for estimating the error, depending on the dimension of the problem, have been introduced. A hierarchical error estimator described in Belhamadia (2008b) was used for a two-dimensional case, and an error estimator based on a definition of edge length using a solution dependent metric described in Belhamadia et al. (2009) was used for a three-dimensional case.
A brief description of adaptive methods for time dependent problems will now be presented.
Only the case of the monodomain model will be presented and similar strategy can be presented for the bidomain model. The objective of this method is to build at each time step t n a fine mesh in all regions where the variables V m and W evolve (V m , W and φ e in case of the bidomain model) and a coarse mesh in these other regions. Therefore, an accurate solution is obtained and the total number of elements is greatly reduced at each time step. The overall adaptive strategy is the following: m , W (n−1) and W (n) and a mesh M (n) at time t (n) ; 2. Solve the system (2) on mesh M (n) to obtain a first approximation of the solutions (denotedṼ m (n+1) andW (n+1) ) at time t (n+1) ; 3. Adapt the mesh on the two expressionsṼ 3 to obtain a new mesh M (n+1) ; m , W (n−1) and W (n) on mesh M (n+1) ; 5. Solve the system (2) on mesh M (n+1) for V n+1 m and W n+1 . 6. Next time step: go to step 2.

Numerical results
The mechanism of ventricular fibrillation is believed to be produced by one or many spiral propagation waves in the myocardium. The reader is referred to Biktashev et al. (1999), Jalife (2000, and Panfilov & Kerkhof (2004) and the reference therein for a complete discussion. From the numerical point of view, there are many strategies to initiate a spiral wave (see Bourgault et al. (2003), and Ethier & Bourgault (2008)). In this section, the performance of the adaptive method will be presented. A two-dimensional problem representing the re-entrant waves will be presented using the monodomain and bidomain model.

Monodomain model
This section is devoted to a test case using the monodomain model. The computational domain is the square [0, 100] × [0, 100]. Homogeneous Neumann conditions are imposed on all sides, and the following parameters values have been used: Figure 1 presents the transmembrane potential V m and the recovery variable W at the center of the computational domain as a function of time. The numerical solutions are obtained using adapted meshes with only an average of 5900 triangular elements leading to 23000 dof since we use quadratic (P 2 ) for spatial discretization. The total number of elements is reduced due to the use of the anisotropic adapted meshes. The reader is referred to Belhamadia (2008b) for more details about quantitative results and comparisons between structured and adapted meshes. It is clearly shown that the mesh is refined only in the vicinity of the front position while keeping sufficient resolution in other regions. The gain in computational time is obvious using the adaptive method since the total number of elements is greatly reduced.

Bidomain model
A test case using the bidomain model is now presented. The computational domain, the boundary conditions, and the physical parameters are the same as the previous section. However, the intra-and extra-cellular conductivity tensors are G i = 30 0 0.32 and G e = 20 0 1.37 As the previous section, the advantage of the adaptive method can be also illustrated in the case of unequal anisotropy ratios. The transmembrane potentials, and the recovery variable at the center of the computational domain as a function of time are similar to figure 1 and are not presented in this work to avoid a repetition. The numerical solutions are obtained using adapted meshes with only an average of 7100 triangular elements (29000 dof). Figure 3 illustrates the evolution of the adapted mesh. The front position is well captured and the solution seems uniformly accurate over time steps. Finally, the numerical solutions of the transmembrane potential, the extracellular potential and the recovery variable are shown in figure 4. As could be seen, the depolarization and repolarization fronts are smooth and well captured on the adapted anisotropic meshes.

Conclusions
A recent numerical method for the transmembrane potential was presented. The accuracy of the method was obtained by using an anisotropic time-dependent adaptive method. A twodimensional problem representing the re-entrant waves was shown using the monodomain and bidomain model. Although only a two dimensional case was presented, this method is www.intechopen.com

0GY &GXGNQROGPVU KP $KQOGFKECN 'PIKPGGTKPI
general and can be extended to three dimensional case. Results using realist heart geometry and with the monodomain model are recently presented in Belhamadia et al. (2009). The method proposed in this work uses two-variable ionic model. It will be interesting to see how the method performs with more complex ionic models.

Acknowledgments
The authors acknowledge the financial support of NSERC.