• Aucun résultat trouvé

Scalable space-time adaptive simulation tools for computational electrocardiology

N/A
N/A
Protected

Academic year: 2021

Partager "Scalable space-time adaptive simulation tools for computational electrocardiology"

Copied!
182
0
0

Texte intégral

(1)

Scalable Space-Time Adaptive

Simulation Tools for Computational

Electrocardiology

Doctoral Dissertation submitted to the

Faculty of Informatics of the Università della Svizzera italiana in partial fulfillment of the requirements for the degree of

Doctor of Philosophy

presented by

Dorian Krause

under the supervision of

Prof. Rolf Krause

(2)
(3)

Dissertation Committee

Prof. Rolf Krause Università della Svizzera italiana, Switzerland Prof. Illia Horenko Università della Svizzera italiana, Switzerland Prof. Igor Pivkin Università della Svizzera italiana, Switzerland Prof. Mark Potse Università della Svizzera italiana, Switzerland Prof. Luca F. Pavarino Università degli Studi di Milano, Italy

Prof. Thomas Schulthess Eidgenössische Technische Hochschule Zürich, Switzerland

Dissertation accepted on 4 October 2013

Research Advisor PhD Program Director

Prof. Rolf Krause Prof. Antonio Carzaniga

(4)

I certify that except where due acknowledgement has been given, the work presented in this thesis is that of the author alone; the work has not been submitted previously, in whole or in part, to qualify for any other academic award; and the content of the thesis is the result of work which has been carried out since the official commencement date of the approved research program.

Dorian Krause

Lugano, 4 October 2013

(5)

Abstract

This work is concerned with the development of computational tools for the solution of reaction-diffusion equations from the field of computational electrocardiology. We designed lightweight spatially and space-time adaptive schemes for large-scale parallel simulations.

We propose two different adaptive schemes based on locally structured meshes, managed ei-ther via a conforming coarse tessellation or a forest of shallow trees. A crucial ingredient of our approach is a non-conforming mortar element discretization which is used to glue together individ-ually structured meshes by means of constraints. For the solution of variational problems in the proposed trial spaces we investigate two diametrically opposite approaches. First, we discuss the implementation of a matrix-free scheme for the solution of the monodomain equation on patch-wise adaptive meshes. Second, an approach to the construction of standard linear algebra data structures on tree-based meshes is considered. In particular, we address the element-wise assembly of stiffness matrices on constrained spaces via an algebraic representation of the inclusion map. We evaluate the performance of our adaptive schemes for small- and large-scale problems and demonstrate their applicability to the design of realistic large-scale heart models.

In order to enable local time stepping in the context of (semi-)implicit integration schemes, we present a space-time discretization based on the proposed lightweight adaptive mesh data structures. By means of a discontinuous Galerkin method in time, the solution of the linear or non-linear system of equations is reduced to a sequence of smaller systems of adjustable size. We discuss the stabilization of the arising discrete problems and present extensive numerical evaluations of the space-time adaptive solution of the(1 + 1)-, (2 + 1)- and (3 + 1)-dimensional heat equation as well as the monodomain reaction-diffusion equation. Our results show both feasibility and potential of adaptive space-time discretizations for the solution of reaction-diffusion equations in computational electrocardiology.

(6)
(7)

Acknowledgements

First and foremost I want to thank my advisor Prof. Rolf Krause for the support over the last years, for the patient supervision and for providing me with the opportunity to contribute to the development of the PROPAGcode which was the starting point of this thesis work. The possibility

to present my work at various international conferences is greatly appreciated.

I am thankful to Prof. Mark Potse for the many interesting and insightful conversations and the close cooperation.

I also want to express my gratitude to the other members of my dissertation committee, Prof. Illia Horenko, Prof. Luca Pavarino, Prof. Igor Pivkin and Prof. Thomas Schulthess, for their time and interest.

I am grateful to my fellow colleagues for their help at countless occasions and for the friendly working atmosphere.

Thanks to Dr. Daniel Ruprecht, Dr. Robert Speck and Dr. Thomas Dickopf for finding time to proofread parts of this work despite their busy schedule.

Last but not least I want to thank my family for their support and my parents for encouraging and actively backing my intellectual pursuits.

This work was partially funded by the “Swiss Platform for Performance and High-Productivity Computing” (HP2C) and profited from the funding for the project “A High Perfor-mance Approach to Cardiac Resynchronization Therapy” within the context of the “Iniziativa Ti-cino in Rete”. Computational resources were generously provided by the University of Lugano, grants by the Swiss National Supercomputing Centre (CSCS) under the project IDs 268 and 397 as well as a preparatory project grant by PRACE.

This thesis was typeset with LuaTEX, Version beta-0.70.2-2012052410 (TeX Live 2012). Plots were prepared using METAPOST1.504 (TeX Live 2012), PARAVIEW763.98.1 and MATPLOTLIB87

1.2.1.

(8)
(9)

Contents

Contents vii

List of Figures xi

List of Tables xvii

List of Algorithms xvii

1 Introduction 1

2 Computational Modeling in Electrophysiology 5

2.1 Modeling Electrical Properties of Cardiac Cells . . . 5

2.1.1 Hodgkin-Huxley Type Models . . . 6

2.1.2 Membrane Models for Human Ventricular Cells . . . 8

2.1.3 The Fitz-Hugh Nagumo Model . . . 8

2.1.4 The Bernus Model . . . 8

2.2 Modeling Electrical Properties of Cardiac Tissue . . . 9

2.2.1 The Bidomain equation . . . 9

2.2.2 The Monodomain equation . . . 10

2.2.3 Conductivity Tensors . . . 10

2.2.4 Summary of Governing Equations . . . 11

2.3 Numerical Methods . . . 12

2.3.1 Spatial Discretization . . . 12

2.3.2 Temporal Discretization . . . 15

2.4 Adaptive Computational Methods . . . 18

2.4.1 Motivation . . . 18

2.4.2 Background . . . 19

3 Parallelization of the PROPAGHeart Model for Large-Scale Simulations 25 3.1 Characterization of PROPAG-4 . . . 25

3.2 Algorithms for Large-Scale Simulations . . . 27

3.2.1 Implicit-Explicit Euler Time Integration . . . 28

(10)

viii Contents

3.2.2 Parallel Setup . . . 28

3.3 Hybrid Parallelization . . . 29

3.3.1 MPI Parallelization . . . 30

3.3.2 MPI Threading Support . . . 31

3.4 Results . . . 32

3.4.1 Performance of Single-Threaded Execution . . . 33

3.4.2 Benefits of Hybrid Execution . . . 34

3.4.3 Weak Scaling of Monodomain Solver . . . 35

3.4.4 Performance of Parallel Setup . . . 37

3.5 Discussion . . . 38

4 A Lightweight Adaptive Scheme for the Monodomain Equation 41 4.1 Introduction . . . 41

4.1.1 Overview . . . 41

4.2 Lightweight Adaptive Meshes . . . 42

4.3 Mortar Discretization . . . 44

4.3.1 Mortar Constraints . . . 45

4.3.2 Mortar Projection . . . 46

4.3.3 Dual Lagrange Multipliers . . . 47

4.3.4 Saddle-Point Formulation . . . 49

4.3.5 A Basis for the Subspace . . . 49

4.4 Linear Solver and Preconditioning . . . 50

4.5 Transfer Operators . . . 51 4.5.1 L2-Transfer . . . 51 4.5.2 Local Transfer . . . 52 4.6 Adaptivity Control . . . 52 4.6.1 Error Estimation . . . 52 4.6.2 Marking Strategy . . . 53

4.7 Implementation and Parallelization . . . 53

4.7.1 Implementation Aspects . . . 54

4.7.2 Parallelization . . . 56

4.7.3 Measuring Depolarization Times . . . 57

4.8 Results . . . 57 4.8.1 Convergence Studies . . . 59 4.8.2 Small-Scale Problem . . . 60 4.8.3 Large-Scale Problem . . . 65 4.8.4 Parallel Scalability . . . 66 4.9 Related Work . . . 67 4.10 Discussion . . . 72

(11)

ix Contents

5 Spatial Adaptivity Using Forests of Shallow Trees 75

5.1 Introduction . . . 75

5.2 Adaptive Meshes on Forests of Shallow Trees . . . 76

5.3 Discretization . . . 77

5.3.1 Geometrically Non-Conforming Mortar Discretization . . . 77

5.3.2 The Subspace of Continuous Functions . . . 79

5.3.3 Assembly Strategy . . . 80

5.4 Implementation and Parallelization . . . 82

5.4.1 Mesh Datastructure . . . 82

5.4.2 Finite Element Spaces and Linear Algebra . . . 85

5.4.3 Assembly Strategy . . . 88 5.4.4 Transfer Operators . . . 89 5.5 Results . . . 90 5.5.1 Small-Scale Problem . . . 90 5.5.2 Large-Scale Problem . . . 91 5.5.3 Bidomain Equation . . . 96 5.5.4 Heart Model . . . 100 5.6 Discussion . . . 103

6 Adaptivity Using Space-Time Finite Elements 111 6.1 Introduction . . . 111

6.2 Space-Time Discretization . . . 112

6.2.1 Discretization with Continuous Finite Elements . . . 113

6.2.2 Discontinuous Galerkin Methods . . . 114

6.2.3 Discretization on Non-Conforming Meshes . . . 115

6.2.4 Space-Time Transfer Operator . . . 115

6.2.5 Discretization of Monodomain and Bidomain equations . . . 116

6.3 Results . . . 117

6.3.1 (1+1)-dimensional Heat Equation . . . 118

6.3.2 Stabilization of the Space-Time Mortar Element Method . . . 121

6.3.3 (2+1)-dimensional Heat Equation . . . 124

6.3.4 (3+1)-dimensional Heat Equation . . . 128

6.3.5 (1+1)-dimensional Monodomain Equation . . . 128

6.3.6 (2+1)-dimensional Monodomain Equation . . . 135

6.4 Related Work . . . 138

6.5 Discussion . . . 139

7 Conclusion 141

A Assembly of the Mortar Projection 145

(12)
(13)

Figures

2.1 Behavior of the Hodgkin-Huxley model. The upper plots show the dependency of the steady-state values and relaxation times on V . The lower plots show the solution of equation (2.3) with an initial voltage difference of +15 mV relative to the equilibrium value of -65 mV. . . 7 2.2 Solution of equation (2.3) with an initial voltage difference of +30.272 mV (relative

to the equilibrium value of -90.272 mV) using the Bernus membrane model. . . 7 2.3 Contour plot of the solution of the monodomain equation in a two-dimensional

do-mainΩ = (0, 1)2at three different times. Lines represent the level-sets{V (x,t) = V 0}

for V0= -90 mV, -80 mV, . . . , 30 mV, 40 mV. . . 19

3.1 Scaling of PROPAG-4 in a monodomain run with breakdown of runtime. . . 27 3.2 Comparison of the timing for computing Idifin PROPAG-4 and PROPAG-5. . . 27

3.3 Scaling of explicit Euler (left) and implicit-explicit Euler (right) on the Cray XT5. Problem M requires at least 24 cores for implicit-explicit or explicit Euler with one thread per process. X requires at least 132 cores for execution (96 when using 12 threads per process). The starting point for the strong scaling study for problem XL is 2112 cores. . . 36 3.4 Improvement through hybrid execution for explicit (left) and implicit-explicit Euler

(right) relative to pure MPI for different problem sizes on the Cray XT5. . . 36 3.5 Comparison of the improvement through hybrid execution and the efficiency of the

pure MPI code. Data points are taken from both explicit and implicit-explicit Euler runs and include all four considered problem sizes. . . 37 3.6 Quality of the “best-effort” bootstrapping in PROPAG-5 when using one (top) and

twelve (bottom) threads per process on the Cray XT5. . . 38

4.1 Two-dimensional sketch of the geometric setup. . . 44 4.2 Contour plot of the dual Lagrange multiplier functionψα˙. The left shows the basis

function corresponding to an interior node. The right plot shows the basis function corresponding to the right lower corner ofγ+

m, i.e., the right and lower boundary of

the shown rectangle are on∂ γ+

m. . . 48

(14)

xii Figures

4.3 Error with respect to the exact solution and error indicator efficiency for Experi-ments A – G. . . 58 4.4 Depolarization times computed for the small-scale problem. A projected view of

the domainΩ ⊂ R3is shown for clarity. . . . 62

4.5 Relative energy error of the adaptive method with respect to the result of the struc-tured method. Shown is the spatial error at the end of each lap. . . 62 4.6 Wireframe plot of the mesh Tℓℓℓ(t)(left) and the unstructured adaptive mesh (right)

at times t= 0.5, 5, 10, 15 ms for the small-scale problem. . . 63 4.7 Measured execution times for the small-scale problem. The upper graph shows the

walltime for the execution of a lap of 20 time steps. Note that in the adaptive code each lap is repeated up to four times (cf. Figure 4.8). The lower plot shows the accumulated execution time. . . 64 4.8 Number of linear solver iterations per lap (upper plot) and number of passes for the

integration of a lap (lower plot) for the small-scale problem. . . 64 4.9 Number of mesh nodes over time for the small-scale problem. . . 65 4.10 Execution time of the adaptive code in comparison to a structured code for A. The

upper graph shows the walltime for the execution of a lap of 20 time steps. The lower plot shows the accumulated execution time. . . 67 4.11 Execution time of the adaptive code in comparison to a structured code for B. The

upper graph shows the walltime for the execution of a lap of 20 time steps. The lower plot shows the accumulated execution time. . . 68 4.12 Number of linear solver iterations for A (upper plot) and B (lower plot). . . 68 4.13 Distribution of the execution time for problem A. The time measurements are summed

over all passes over each lap. . . 69 4.14 Depolarization times tdepol(in ms) for the problem A. To simplify the visualization,

the mesh has been downsampled by a factor four in each direction. The two plots on the right are rotated by 180◦to visualize the back of the ventricle. . . 69 4.15 Membrane voltage (in mV) and adaptive mesh at t = 50, 100, 150, 200 ms for A.

The two plots on the right are rotated by 180◦to visualize the back of the ventricle. 70 4.16 Strong scaling results. . . 71

5.1 Sketch of a quadtree. The leaves are ordered by their Morton index starting at the left lower leaf with key 000001. For leaves with level≤ 2 the binary representation of the Morton index is shown. . . 78 5.2 Schematic description of the construction of a shallow tree mesh. The left drawing

shows the coarse tessellation of the simulation domainΩ . A tree τi ∈ (Z≥0)∗ is

assigned to each patch Ωi ⊂ Ω (middle drawing). Finally, a structured mesh is

assigned to each tree leaf according to the level (right drawing). . . 78 5.3 Assignment of master and slave nodes for the mortar method (left) and the

conform-ing subspace (right). Circles represent interior nodes, crosses identify master nodes and triangles represent slave nodes. . . 79

(15)

xiii Figures

5.4 Contours of the membrane voltage (in mV) and adaptive mesh at t= 0.5, 1, 7.5 ms (top to bottom) for the small-scale problem. The left plots show results obtained using our shallow tree adaptive approach. The right plots show results obtained with the lightweight adaptive approach (see Section 4.8.2). . . 92 5.5 Measured execution times. The upper graph shows the walltime for the execution

of a lap of 20 time steps. Note that in the adaptive code each lap is repeated up to four times (cf. Figure 5.6). The lower plot shows the accumulated execution time. . 93 5.6 The upper graph shows the number of linear solver iterations per lap. The lower

graph shows the number of passes for the integration of a lap. . . 93 5.7 Number of mesh nodes over time for the small-scale problem. . . 94 5.8 Distribution of the execution time for the small-scale problem. The time

measure-ments are summed over all passes over each lap. . . 94 5.9 Execution time of the adaptive code in comparison to a structured code. The upper

graph shows the walltime for the execution of a lap of 20 time steps. The lower plot shows the accumulated execution time. . . 97 5.10 Number of linear solver iterations (upper plot) and number of degrees of freedom

(dimension of the mortar subspace) over time (lower plot). . . 97 5.11 Membrane voltage (in mV) and adaptive mesh at t = 50, 100, 150, 200 ms. The

two plots on the right are rotated by 180◦to visualize the back of the ventricle. . . . 98 5.12 Execution time of the adaptive code in comparison to uniform mesh methods. . . . 99 5.13 Distribution of the execution time for the large-scale problem A. . . 99 5.14 Number of degrees of freedom for the large-scale problem B. . . 99 5.15 Distribution of the execution time for the solution of the bidomain equation. The

time measurements are summed over all passes over each lap. . . 100 5.16 Extra-cellular potentialϕe(in mV) and adaptive mesh at t= 50, 100, 150, 200 ms.

The two plots on the right are rotated by 180◦to visualize the back of the ventricle. 101 5.17 Membrane voltage (in mV) during the depolarization phase at times t= 15, 30, 50,

75 ms. The two plots on the right are rotated by 180◦to visualize the back of the heart. The color bar limits are set to−90 mV and 20 mV. . . 104 5.18 Adaptive meshes at times t = 15, 30, 50, 75 ms (cf. Figure 5.17). The two plots on

the right are rotated by 180◦to visualize the back of the heart. . . 105 5.19 Membrane voltage (in mV) during the repolarization phase at times t= 200, 300,

400, 500 ms. The two plots on the right are rotated by 180◦to visualize the back of the heart. The color bar limits are set to−90 mV and 20 mV. . . 106 5.20 Execution time of the adaptive code in comparison to uniform mesh solution

meth-ods. The upper graph shows the walltime for the execution of a lap of 20 time steps. The lower plot shows the accumulated execution time. . . 107 5.21 Strong scaling results. . . 107

(16)

xiv Figures

6.1 Convergence of uniform and adaptive discretizations for the approximation of the (1 + 1)-dimensional heat equation. In the left plot we vary both the time step size τ and the spatial resolution (controlled by the depth of the treesτττ). . . 119 6.2 Contours of the exact solution V∗. The vertical axis equals the time. . . 120 6.3 Space-time representation of the spatially adapted mesh. For the visualization the

mesh is downsampled by a factor of two in each direction. . . 120 6.4 Space-time adaptive mesh. For the visualization the mesh is downsampled by a

factor of two in each direction. . . 120 6.5 Plot of the numerical solution Vτττ (left) and the corresponding local time stepsτ for

x = −0.5, x = 0 and x = 0.5. . . 120 6.6 Comparison of the discrete solution Vτττ∈ Yτττmwithout (left plot) and with (right plot)

stabilization. . . 123 6.7 Comparison of the error of the mortar element solution in the L2(H1)- and H1

(Q)-semi-norms with and without stabilization. . . 123 6.8 Comparison of the convergence of uniform and adaptive discretizations of the(2 +

1)-dimensional heat equation. . . 125 6.9 Comparison of the linear solver performance. The left plot shows the

accumu-lated number of iterations required by the GMRES solver with restricted additive Schwarz preconditioner. The right plot shows the total time spent in the solver. The line styles are the same as in Figure 6.8. . . 125 6.10 Projected view of the contours of the discrete solution using space-time finite

ele-ments (left) and an implicit Euler time discretization (right). . . 128 6.11 Space-time contour plot of the discrete solution using space-time finite elements

(left) and an implicit Euler time discretization (right). The wireframe of the mesh on leaves with level ≥ 3 is overlayed to indicate the structure of the adaptively refined meshes. . . 129 6.12 Comparison of the convergence of uniform and adaptive discretizations of the(3 +

1)-dimensional heat equation. . . 130 6.13 Contours of the solution of the (1 + 1)-dimensional monodomain equation using

an implicit-explicit Euler (left), implicit Euler (middle) and space-time (right) dis-cretization. The vertical axis equals the time. For the visualization, the simulation domain has been scaled in time direction. . . 131 6.14 Number of Newton iterations (left) and functional evaluations (right) in the

depen-dence of the extent E/64 ms in time direction. . . 132 6.15 Non-conforming adaptively refined space-time mesh on(−1,1)×(3.75,7.75) using

a standard maximum-based refinement strategy (left) and weighted error indicators (right). The vertical axis equals the time. . . 134 6.16 Number of degrees of freedom relative to the dimension 33,345 of a conforming

ansatz space on a uniform mesh. For the implicit Euler method, accumulated num-ber of degrees of freedom are shown. For the space-time discretization results with standard and modified marking strategy are shown. . . 135

(17)

xv Figures

6.17 Number of Newton iterations (left) and functional evaluations (right). The plot shows the number of iterations and evaluations accumulated (blue) and averaged (red) over all passes. . . 136 6.18 Number of degrees of freedom relative to the dimension 282,897 of a conforming

ansatz space on a uniform mesh. . . 136 6.19 Space-time contour plot of the membrane voltage on(0, 1) ×12, 1× (0,12)

com-puted using space-time finite elements. The wireframe of the mesh on leaves with level≥ 2 is overlayed to indicate the structure of the adaptively refined meshes. The time direction is scaled by a factor 14 for the visualization. . . 137

(18)
(19)

Tables

3.1 Problem sizes for experiments. . . 32 3.2 Breakdown of communication time for S using explicit and implicit-explicit

inte-gration with one thread per process. . . 33 3.3 Characteristics of the node distribution during scale-out of M. . . 33 3.4 Breakdown of communication time for S using explicit and implicit-explicit Euler.

TPt2Ptand TColldenote point-to-point and collective communication time, respectively. 34

3.5 Percentage increase in #nodes for M with 1, 6, and 12 threads per process. . . 35 3.6 Weak scalability of the implicit-explicit Euler in PROPAG-5. . . 37 3.7 Normalized throughput obtained from the lowest timing measured in Section 3.4. . 39

6.1 Comparison of the total number of degrees of freedom and the measured error in the |·|L2(H1)semi-norm for a uniform implicit Euler discretization, a spatially adaptive and a space-time adaptive discretization. . . 119 6.2 Quotient of the number of degrees of freedom (in millions) and the measured

dis-cretization error for the uniform and adaptive implicit Euler disdis-cretization and the adaptive space-time discretization of the(2 + 1)-dimensional heat equation. Each row corresponds to a data point from Figure 6.8. . . 125 6.3 Scaling behavior of a GMRES linear solver with restricted additive Schwarz

pre-conditioner for an implicit Euler (top) and space-time (bottom) discretization. . . . 126 6.4 Scaling of a conjugate gradient solver with BoomerAMG preconditioner for an

im-plicit Euler discretization. . . 126 6.5 Quotient of the number of degrees of freedom (in millions) and the measured

dis-cretization error for the uniform and adaptive implicit Euler disdis-cretization and the adaptive space-time discretization of the(3 + 1)-dimensional heat equation. Each row corresponds to a data point from Figure 6.12. . . 130 6.6 Number of Newton iterations and evaluations of the functional for a selection of the

time laps. For the implicit Euler, average and accumulated numbers are shown. . . 132

(20)
(21)

Algorithms

3.1 Monodomain solver in PROPAG-4. . . 26

3.2 Bidomain solver in PROPAG-4. . . 26

3.3 Bootstrap and mesh distribution algorithm. . . 29

3.4 Parallel monodomain solver in PROPAG-5. . . 31

4.1 Time integration algorithm (schematic). . . 43

4.2 Implementation of the sparse matrix-vector multiplication Vℓℓℓ= KYm ℓℓℓUℓℓℓ using the product space matrix KXℓℓℓ =LN i=1KXℓi. . . 55

5.1 Assembly of the matrix Q mapping the mortar element spaceYmτττ into the product spaceXτττ. . . 86

5.2 Assembly of the matrix Q mapping the conforming ansatz spaceYc τττinto the product spaceXτττ. . . 87

5.3 Assembly of the stiffness matrix AYand right-hand side bY. . . 89

6.1 Time integration algorithm (schematic). . . 115

(22)
(23)

1 Introduction

The study of the electrophysiology of the human heart is an important field in modern medicine and life sciences. As in most branches of science nowadays, computational modeling plays an important and increasingly pervasive role in electrophysiological studies126. In order to support these efforts, the community of computational mathematicians and computer scientists faces the challenge of de-veloping computational tools for use by the domain scientists. Due to the fast-paced changes in computational hardware, these tools and the underlying methods and techniques need to be adapted or re-designed continuously for optimal performance.

This thesis is concerned with efficient (space-time) adaptive tools for computational electro-cardiology targeted at current and next-generation supercomputing systems. We designed, im-plemented and experimentally evaluated novel adaptive schemes for the solution of non-linear reaction-diffusion equations. The research hypothesis underlying the presented work was that non-conforming discretizations provide an excellent framework for the design of scalable adaptive al-gorithms based on lightweight data structures.

In the first part of this thesis (Chapters 4 and 5) we consider spatially adaptive techniques with a focus on the monodomain equation97. The monodomain equation is a non-linear reaction-diffusion equation used extensively in computational electrocardiology (see, for example, Potse et al.127). In practice, this equation is often solved using low-order, semi-implicit time discretization schemes that can be implemented very efficiently due to a weak diffusion term. Therefore we expect cur-rent state-of-the-art parallel adaptive techniques (see, for example, Burstedde et al.35), which were developed for strongly non-linear and ill-conditioned problems, to be unsuited for our use case.

Instead, we pay particular attention to the cost per degree of freedom and the underlying mesh data structures. Non-conforming discretization techniques, in particular the mortar element method25 that is used throughout this thesis, allow for the flexible construction of adaptive meshes (or, to be more precise, approximation spaces) by “gluing” together local pieces. Our basic building blocks are structured/tensor meshes, a data structure that is equally well suited for current latency-optimized processing units (such as standard x86 central processing units) and for throughput-optimized processing units (such as graphical processing units).

In this thesis we propose two different adaptive schemes based on locally structured meshes, managed either via a conforming tessellation (Chapter 4) or a forest of shallow trees (Chapter 5).

(24)

2

These mesh data structures are characterized by their low memory footprint. We present two dia-metrically opposite approaches to the design of the parallelized algebra data structures. On the one hand, we propose a matrix-free implementation that allows us to fully exploit the special mesh struc-ture but is limited to the solution of reaction-diffusion equations using semi-implicit time stepping and block preconditioning. On the other hand, we discuss an approach based on standard linear al-gebra data structures that cannot take advantage of the local structure of the non-conforming meshes but are flexible and can be combined with a variety of preconditioning techniques.

We assess the performance of our solution schemes in several numerical experiments and demon-strate the applicability of the proposed adaptive techniques for the design of realistic large-scale heart models.

In the second part of this thesis (Chapter 6) we discuss combined space-time adaptivity. In many cases of interest, global time step control is inefficient because the time step is globally adjusted to the local features of the solution166. Local time stepping67on the other hand is not easily combined with implicit or semi-implicit time discretizations. We consider space-time discretizations as a means to enable local time stepping in the context of (semi-)implicit discretizations.

We employ a hybrid space-time discretization that combines non-conforming finite elements within a space-time slab with a discontinuous Galerkin method92in time in order to decouple in-dividual space-time slabs. This discretization scheme allows us to reuse the adaptive mesh data structures and discretization schemes developed in Chapters 4 and 5 for a combined space-time adaptive solution scheme. Since we employ quadrilateral or hexahedral tessellations and local tensor meshes, our mesh data structures naturally generalize to arbitrary dimensions. Our long-term goal is the space-time adaptive solution of(3 + 1)-dimensional large-scale problems. The lightweight nature of the employed mesh data structures is crucial for the feasibility of such simulations on supercomputers with their limited amounted of main memory per core.

We present extensive numerical experiments that prove the feasibility of our approach and high-light challenges that need to be addressed in future work.

Contributions

Our work contributes, on the one hand, to the on-going exploration of the design space of adaptive methods on contemporary high performance platforms and, on the other hand, to research efforts on fast solution techniques for computational electrocardiology. We present adaptive strategies that combine the performance advantages of structured meshes with the flexibility of non-conforming mortar discretizations in a novel and original fashion. These methods can be used for both space and space-time adaptive simulations of non-linear reaction-diffusion equations.

In this thesis we take a holistic approach to the design of adaptive solution schemes that com-bines the design of the mesh data structures, the definition of appropriate ansatz spaces as well as considerations about implementation and parallelization. In addition, we present insightful numer-ical experiments to assess the performance of our designs.

(25)

3

Outline

This thesis is organized as follows. In Chapter 2 we introduce the governing equations used for modeling the electrical properties of cells and tissue. We review discretization techniques for these equations and discuss the spatial discretization using a symmetric Galerkin method as well as dif-ferent low-order time discretizations. Finally, we motivate the study of adaptive techniques for the solution of the bidomain and monodomain equations and review the state of the art in this field.

In Chapter 3 we discuss the hybrid parallelization of the PROPAG heart model. This chapter serves two purposes. On the one hand we present a state-of-the-art computational heart model on uniform meshes and thus show the performance level that our adaptive schemes are to compete with. On the other hand we present a performance analysis of the new hybrid OpenMP+MPI paral-lelization in PROPAG-5, which is of interest in its own right.

In Chapter 4 we present a lightweight adaptive discretization scheme for the monodomain equa-tion. We introduce the mortar element method in the context of a geometrically conforming tes-sellation and propose a matrix-free implementation. Numerical experiments are discussed and a comparison with related work is drawn.

In Chapter 5 we present an alternative scheme based on forests of shallow trees. This design al-lows for a finer control over the refined regions compared to the lightweight scheme from Chapter 4. We discuss the construction of approximation spaces and the assembly of mass and stiffness matri-ces on these meshes and present numerical experiments to assess the performance of this approach. In Chapter 6 we discuss the extension of our previous work to space-time adaptivity by means of a hybrid finite element/discontinuous Galerkin space-time discretization. We present extensive nu-merical experiments that show the effectiveness of space-time adaptive discretizations and demon-strate the feasibility of the approach, even for(3 + 1)-dimensional problems.

(26)
(27)

2 Computational Modeling in

Electrophysiology

In this chapter we introduce the governing equations used to simulate the activation sequence of the human heart. The focus of our presentation will be on the mathematical aspects. For more details on the physiological background we refer the reader to the books by Keener and Sneyd96,97 on which the following introduction is largely based.

We start by discussing models for the ionic current through cell membranes by looking at single cells. In particular, we introduce the membrane model developed by Bernus et al.27 which we use

in most of our numerical studies. We then introduce the bidomain and monodomain equations for modeling cardiac tissue and discuss numerical methods for the solution of these equations. Finally, we motivate the use of adaptive techniques for this problem class and review the existing literature.

2.1

Modeling Electrical Properties of Cardiac Cells

Cells maintain an ion concentration difference between the interior and exterior of the cell by means of active pumps (such as the Na+-K+ATPase pumps96). In consequence, a difference between the intra-cellular potentialϕi and the extra-cellular potentialϕe exists. By convention the membrane

voltage V equals ϕi− ϕeand is usually measured in mV.

The cell membrane can be considered an insulator with capacitance Cm, i.e.,

Cm·V = ∆Q (2.1)

where ∆ Q denotes the charge difference between the intra- and extra-cellular domain. For our purposes Cm = 1 µF/cm2. In the cell membrane of excitable cells, millions of ion channels are

embedded which actively transport ions through the cell membrane upon activation. This creates a current

Iion= −

d∆ Q

dt . (2.2)

Since the activity of ion channels is steered by the membrane potential V , the ionic current Iion

depends on the membrane potential. Combining equations (2.1) and (2.2) we find that the capacitive and ionic current balance each other, i.e.,

Cm

dV

dt + Iion(V ) = 0 . (2.3)

(28)

6 2.1 Modeling Electrical Properties of Cardiac Cells

From a modeling point of view, the challenge is to derive an analytic expression for the dependence of Iionon the membrane voltage and potentially other variables that model the state of ion channels

or time-dependent ionic concentrations. The current generated by the transport of ions of type S is often expressed as

IS= gS(V −VS)

with the conductance gSand the constant Nernst potential VS. Note that for a given ion type S, both

inward and outward currents might contribute to Iion. As gSdepends on the state of the ion channels

that pump ions in or out of the cell, the value of gSwill be time-dependent and be implicitly coupled

to the membrane voltage V .

2.1.1 Hodgkin-Huxley Type Models

In 1952 Hodgkin and Huxley78 proposed a model for Iion for giant squid axons. This work had

profound impact on many branches of physiology, earning them a Nobel prize in physiology or medicine in 1963. Despite its inadequacy for the modeling of cardiac cells we shortly discuss the model because of its profound impact on the development of membrane models. The Hodgkin-Huxley equations state that

Iion(V, n, m, h) = gKn4(V −VK) + gNam3h (V −VNa) + gL(V −VL) (2.4)

where the gating variables(n, m, h) obey linear differential equations with voltage-dependent steady states and relaxation times. More precisely, each gating variable u∈ {n,m,h} obeys the equation

u =u∞(V ) − u

τu(V ) . (2.5)

For constant membrane voltage V on the time interval(0,t), this equation is solved by

u(t) = u∞(V ) − u∞(V ) − u(0)e−t/τu(V ). (2.6)

Note that equation (2.5) can be reformulated as

• u = αu(V ) (1 − u) + βu(V ) u (2.7) with u∞(V ) = αu(V ) αu(V ) + βu(V ) and τu(V ) = 1 αu(V ) + βu(V ) .

The variablesαu(V ), βu(V ) can be interpreted as rates of the opening and closing of ion channel

gates.

The variable n controls the activation and deactivation of potassium channels. The activation and deactivation of sodium channels is controlled by m and h, respectively. Because the gating variables m and h have different kinetics (m being a fast variable and h a slow variable) the experimentally measured sodium conductance cannot be modeled with a single gating variable.

(29)

7 2.1 Modeling Electrical Properties of Cardiac Cells −60 −40 −20 0 20 40 V[mV] 0.0 0.2 0.4 0.6 0.8 1.0 n m h∞ −60 −40 −20 0 20 40 V[mV] 0 1 2 3 4 5 6 7 8 9 T im e [m s] τn τm τh 0 5 10 15 20 Time [ms] −80 −60 −40 −20 0 20 40 60 P o te n ti a l [m V ] V n m h 0 5 10 15 20 Time [ms] 0.0 0.2 0.4 0.6 0.8 1.0

Figure 2.1. Behavior of the Hodgkin-Huxley model. The upper plots show the dependency of the steady-state values and relaxation times on V . The lower plots show the solution of equation (2.3) with an initial voltage difference of +15 mV relative to the equilibrium value of -65 mV.

0 100 200 300 400 500 Time [ms] −100 −80 −60 −40 −20 0 20 40 60 P o te n ti a l [m V ] V m v f to X 0 100 200 300 400 500 Time [ms] 0.0 0.2 0.4 0.6 0.8 1.0

Figure 2.2. Solution of equation (2.3) with an initial voltage difference of +30.272 mV (relative to the equilibrium value of -90.272 mV) using the Bernus membrane model.

(30)

8 2.1 Modeling Electrical Properties of Cardiac Cells

In the upper plot in Figure 2.1 the voltage dependency of n∞, m∞, h∞andτn, τm,τh is shown.

The membrane voltage and gating variable values created by an initial clamped membrane voltage is shown in the lower part of Figure 2.1. Parameters for gK, VK, gNa, VNa, gLand VLwere taken from

Keener and Sneyd96.

Equation (2.4) itself is not appropriate for modeling the ionic current in cardiac cells. However, in many models for Iionthe conductance is expressed as a monomial in the state vector s∈ RSsimilar

to the Hodgkin-Huxley model.

2.1.2 Membrane Models for Human Ventricular Cells

A large number of membrane models with different complexities and different applicability are available in the literature42. A first generic model for mammalian ventricular cells was published by Beeler and Reuter15. A generalized version was published by Luo and Rudy106 which used more recent experimental information from guinea pigs. This membrane model is known as the phase-1 Luo-Rudy model. In 1994, Luo and Rudy107,108 published an improved version of their

membrane model which is known as the phase-2 Luo-Rudy model. Priebe and Beuckelmann129 adapted the phase-2 Luo-Rudy model using human data. In 2002, Bernus et al.27 developed a

reduced version of the Priebe-Beuckelmann model to lower the computational cost. We will discuss the Bernus membrane model in Section 2.1.4. A different model for human ventricular cells was proposed by ten Tusscher et al.151in 2004 with an update in 2006, see Ref. 150.

The Priebe-Beuckelmann membrane model features nine gating variables and four time de-pendent ion concentrations. The reduced Bernus model features five gating variables and no ion concentrations. The model by ten Tusscher et al. requires integration of thirteen gating variables and four time-dependent ion concentrations. Newer models might feature even more state variables. For example, Iyer et al.91 developed a membrane model, based on a Markov state approach, with a total of 65 state variables.

2.1.3 The Fitz-Hugh Nagumo Model

The Fitz-Hugh Nagumo model is a simplified model that is useful for testing new numerical meth-ods. The Fitz-Hugh Nagumo model contains a single slow gating variable w. Several different versions of the model can be found in the literature. During early testing of the techniques devel-oped in this thesis, we used the following version of the model:

Iion= V · (1 − (V /13)) · (1 − (V /100)) + 4.4w ,

w = 0.012 · (V/100 − w) .

2.1.4 The Bernus Model

In large parts of this work we will make use of the Bernus membrane model because it has moderate computational cost but is still able to produce realistic results127.

(31)

9 2.2 Modeling Electrical Properties of Cardiac Tissue

As stated earlier, the Bernus membrane model is a reduced version of the Priebe-Beuckelmann model developed with the goal of faster two- and three-dimensional simulations of reentrant ar-rhythmia27. The model contains five state variables

s= (m, v, f , to, X)

that regulate the fast Na+ current (variables m and v), the slow Ca2+current (variable f ), the tran-sient outward current (variable to) and the inward delayed rectifier K+ current (variable X ). The model features no time-dependent ionic concentrations. The ionic current equals

Iion= INa+ ICa+ Ito+ IK+ IK1+ INa,b+ ICa,b+ INaK+ INaCa

with the fast Na+inward current INa, the slow Ca2+inward current ICa, the transient outward current

Ito, the outward delayed rectifier K+ current IK, the inward rectifier K+ current IK1, the Ca2+ and

Na+background currents INa,band ICa,b, as well as the pump and exchange currents INaKand INaCa.

In Figure 2.2 the solution of equation (2.3) with initially clamped membrane voltage V = −60mV is shown. This plot illustrates the differences in length scale between the fast de-polarization and slow rede-polarization that is characteristic for cardiac myocytes.

2.2

Modeling Electrical Properties of Cardiac Tissue

The purpose of the electrical activation of the heart tissue is the initiation of a mechanical contraction in order to pump blood through the heart chambers. A coordinated contraction is a prerequisite for an efficient pumping functionality. The action potentials originate at the sinoatrial node from where they spread via cell-to-cell conduction98. The action potentials enter the ventricles through the atrioventricular node which is connected to the bundle of His, followed by the left and right bundle branches that end in a complicated network known as the Purkinje system. The conduction velocity in the Purkinje system is about eight times higher than the conduction velocity in the surrounding ventricular myocyte tissue that is excited through the connection to the Purkinje fibers. In order to accurately model the electrophysiology of the heart it is therefore important to study the propagation of the action potential through excitable tissue.

2.2.1 The Bidomain equation

The bidomain equation158is generally accepted as the governing equation for the electrical

prop-agation in cardiac tissue97. It is based on a two-phase representation of the cardiac tissue, i.e., intra-cellular and extra-cellular domain occupy the same space. Assuming Ohmic materials, con-servation of the total current (in absence of external currents) states

∇∇∇ · (Gi∇∇∇ϕi) + ∇∇∇ · (Ge∇∇∇ϕe) = 0 (2.8)

where Gi and Ge denote the conductivity tensors in the intra- and extra-cellular domain,

(32)

10 2.2 Modeling Electrical Properties of Cardiac Tissue

leaving the intra-cellular space up to a multiplicative factorχ, the surface-to-volume ratio. In the following we will always assumeχ = 1000 cm−1. Hence,

χ Cm∂tV + Iion(V )= ∇∇∇ · (Gi∇ϕ∇∇ i) = −∇∇∇ · (Ge∇∇∇ϕe) (2.9)

Inserting V = ϕi− ϕewe obtain the bidomain reaction-diffusion equation

χ Cm∂tϕi−Cm∂tϕe+ Iion(ϕi− ϕe)= ∇∇∇ · (Gi∇∇∇ϕi) ,

χ Cm∂tϕe−Cm∂tϕi− Iion(ϕi− ϕe)= ∇∇∇ · (Ge∇∇∇ϕe) .

(2.10)

This equation is known as the parabolic-parabolic formulation of the bidomain equation. An al-ternative formulation, known as the parabolic-elliptic formulation of the bidomain equation, is ob-tained as follows. By definition of V and equation (2.8) one finds that the extra-cellular potential and the membrane voltage are related by

∇∇∇ · (Gi∇∇∇V ) + ∇∇∇ · ((Gi+ Ge) ∇∇∇ϕe) = 0 . (2.11)

Similarly, by insertingϕi= V + ϕein equation (2.9) we find

χ Cm∂tV + Iion(V )= ∇∇∇ · (Gi∇∇∇ (V + ϕe)) . (2.12)

The coupled system constituted by equation (2.12) and equation (2.11) is known as the parabolic-elliptic formulation of the bidomain equation.

It is worth noting that a more rigorous derivation of the bidomain equation using mathematical homogenization techniques is possible, see, for example, Keener and Sneyd97.

2.2.2 The Monodomain equation

An important simplification of the bidomain equation is the monodomain equation

χ Cm∂tV + Iion(V )= ∇∇∇ · (Gmono∇∇∇V ) , (2.13) where (component-wise) Gmono= Gi· Ge Gi+ Ge .

Formally, equation (2.13) is obtained from (2.8) and (2.9) by assuming the intra- and extra-cellular conductivity tensors to be linear dependent. Even though this assumption is usually not valid, monodomain simulations can approximate bidomain simulations well for large-scale models, see Bordas et al.31, Potse et al.127. Note that it is possible to compute the extra-cellular (and therefore also the intra-cellular potential) by solving equation (2.11) with the membrane voltage V obtained as the solution of the monodomain equation.

2.2.3 Conductivity Tensors

The conductivity tensors Gi, Geand Gmonoare usually expressed as

G= Glal⊗ al+ Gtat⊗ at+ Gnan⊗ an

in units of mS/cm. The local orthonormal basis (al(x), at(x), an(x)) describes the orientation of the

(33)

11 2.2 Modeling Electrical Properties of Cardiac Tissue

2.2.4 Summary of Governing Equations

For the purpose of future referencing we now list the strong forms of the governing equations considered in this thesis. LetΩ ⊂ Rdbe a bounded domain and(0, T ) the time interval of interest. By Iapp:Ω × (0,T ) → R we denoted the applied current. By s and Z we denote the vector of state

variables of our membrane model and the right-hand sides of the governing ordinary differential equations for the state variables, respectively.

Bidomain equation (parabolic-parabolic). Find(ϕi, ϕe) ∈ C1 (0, T ), C2(Ω )

2 such that Cm∂tϕi−Cm∂tϕe= 1 χ∇∇∇ · (Gi∇∇∇ϕi) − Iion(ϕi− ϕe, s) + Iapp Cm∂tϕe−Cm∂tϕi= 1 χ∇∇∇ · (Ge∇∇∇ϕe) + Iion(ϕi− ϕe, s) − Iapp in Ω × (0,T ) , ∂ts= Z(ϕi− ϕe, s) in Ω × (0,T ) , n· Gi∇∇∇ϕi= 0 on ∂ Ω × (0,T ) , n· Ge∇∇∇ϕe= 0 on ∂ Ω× (0,T ) . (2.14)

Bidomain equation (parabolic-elliptic). Find(V, ϕe) ∈ C1 (0, T ), C2(Ω )×C0 (0, T ), C2(Ω )such

that Cm∂tV = 1 χ∇∇∇ · (Gi∇∇∇ (V + ϕe)) − Iion(V, s) + Iapp ∇∇∇ · (Gi∇∇∇V ) + ∇∇∇ · ((Gi+ Ge) ∇∇∇ϕe) = 0 in Ω × (0,T ) , ∂ts= Z(V, s) in Ω × (0,T ) , n· Gi∇∇∇ (V + ϕe) = 0 on ∂ Ω× (0,T ) , n· Gi∇∇∇V + n · (Gi+ Ge) ∇∇∇ϕe= 0 on ∂ Ω× (0,T ) . (2.15)

Monodomain equation. Find V ∈ C1 (0, T ), C2(Ω )such that

Cm∂tV = 1

χ∇∇∇ · (Gmono∇∇∇V ) − Iion(V, s) + Iapp in Ω × (0,T ) , ∂ts= Z(V, s) in Ω × (0,T ) ,

n· Gmono∇∇∇V = 0 on ∂ Ω × (0,T ) .

(2.16)

Note that no boundary conditions for s are enforced as the equations for s are spatially decoupled. These equations are further augmented with appropriate initial conditions. In this work we usually use constant initial conditions with V(0) equal to the rest potential and ϕe = 0. Note that,

depending on the simulation, different boundary conditions are used in the literature120.

The bidomain equation is a degenerate reaction-diffusion equation since the potentials ϕi, ϕe

are only well defined up to constants, i.e., the equations are invariant under the transformation ϕi(x,t) ← ϕi(x,t) − β (t) ,

(34)

12 2.3 Numerical Methods

forβ ∈ C1((0, T ), R). A common approach to deal with the degenerate nature of the equations is to search for solutions with zero mean, i.e.,

Z Ω ϕi(x,t) dx = Z Ω ϕe(x,t) dx = 0 for all t∈ (0,T ) .

2.3

Numerical Methods

In this section we review popular numerical schemes for the solution of the mono- and bidomain equations.

2.3.1 Spatial Discretization

In the literature, finite difference, finite volume and finite element methods have been used to dis-cretize the bidomain or monodomain equations162. For realistic whole-heart simulations, an im-portant requirement for the spatial discretization is the ability to cope with discontinuities in the conductivity values that result from the differences in tissue type.

Saleheen and Ng138 proposed a finite difference method particularly for dealing with jumps in the conductivity tensors Gi, Ge or Gmono. A realistic heart model using this discretization has

been developed by Potse et al.127. Finite volume discretizations have been used, for example, by Harrild and Henriquez73. The most popular discretization scheme for the bidomain and mono-domain equations, however, is the finite element method which is used in several computational models28,46,113,156. Finite elements (and, to some extend, finite volume) methods have the advan-tage of a flexible handling of unstructured meshes for complicated domains and can naturally cope with discontinuous conductivity values as long as the jumps are aligned with element faces. An important advantage of finite difference discretizations is that they naturally lead to uncoupled or-dinary differential equations for the membrane state variables. In standard finite element methods, in contrast, the state variables are coupled via the non-vanishing off-diagonal entries in the mass matrix.

With the exception of Chapter 3, where we discuss the parallelization of the finite differences-based PROPAGmodel, the work presented in this thesis is focused on finite element discretizations. In the following, we shortly review the weak formulation of the bidomain and monodomain equa-tions and the resulting coupled ordinary differential equaequa-tions when using the method of lines.

The weak formulation of equations (2.14)–(2.16) is obtained by testing the equations with func-tions U ∈ H1(Ω ). By applying integration by parts to the diffusion terms, the regularity

require-ments for the solution can be reduced to the existence of a first weak derivative. Note that, by definition of the free Neumann boundary conditions in equations (2.14)–(2.16), the boundary inte-grals that results from applying the divergence theorem vanish. We consider the symmetric Galerkin approximation of the resulting equations using a conforming approximation spaceY⊂ H1(Ω ) with basisπππ = {πα}. In equations (2.17)–(2.19) below we state the weak formulation of the bidomain equation in parabolic-parabolic and parabolic-elliptic form, as well as the weak formulation of the monodomain equation.

(35)

13 2.3 Numerical Methods

Bidomain equation (parabolic-parabolic). Find(ϕi, ϕe) ∈ C1((0, T ), Y/R)2such that

(Cm∂tϕi−Cm∂tϕe,U)L2()= − 1

χ(Gi∇∇∇ϕi, ∇∇∇U)L2(Ω)− Iion(ϕi− ϕe, s) − Iapp,U 

L2() , (Cm∂tϕe−Cm∂tϕi,U)L2()= −

1

χ(Ge∇∇∇ϕe, ∇∇∇U)L2(Ω)+ Iion(ϕi− ϕe, s) − Iapp,U 

L2() , (∂ts,U)L2()= (Z(ϕi− ϕe, s),U)L2() ,

(2.17)

for all U∈ Y.

Bidomain equation (parabolic-elliptic). Find(V, ϕe) ∈ C1((0, T ), Y) ×C0((0, T ), Y/R) such that

(Cm∂tV,U)L2()= − 1

χ(Gi∇∇∇ (V + ϕe) , ∇∇∇U)L2(Ω)− Iion(V, s) − Iapp,U  L2() , ((Gi+ Ge) ∇∇∇ϕe, ∇∇∇U)L2()= −(Gi∇∇∇V, ∇∇∇U)L2() , (∂ts,U)L2()= (Z(V, s),U)L2() , (2.18) for all U∈ Y.

Monodomain equation. Find V ∈ C1((0, T ), Y)2such that (Cm∂tV,U)L2()= −

1

χ(Gmono∇∇∇V, ∇∇∇U)L2(Ω)− Iion(V, s) − Iapp,U 

L2() , (∂ts,U)L2()= (Z(V, s),U)L2() ,

(2.19)

for all U∈ Y.

The quotient spaceY/R ⊂ H1(Ω )/R is canonically isomorphic to the space of functions in Y

with zero mean value.

As indicated above, the weak formulation of the bidomain and monodomain equations has two major drawbacks compared to the strong form. First, the evaluation of the non-linear term using summed quadrature

(Iion(V, s),U)L2()≈ X

i

wi· Iion(V (xi), s(xi))U(xi)

requires the evaluation of Iionat multiple quadrature points per element, which is potentially costly.

Second, since Z is a non-linear function, the term(Z(V, s),U)L2()cannot be expressed as a product of a mass matrix times a vector in such a way that the ordinary differential equations decouple after canceling the mass matrices on both sides of the equation.

(36)

14 2.3 Numerical Methods

A commonly used approximation (see, for example, Colli Franzone and Pavarino46) that ad-dresses these two issues replaces the non-linear functions by appropriate approximations. More precisely, we replace Iion(PαVαπα,Pαsαπα) −→ X α Iion(Vα, sα)πα , Z(PαVαπα,Pαsαπα) −→ X α Z(Vα, sα)πα . (2.20)

Ifπππ is a nodal basis, the replacement functions are the nodal interpolations of the original functions. Inserting equation (2.20) into equations (2.17)–(2.19) we find that the non-linear terms require only dim(Y) evaluations of the functions Iion and Z, respectively. Similarly, the ordinary differential

equations governing the state variables s decouple naturally.

With this approximation, and using the notations M, Ai, Ae and Amonofor the mass matrix, the

discretized intra-cellular, extra-cellular and monodomain diffusion operator, respectively, we obtain the following equations in matrix-form.

Bidomain equation (parabolic-parabolic). Solve

Cm " M −M −M M # " • ϕi • ϕe # = −χ1 " Ai 0 0 Ae # " ϕi ϕe # − " M −M −M M # " Iion− Iapp 0 # (2.21)

coupled to a decoupled system of ordinary differential equationss•α= Z ((ϕi)α− (ϕe)α, sα)

(one for each basis function ofY).

Bidomain equation (parabolic-elliptic). Solve

CmM • V = −1 χ Ai(V + ϕe) − M Iion− Iapp  , (Ai+ Ae) ϕe= −AiV (2.22)

coupled to ordinary differential equationss•α= Z (Vα, sα).

Monodomain equation. Solve

CmM

V = −χ1AmonoV − M Iion− Iapp (2.23)

coupled to ordinary differential equationss•α= Z (Vα, sα).

Note that in equation (2.21) we padded the current vector on the right-hand side by 0 such that the mass matrices on the left and right side of the equation coincide. Using this trick only a single mass matrix needs to be assembled. The same idea is applied in the subsequent section in equations (2.28)– (2.31).

(37)

15 2.3 Numerical Methods

2.3.2 Temporal Discretization

In this section we discuss time discretization schemes that will be used in the later chapters. We present the discretization schemes within a finite element setting using the notation from the pre-vious section. However, the same methods can be easily applied in the context of, e.g., a finite difference spatial discretization by replacing the mass matrix with the identity matrix.

The bidomain and monodomain equation can be solved using explicit, semi-implicit or implicit time discretization schemes. In general, low-order (first- or second-order) integration schemes appear to be the most popular choice in the literature. An exception is the use of higher-order Rosenbrock-type methods by Colli Franzone et al.47. Ethier and Bourgault60 analyzed different time integration schemes for the bidomain equation (in parabolic-elliptic form) and found higher-order implicit-explicit methods to be the best choice when considering stability and accuracy crite-ria.

In this thesis we concentrate on first-order integration schemes based on explicit or implicit Euler schemes. Most of our results in Chapter 4 and Chapter 5 can be directly generalized to higher-order time discretization schemes.

An explicit Euler discretization for the bidomain equation in parabolic-elliptic form or the monodomain equation has been used, e.g., by Vigmond et al.161 or Potse et al.127. The advan-tage of such a time discretization is its implementational simplicity and the possibility to achieve an overlap of communication and computation in parallel implementations100,114. However, due to the parabolic nature of the bidomain and monodomain equations, explicit discretization schemes are bound to the stability constraint

τ . δ2,

whereτ denotes the time step size and δ the minimal mesh width of the spatial discretization. This restriction renders explicit schemes inapplicable for studies relying on very high spatial resolution. Explicit (and semi-implicit) low-order schemes are usually only applied for equations with de-coupled state variable equations obtained by applying the “variational crime” (2.20). In this setting, the time discretization scheme is often combined with a first-order splitting between the parabolic-elliptic or parabolic equation and the governing equations for the state variables. Such a splitting allows for a flexible choice of the explicit integration scheme for the latter. In particular, the explicit Euler update for the gating variables can be replaced by a better alternative. One such option, that will be used throughout this thesis, is to employ Rush-Larsen integration135 for gating variables. This integration scheme exploits the special form of the Hodgkin-Huxley equations to compute the updated gating variable by following the solution trajectory with a fixed membrane voltage. The Rush-Larsen update reads (cf. equation (2.6))

ui+1= u ∞(Vi) −  u∞(Vi) − ui  e−τ/τu(Vi). (2.24)

Note that one recovers an explicit Euler update of u by using a two-term expansion of the expo-nential. The Rush-Larsen update is therefore more expensive than an explicit Euler update but enjoys better stability and accuracy properties. For time-dependent ionic concentrations, explicit integration schemes such as Runge-Kutta methods can be applied.

(38)

16 2.3 Numerical Methods

Below we state the formulas for an explicit Euler update from time step i to step i+ 1. Note that explicit integration is usually combined with mass lumping such that M is replaced by a diagonal matrix.

Bidomain equation (parabolic-elliptic). Update

CmVi+1= CmVi−

τ

χM−1Ai 

Vi+ ϕei− τIioni − Iappi  (2.25) and subsequently solve

(Ai+ Ae) ϕei+1= −AiVi+1. (2.26)

Update sα as in equation (2.24).

Monodomain equation. Update

CmVi+1= CmVi− τ χM−1AmonoV i − τIioni − Iappi  . (2.27) Update sα as in equation (2.24).

In contrast to explicit methods, the stability constraint of an implicit time discretization is in-dependent of the spatial discretization. However, implicit models require the solution of high-dimensional, non-linear systems in each step. Fully implicit schemes have been used, for example, by Pavarino and Scacchi121 and Colli Franzone et al.47. Note that in Ref. 47, the employed time-integration scheme allows for replacing the non-linear solver by a single Newton step. In order to lower the computational cost of a fully implicit scheme, Munteanu and Pavarino116 proposed a decoupled scheme where only the membrane voltage is treated implicitly.

Below we state the formulas for an implicit Euler update from time step i to step i+ 1. To simplify the notation, we use matrix notation with the assumption that the non-linear terms have been approximated as specified in equation (2.20). This assumption, however, is made solely to simplify the notation.

Bidomain equation (parabolic-parabolic). Solve the non-linear system Fϕii+1, ϕei+1, si+1= bi with F(ϕi, ϕe, s) =       CmM −CmM 0 −CmM CmM 0 0 0 M   +τ χ    Ai 0 0 0 Ae 0 0 0 0          ϕi ϕe s    + τ    M −M 0 −M M 0 0 0 M       Iion(ϕi− ϕe, s) 0 −Z(ϕi− ϕe, s)    , bi=    M −M 0 −M M 0 0 0 M          Cmϕii Cmϕei si   + τ    Iappi+1 0 0       . (2.28)

(39)

17 2.3 Numerical Methods

Bidomain equation (parabolic-elliptic). Solve the non-linear system F Vi+1, ϕei+1, si+1= biwith

F(V, ϕe, s) =       CmM 0 0 0 0 0 0 0 M   +τ χ    Ai Ai 0 −Ai (Ai+ Ae) 0 0 0 0          V ϕe s    + τ    M 0 0 0 0 0 0 0 M       Iion(V, s) 0 −Z(V,s)    , bi=    M 0 0 0 0 0 0 0 M          CmVi 0 si   + τ    Ii+1 app 0 0       . (2.29)

Monodomain equation. Solve the non-linear system F Vi+1, si+1= biwith F(V, s) = " CmM 0 0 M # +τ χ " Amono 0 0 0 #! " V s # + τ " M 0 0 M # " Iion(V, s) −Z(V,s) # , bi= " M 0 0 M # " CmVi si # + τ " Ii+1 app 0 #! . (2.30)

Semi-implicit integration schemes strive for combining the advantages of explicit schemes (sim-plicity and low cost per time step) with the advantages of implicit schemes (stability). In the fol-lowing we will consider an implicit-explicit (IMEX) Euler scheme. For different semi-implicit dis-cretizations we refer to Ethier and Bourgault60. In the implicit-explicit Euler discretization we present, the stiff diffusion operator is treated implicitly, while the non-linear current is treated ex-plicitly. Moreover, the scheme is combined with a first-order splitting and Rush-Larsen integration for the gating variables. In case of the parabolic-elliptic formulation of the bidomain equation we also treat the extra-cellular potential explicitly in the parabolic equation. Therefore we need to solve two linear systems with block size one, instead of a single system with block size two.

Bidomain equation (parabolic-parabolic). Solve " CmM −CmM −CmM CmM # +τ χ " Ai 0 0 Ae #! " ϕii+1 ϕei+1 # = " M −M −M M # " Cmϕii Cmϕei # − τ " Ii ion− Iappi 0 #! (2.31) and update sα as in equation (2.24).

Bidomain equation (parabolic-elliptic). Solve  CmM+ τ χAi  Vi+1= C mMVi− τ χAiϕ i e− τM  Ii ion− Iappi  (2.32)

and subsequently solve

(Ai+ Ae) ϕei+1= −AiVi+1. (2.33)

(40)

18 2.4 Adaptive Computational Methods

Monodomain equation. Solve  CmM+ τ χAmono  Vi+1= CmMVi− τM  Iioni − Iappi . (2.34) Update sα as in equation (2.24).

Note that the diffusion current is scaled by the inverse surface-to-volume ratio χ−1 in

equa-tions (2.31)–(2.34). Due to the size ofχ and of the measured strength of the conductivity tensors in cardiac tissue, the mass-matrix terms are dominant for reasonable time step sizesτ. Therefore, the system matrices in equation (2.31), equation (2.32) and equation (2.34) are well conditioned and do not require complicated preconditioning techniques. Note, that this does not apply to equa-tion (2.33). For this reason solving the parabolic-parabolic equaequa-tion can be computaequa-tionally less expensive even though the system matrix is larger143.

2.4

Adaptive Computational Methods

In the previous section we have introduced numerical methods for the solution of the bidomain and monodomain equation. In this chapter we discuss the motivation for augmenting these techniques with adaptive control and review the current state of the research in this field.

2.4.1 Motivation

Adaptive solution techniques that adapt the computational mesh and/or the time step to the features of the solution are of interest for several reasons. They may allow for a more robust approximation of the considered phenomena, speed up the solution by reducing the required operations (e.g., by reducing the dimension of the ansatz/test spaces) or reduce the memory requirements, and hence allow for solving the same problem on smaller clusters of computers.

However, adaptive techniques incur an overhead due to the dynamic changes in the computa-tional meshes and the need to iteratively improve meshes from an initial guess. Moreover, the need to use more complicated (unstructured) meshes or different discretization techniques can increase the memory requirements per degree of freedom compared to a uniform simulation. Hence, adap-tive strategies can only be effecadap-tive if the reduction in the degrees of freedom is sufficiently high. This, in turn, can only be the case if the (analytical) solution of the problem at hand exhibits lo-calized features in space or time that need to be resolved by the numerical solution for an accurate approximation.

In Figure 2.3 we plot the solution of the monodomain equation at three different times. In this plot, each line corresponds to a level-set{V (x,t) = V0}. Hence, regions of steep up-/or down-stroke

are characterized by a high density of contour lines. From the visualization it is apparent that V features a high gradient in a relatively localized region (around the so-called depolarization front) but is smooth in the rest of the domain. Due to the (anisotropic) diffusion, the depolarization front moves through the domain. This “wave-like” shape of the solution motivates research into

(41)

19 2.4 Adaptive Computational Methods

t= 2 ms

t= 6 ms

t= 12 ms

Figure 2.3.Contour plot of the solution of the monodomain equation in a two-dimensional domain Ω = (0, 1)2at three different times. Lines represent the level-sets {V (x,t) = V

0} for V0= -90 mV,

-80 mV, . . . , 30 mV, 40 mV.

spatial-adaptivity for the solution of the monodomain (and bidomain) equation. We will address this challenge in Chapter 4 and Chapter 5. Concerning temporal adaptivity, we already noted in Section 2.1.4 that the solutions of equation (2.3) exhibit fast changes during depolarization phase, followed by slow changes during the plateau and repolarization phase. Hence, adaptive time integration of (2.3) can be very effective since a much larger time step sizeτ can be used during the repolarization compared to the depolarization phase. However, when using a reaction-diffusion model with a spatial component, the depolarization front propagates through the domain such that global time step control is ineffective166. In Chapter 6 we address this problem by studying local time step control mechanisms.

2.4.2 Background

Over the past decades a vast number of adaptive discretization techniques have been developed so that an exhaustive discussion of the literature on this topic seems impossible. Instead, in the fol-lowing we discuss several prominent methods that show different point of views on the problem of constructing adaptive methods and stand exemplarily for a subset of the research literature on adaptivity.

(42)

20 2.4 Adaptive Computational Methods

Block-structured adaptive mesh refinement (AMR) based on nested uniform meshes was first introduced by Brandt33 in 1977. Berger and Oliger22 and Berger and Colella21 describe a prac-tical algorithm for the solution of hyperbolic partial differential equations using block-structured adaptive meshes. The construction of finer meshes is based on the clustering of tagged elements into patches that are aligned with the elements of the coarser mesh. A finite volume discretization allows for an easy handling of the interface between coarse and fine meshes due to the flux-based formulation of the discrete equations. An estimate of the local truncation error, obtained by com-paring the solutions on the fine and coarse mesh, is used to guide the adaptive refinement. Since 1989 block-structured adaptive mesh have been used in many publications (see Diachin et al.56 and the references therein).

The parallelization and implementation of the Berger-Oliger-Collela method in high-quality software libraries has been discussed by several groups, see Refs. 45,81,131,169. Block-structured AMR algorithms have been shown to perform well on contemporary architectures and to be weakly scalable159,169.

Due to the underlying assumption of a Cartesian grid, the handling of complicated geometries is not straightforward but possible, for example, by using an embedded boundary approach142.

A related technique that also falls under the umbrella of structured adaptive mesh refinement techniques is tree-based AMR139,157. In contrast to the overlapping patch-based mesh handling, tree-based adaptive methods use binary space partitioning (BSP) trees to construct an adaptive mesh. Usually, quadtrees (in two dimensions) or octrees (in three dimensions) are used to organize the mesh. Tree-based AMR methods are mostly employed in the context of finite volume, discontinuous Galerkin or finite element methods with a one-to-one correspondence between tree leaves and mesh elements. Most publications use balanced trees that restrict the differences in levels of neighboring leaves to one, such that the differences in mesh width is at most a factor two.

Similar to block-structured AMR techniques, tree-based AMR methods cannot be directly ap-plied to complicated geometries unless a suitable parametrization of the geometry over the unit cube is known. To address this problem, Burstedde et al.35,36,38 developed algorithms for the

man-agement of forests of octrees built on conforming coarse tessellations of the computational domain via hexahedra. Recently this approach was implemented in the general purpose finite element code deal.II13. Tree-based structured AMR has been shown to scale well up to peta-scale class super-computers37,139.

Unstructured AMR algorithms take a different approach centered around the construction of conforming locally refined meshes and (usually nested) multi-level ansatz spaces. These methods often employ tetrahedral meshes and finite volume or finite element discretizations. Mesh refine-ment is steered by a posteriori error estimators, such as residual-based59or hierarchical101 estima-tors. To obtain conforming finite elements in the presence of local refinement, special refinement rules are used to split neighbors of marked elements (closures). The finite element spaces built on refined meshes are naturally nested and can be used to implement multi-level solution methods.

Figure

Figure 2.1. Behavior of the Hodgkin-Huxley model. The upper plots show the dependency of the steady-state values and relaxation times on V
Figure 2.3. Contour plot of the solution of the monodomain equation in a two-dimensional domain Ω = (0, 1) 2 at three different times
Figure 3.4. Improvement through hybrid execution for explicit (left) and implicit-explicit Euler (right) relative to pure MPI for different problem sizes on the Cray XT5.
Figure 3.6. Quality of the “best-effort” bootstrapping in P ROPAG -5 when using one (top) and twelve (bottom) threads per process on the Cray XT5.
+7

Références

Documents relatifs

MOTS-CLÉS : methode iterative de type point fixe, dérivatif, convergence, bloc de Jordan KEYWORDS : fixed point iteration, derivative, convergence, Jordan block.. Novembre 2005,

Numeric approximations to the solutions of asymptotically stable homogeneous systems by Euler method, with a step of discretization scaled by the state norm, are investigated (for

Implicit Euler Time-Discretization of a Class of La- grangian Systems with Set-Valued Robust Controller... Lagrangian systems, set-valued systems, convergence in finite steps,

Assuming that space and time can only have discrete values, it is shown that the modified law of gravitational attraction implies that the third principle of dynamics is not

The function that describes the Compton wavelength intersects the line identifying the radius of the black hole at a precise point; but, as explained above, in the area below the ray

The convergence of this scheme has been proved first in the case of a convex set of constraints with a trivial mass matrix in Paoli (1993), then an extension to non-convex

Problem 7 was solved using TSMu with different polynomial degrees p of the temporal macrobasis, starting from the pre- vious quadratic basis p = 2 and increasing the degree p

The second element of the micro-macro strategy is the use of the so-called LATIN method, a non- incremental iterative computational strategy applied on the entire time interval