1 Introduction

Cardiac electromechanics refers to a model for the description of the coupling of the electrophysiology model, which describes the propagation of the signal triggering the heart contraction, and the mechanical model, which describes the contraction and relaxation of the muscle tissue, including the sub-cellular activation-contraction mechanism. Solving such a coupled problem is crucial to investigate how clinically relevant processes affect different features of the heart beat [70].

Cardiac electromechanics is a challenging problem from both a mathematical and a numerical viewpoint, because of the coupling of different physical problems which take place at different spatial and temporal scales. Indeed, a model for the cardiac electrophysiology has to describe on one hand the sub cellular activity (1–100 μm) which gives rise to the cellular depolarization, on the other hand the spreading of the electrical signal through the whole myocardium (1–10 cm). The modeling of these processes yields a two-way coupled problem involving a PDE with a nonlinear reaction term and a system of nonlinear ODEs. To correctly track the propagation of the action potential, in the form of wave-front solutions, fine computational grids are needed, thus yielding large-scale algebraic problems to be solved. Moreover, the description of the mechanics of the cardiac tissue requires complex constitutive laws, characterized by an exponential strain energy function and the presence of muscular fibers and sheets, resulting in a complex highly nonlinear model. This turns into the need of assembling involved Jacobian matrices when relying, e.g., on the Newton method for the solution of nonlinear systems of equations. Furthermore, the heart muscle contracts after being electrically activated without the need of an external load, and this active behavior of the cardiac cells has to be properly taken into account when coupling the electrical and the mechanical models. To describe these processes different works have proposed more and more accurate electromechanical models [29, 31, 36, 53, 74, 80], very often yielding overwhelming computational costs.

Computational complexity is even more exacerbated if one is interested in going beyond a single, direct simulation. Indeed, when simulating cardiovascular problems, several input data affect the problem under investigation, often varying within a broad range and possibly affected by uncertainty. Addressing the impact of input variations on outputs of clinical interest is thus of paramount importance in order to (1) obtain reliable results, (2) calibrate the numerical solver and/or (3) personalize the mathematical model. In fact, model parameters have to be specifically tuned to fit subject-specific clinical data in order to take into account inter-patient variability. To correctly calibrate cardiac models and estimate the unknown input parameters, such as muscular fibers orientation or parameters affecting the signal propagation, several numerical simulations have to be carried out, thus calling for multiple queries of the parameter-to-solution map in fast and accurate ways. Beyond parameter estimation, this requirement also arises when dealing with sensitivity analysis, control and optimization, and uncertainty quantification, noteworthy classes of problems whose importance in cardiovascular modeling is growing faster and faster.

The need of solving these problems efficiently calls for the development of efficient and accurate reduced order modeling (ROM) techniques in electromechanics. These techniques are designed to provide accurate and reliable solutions to PDEs depending on several parameters at a greatly reduced computational cost. In particular, the reduced basis (RB) method replaces the original large-scale numerical problem (or high-fidelity approximation) originated by applying, e.g., a finite element (FE) method, with a reduced problem of substantially smaller dimension; this latter is generated through a projection of the high-fidelity problem upon a low-dimensional subspace, spanned by a set of high-fidelity solutions corresponding to suitably chosen parameters [41, 68].

In this work we show how to solve both the electrophysiology and the mechanical problems, when these depend on a set of parameters, in the framework of RB methods, also taking into account active mechanics triggered by the cellular depolarization. Because of the nonlinear nature of these problems, computational efficiency is obtained by combining a general-purpose technique to generate the low-dimensional subspace, such as proper orthogonal decomposition, and suitable hyper-reduction techniques allowing to assemble the algebraic structures required by the ROM independently of the high-fidelity arrays. This is required, e.g., when dealing with Newton iterations while solving cardiac mechanics—for which the global Jacobian matrix would have to be entirely reassembled at each Newton step—as well as time stepping in cardiac electrophysiology, for which nonlinear terms have to be evaluated at each time step, also involving the contribution from the cell model. Among recent applications of ROM techniques to problems related with the cardiovascular system, we also mention haemodynamics, for the sake of simulating blood dynamics in different flow conditions [25, 26, 54] or geometrical configurations [7, 8], also in view of the optimal design of prosthetic devices [47, 50] or parameter identification [48, 70]. Cardiac electrophysiology has also been tackled in the last decade [15, 20, 30, 35, 88], however by performing reduction only with respect to the time independent variable, thus avoiding the main difficulties related with the efficient handling of parameter-dependent problems. Recent results for parametrized problems in cardiac electrophysiology, also in view of the efficient solution of uncertainty quantification problems, can be found in [59]. Instead, regarding cardiac mechanics, this subject has only been addressed in a recent paper by the authors [14] and in [13], where also first results about one-way and two-ways coupled electromechanical problems have been obtained. The reduction of coupled problems, however, is still matter of investigation and therefore are not included in this paper.

The structure of this paper is as follows. After a brief recall (Sect. 2) on the mathematical modeling of cardiac electromechanics, we describe the high-fidelity FE approximation we start from (Sect. 3). We then introduce the key tools of the proposed ROM technique (Sect. 4): the Galerkin-POD method and suitable hyper-reduction strategies. Then, we show how to combine them to derive a ROM for both cardiac electrophysiology (Sect. 5) and mechanics (Sect. 6), independently. Numerical results dealing with patient-specific left ventricle configurations in the systolic phase are then shown (Sect. 7), and finally open critical issues and future perspectives are outlined (Sect. 8).

2 Mathematical Models

In this section we present an overview of the electromechanics mathematical models. We consider the minimal Bueno-Orovio model for describing the cellular behavior, the monodomain model for cardiac electrophysiology, and the hyperelastic Holzapfel-Ogden model for the passive ventricular mechanics, adopting an active-strain formulation to take into account active mechanics. This latter requires a dynamical system for the variable which describes fiber shortening as a function of calcium concentration (and then electrical activation).

2.1 Cardiac Electrophysiology

A mathematical model for cardiac electrophysiology has to include processes arising at different scale, ranging from subcellular activity, which originates the cellular depolarisation to the spreading of the signal in the whole myocardium. To model the whole heart, several works have considered continuous models, where the myocardium is approximated as a syncytium, that is a domain where the intra and extracellular spaces coexist at each point [31, 44, 61, 76]. These continuous models describe the spreading of the signal in the heart tissue and are usually coupled to a ionic model which describes the evolution of ion concentrations and ionic currents inside the cells. In this section we first introduce a general framework for the ionic models, focusing on the Bueno-Orovio model [17], and we show how to couple it to the bidomain and monodomain models, widely adopted continuous tissue models.

2.1.1 Cell Models

Cell models describe the evolution of the transmembrane potential across the cell membrane of a single cardiomyocyte. Several ionic models have been proposed, most of which are based on the well-studied Hodgkin-Huxley model [42]; see e.g. [58] for a review. They are all based on the assumption that the electrical properties of the cell membrane can be modeled as an electrical circuit, which connects in parallel a resistor and a capacitance: the latter describes the cell membrane which separates the intra and the extra cellular space, while the former models the ionic channels and pumps regulating ionic fluxes through the membrane. The conservation of currents across the cell membrane can be expressed through the relation

$$\displaystyle \begin{aligned} C_m \frac{\partial v}{\partial t}+ I_{ion}(v,\mathbf{w},\mathbf{c}) = I_{app}, \end{aligned}$$

where v is the transmembrane potential, C m the membrane capacitance, I app an external applied current density and I ion the sum of the current densities through the membrane, that can be written using the general Hodgkin-Huxley formalism introduced in [42] as

$$\displaystyle \begin{aligned} I_{ion}(v,\mathbf{w},\mathbf{c}) = \sum_{k=1}^p {g_k(\mathbf{c})} \prod_{j=1}^q {w_j^{p_{jk}} (v-v_k(\mathbf{c}))} + I_0(v,\mathbf{w},\mathbf{c}).\end{aligned} $$
(1)

Here w is a vector of gating variables taking values in [0, 1] that represent the portion of open channels on the membrane, whereas c is a vector describing the concentration of ionic species within the cell. We denote by g k(c) and v k(c) the conductance and the Nernst equilibrium potential associated to the k-th ion, and by p jk the number of sub-units composing each ionic channel, so that the ion k can flow through a ionic channel if all the sub-units forming the channel are opened. Thus, \(\prod _{j=1}^q {w_j^{p_{jk}}}\) represents the probability that the ions k flow through the cellular membrane. The term I 0(v, w, c) represents possible time independent ionic fluxes. The dynamic of a single cell can thus be described in general by a ionic model under the form:

$$\displaystyle \begin{aligned} \begin{cases} \displaystyle{C_m \frac{\partial v}{\partial t}+ I_{ion}(v,\mathbf{w},\mathbf{c}) = I_{app}} \quad &\text{in } \varOmega_0 \times (0,T),\\ \displaystyle{\frac{\partial \mathbf{w}}{\partial t} = \mathbf{s}(v,\mathbf{w})} \quad &\text{in } \varOmega_0 \times (0,T),\\ \displaystyle{\frac{\partial \mathbf{c}}{\partial t} = \mathbf{r}(v,\mathbf{w},\mathbf{c})} \quad &\text{in } \varOmega_0 \times (0,T),\\ \mathbf{w}(t_0)={\mathbf{w}}_0, \quad \mathbf{c}(t_0)={\mathbf{c}}_0 \quad &\text{in } \varOmega_0\vspace{-2pt} \end{cases} \end{aligned} $$
(2)

where we denote by Ω 0 the computational domain, here representing the cell. The first set of ODEs is related to the evolution of the gating variables while the second set characterizes the evolution of the ionic concentrations during the cardiac cycle. The number of equations, the functions s and r and the overall complexity depend on the considered model. In this work, we focus on the so-called minimal model introduced by Bueno-Orovio in [17], developed to reproduce physiological action potential morphologies, at moderate computational costs.

The minimal model is a four variables model, able to reproduce experimental measures characteristics of human ventricular transmembrane potential. It can be expressed as:

$$\displaystyle \begin{aligned} \begin{cases} \displaystyle{C_m \frac{\partial v}{\partial t} + I_{fi}(v,w_1) + I_{so}(v) + I_{si}(v,w_2,w_3) =I_{app}}, \quad &\text{in } \varOmega_0 \times (0,T) \\ \displaystyle{\frac{\partial w_1}{\partial t} + H(v- \theta_{w_1})\frac{w_1}{\tau^+_{w_1}} - [1-H(v-\theta_{w_1})] \frac{w_{1,\infty} - w_1}{\tau^-_{w_1}} =0}, \quad &\text{in } \varOmega_0 \times (0,T)\\ \displaystyle{\frac{\partial w_2}{\partial t} + H(v- \theta_{w_2})\frac{w_2}{\tau^+_{w_2}} - [1-H(v-\theta_{w_2})] \frac{w_{2,\infty} - w_2}{\tau^-_{w_2}} =0},\quad &\text{in } \varOmega_0 \times (0,T) \\ \displaystyle{\frac{\partial w_3}{\partial t} -\frac{[1+tanh(k_s(v-v_s))]/2-w_3}{\tau_{w_3}}=0}, \quad &\text{in } \varOmega_0 \times (0,T) \\ \end{cases} \end{aligned} $$
(3)

where the three currents I fi, I si and I so represent the fast inward, the overall slow outward and the slow inward currents, respectively. In particular, we have:

$$\displaystyle \begin{aligned} \begin{aligned} \displaystyle{I_{fi}}(v,w_1) &= \displaystyle{w_1 \frac{(v-\theta_{w_1}) (c_v-v)H(v-\theta_{w_1})}{\tau_{fi}}} , \\ \displaystyle{I_{s0}}(v) &= \displaystyle{\frac{(v-v_0)(1- H(v-\theta_{w_2}))}{\tau_{0}} + \frac{ H(v-\theta_{w_2})}{\tau_{so}} },\\ \displaystyle{I_{si}}(v,w_2,w_3) &= \displaystyle{w_2 w_3 \frac{H(v-\theta_w)}{\tau_{si}} }, \end{aligned} \end{aligned}$$

where H(⋅) is the Heaviside function. The model parameters, provided in [17], allow to reproduce the action potential morphologies and the dynamics of more complex models, such as the Ten Tusscher model or the O’Hara and Rudy model [72]. The evolution of the transmembrane potential v and the gating variables w 1, w 2 and w 3 obtained with the considered parameters are reported in Fig. 1. In particular, we observe that the variable v correctly reproduces the action potential shape characteristic of the ventricular cardiomyocytes. We notice that the variable v is dimensionless and it can be rescaled to dimensions of mV using the equations v mv = 87.5v − 84.

Fig. 1
figure 1

From top left to bottom right: transmembrane potential v and gating variables w 1, w 2 and w 3 of the minimal model during a heart beat

Fig. 2
figure 2

Schematical representation of the cardiac electromechanical model

Note that this model does not provide specific informations about intracellular calcium concentration. However, the variable w 3 can be assumed to be responsible of calcium dynamics, as it shows a phenomenological behavior which is really similar to the one of the calcium ions in the cardiac cells [72]. In what follows, we refer to w 3 as the calcium concentration c and denote by w = (w 1, w 2, c).

2.1.2 Tissue Models

To describe the propagation of the activation front in the cardiac muscle, we rely on a tissue model able to characterize the evolution of the transmembrane potential. This latter plays indeed a crucial role in the description of the heart contraction. In particular, the bidomain and the monodomain models have been widely used to study the cardiac electrophysiology (see e.g. [24, 66] and reference therein). These models arise from a homogenization process applied to the cardiac tissue and simulate the propagation of the electrical signal through the myocardium; a complete derivation of the two models can be found in [28].

The bidomain model, first proposed in [83], represents the cardiac tissue as a syncytium composed of intracellular and extracellular domains coexisting at every point of the tissue. Each domain is thus considered as a continuum, rather than a group of discrete cells connected with each other. Denoting by v e and v i the extracellular and the intracellular potential, respectively, and by v = v i − v e the transmembrane potential, the bidomain model can be expressed as:

$$\displaystyle \begin{aligned} \begin{cases} \displaystyle{C_m \frac{\partial v}{\partial t} + I_{ion}(v,\mathbf{w},\mathbf{c} ) - \nabla \cdot ({\mathbf{D}}_i \nabla v_i) =0 } \quad &\text{in } \varOmega_0 \times (0,T),\\ \displaystyle{C_m \frac{\partial v}{\partial t} + I_{ion}(v,\mathbf{w},\mathbf{c} ) + \nabla \cdot ({\mathbf{D}}_e \nabla v_e) = I_{app} } \quad &\text{in } \varOmega_0 \times (0,T),\\ \displaystyle{\frac{\partial \mathbf{w}}{\partial t} = \mathbf{s}(v,\mathbf{w})}, \quad \displaystyle{\frac{\partial \mathbf{c}}{\partial t} = \mathbf{r}(v,\mathbf{w},\mathbf{c})} \quad &\text{in } \varOmega_0 \times (0,T),\\ {\mathbf{D}}_{i} \nabla v_{i} \cdot \mathbf{n} =0, \quad {\mathbf{D}}_{e} \nabla v_{e} \cdot \mathbf{n} =0 \quad &\text{on } \partial \varOmega_0 \times (0,T),\\ v(t_0)=v_0, \quad \mathbf{w}(t_0)={\mathbf{w}}_0, \quad \mathbf{c}(t_0)={\mathbf{c}}_0 \quad &\text{in } \varOmega_0, \end{cases} \end{aligned} $$
(4)

where the Neumann boundary conditions express the condition that the cardiac tissue is electrically insulated. Here, C m is the membrane capacitance, I ion is the sum of the density currents through the membrane and I app is an external applied density current. The domain Ω 0 now represents a portion of myocardium; in the case of the left ventricle, its boundary ∂Ω 0 = Γ endo ∪ Γ epi ∪ Γ base is made by the endocardium, the epicardium and the base, respectively. The conductivity tensors \(D_i\in \mathbb {R}^3\) and \(D_e\in \mathbb {R}^3\) model the anisotropy of the cardiac tissue, characterized by a higher conductivity in the fiber direction, and can be expressed as:

$$\displaystyle \begin{aligned} {\mathbf{D}}_{i,e}=\sigma_f^{i,e} {\mathbf{f}}_0 \otimes {\mathbf{f}}_0 + \sigma_s^{i,e} {\mathbf{s}}_0 \otimes {\mathbf{s}}_0 + \sigma_n^{i,e} {\mathbf{n}}_0 \otimes {\mathbf{n}}_0, \end{aligned}$$

where \(\sigma _f^{i,e}\), \(\sigma _s^{i,e}\) and \(\sigma _n^{i,e}\) are the electrical conductivities in the intracellular and extracellular domains. Here, f 0 denotes the fibers direction, s 0 the sheets direction and n 0 is orthogonal to both f 0 and s 0.

The bidomain model is currently the most complete mathematical model for describing the electrical signal propagation in the heart. However, it is computationally demanding, since to capture the rapid dynamics of the cellular reactions high resolutions in space and time is required. For this reason, a common approach in the literature is to reduce the bidomain equations to simpler tissue models. In particular, the monodomain model can be obtained by assuming that the intra and extracellular domains have equal anisotropy ratios, \({\sigma _f^{i}}/{\sigma _f^{e}}= {\sigma _s^{i}}/{\sigma _s^{e}}= {\sigma _n^{i}}/{\sigma _n^{e}}\). The monodomain model is not suitable for the description of pathological situations, such as, cardiac arrhythmias or fibrillation, since in these situations the extracellular domain influence the transmembrane potential and the ionic currents. However, it provides an accurate description of the cardiac tissue in physiological situations [27, 66], at reduced computational costs. From now on, we adopt the monodomain model as we are only interested, for the time being, to capture the relevant phenomena for describing the electromechanical coupling in healthy conditions.

The monodomain model reads as follows:

$$\displaystyle \begin{aligned} \begin{cases} \displaystyle{C_m \frac{\partial v}{\partial t} + I_{ion}(v,\mathbf{w},\mathbf{c} ) - \nabla \cdot (\mathbf{D} \nabla v) = I_{app} } \quad &\text{in } \varOmega_0 \times (0,T),\\ \displaystyle{\frac{\partial \mathbf{w}}{\partial t} = \mathbf{s}(v,\mathbf{w})}, \quad \displaystyle{\frac{\partial \mathbf{c}}{\partial t} = \mathbf{r}(v,\mathbf{w},\mathbf{c})} \quad &\text{in } \varOmega_0 \times (0,T),\\ \mathbf{D} \nabla v \cdot \mathbf{n} =0 \quad &\text{on } \partial \varOmega_0 \times (0,T),\\ v(t_0)=v_0, \quad \mathbf{w}(t_0)={\mathbf{w}}_0, \quad \mathbf{c}(t_0)={\mathbf{c}}_0 \quad &\text{in } \varOmega_0, \end{cases} \end{aligned} $$
(5)

where \(\mathbf {D}\in \mathbb {R}^3\) is the conductivity tensor. In particular, we assume that

$$\displaystyle \begin{aligned} \mathbf{D}=\sigma_f {\mathbf{f}}_0 \otimes {\mathbf{f}}_0 + \sigma_s {\mathbf{s}}_0 \otimes {\mathbf{s}}_0 + \sigma_n {\mathbf{n}}_0 \otimes {\mathbf{n}}_0 \end{aligned} $$
(6)

where we denote by σ f, σ s and σ n the electrical conductivities in the direction f 0, s 0 and n 0, respectively.

2.2 Cardiac Mechanics

The description of cardiac mechanics involves both a passive and an active contribution; besides the hyper-elastic behavior of the tissue, the active contraction of the muscular fibers has to be included in the force balance when modeling the systolic part of the cardiac cycle.

We consider a reference configuration Ω 0 and an actual configuration Ω at the current time t. We denote by X the position vector in Ω 0 and by x the position vector in Ω. We can now introduce the body deformation as the map φ : Ω 0 → Ω from the reference to the actual configuration, such that x = φ(X) for any X ∈ Ω 0, x ∈ Ω. The deformation gradient tensor F is defined as

$$\displaystyle \begin{aligned} \mathbf{F} = \frac{\partial \boldsymbol{\varphi}}{\partial \mathbf{X}}, \qquad [F_{ij}]=\frac{\partial \varphi_i}{\partial {\mathbf{X}}_j}, \quad i,j=1,2,3. \end{aligned} $$
(7)

By denoting u : Ω 0 → Ω, u(X) = φ(X) −X the displacement field, the deformation gradient tensor can be written as F = I + ∇u. We also denote by J = det(F) the determinant of F and by C = F T F the left Cauchy-Green strain tensor.

2.2.1 Passive Mechanics

We first provide a description of the passive ventricular mechanics, by recalling the hyperelastic model proposed by Holzapfel and Ogden in [43]. Cardiac deformations can be modeled by considering the myocardium as orthotropic, hyperelastic, and incompressible with passive properties characterized by means of an exponential strain energy function.

The equations of motion for the cardiac tissue express the balance of linear momentum in material coordinates, which reads as

$$\displaystyle \begin{aligned} \rho_0 \frac{d^2 \mathbf{u}}{dt^2} - \nabla_0 \cdot {\mathbf{P}}_p = {\mathbf{b}}_0, \end{aligned}$$

where ρ 0 is the tissue density and b 0 are the body forces. Here, P p is the first (passive) Piola(-Kirchhoff) tensor, which is related to the surface tractions t 0 through the relation t 0 = P p n, where n is the normal to the boundary of the reference domain. As usual in cardiac mechanics literature (see e.g. [29, 37, 72]), inertial forces can be neglected, since they are about two orders of magnitude smaller than other terms [86], thus obtaining the quasi-static problem

$$\displaystyle \begin{aligned} - \nabla_0 \cdot {\mathbf{P}}_p = {\mathbf{b}}_0. \end{aligned} $$
(8)

We impose Neumann boundary conditions on the endocardium (Γ N = Γ endo) to model the effect of blood pressure,Footnote 1 and Robin boundary conditions on the epicardium and on the base (Γ R = Γ epi ∪ Γ base); the boundaries are reported for a patient-specific left ventricle geometry in Fig. 4. We also neglect the body forces b 0 because their contribution is negligible [72]. In conclusion, the cardiac deformation u solves:

$$\displaystyle \begin{aligned} \begin{cases} - \nabla_0 \cdot {\mathbf{P}}_p(\mathbf{u})=\mathbf{0} &\text{ in } \varOmega\\ {\mathbf{P}}_p(\mathbf{u}) \mathbf{n} =\mathbf{g} &\text{ on } \varGamma_{endo} \\ {\mathbf{P}}_p(\mathbf{u}) \mathbf{n}+ \alpha \mathbf{u}=\mathbf{0} &\text{ on } \varGamma_{epi} \cup \varGamma_{base}. \end{cases} \end{aligned} $$
(9)

The myocardium is considered as an hyperelastic material: there exists a strain energy function \(\mathscr {W}: \varOmega _0 \rightarrow \mathbb {R}\) related to the Piola tensor through the relation

$$\displaystyle \begin{aligned} {\mathbf{P}}_p(\mathbf{u})=\frac{\partial \mathscr{W}(\mathbf{u})}{\partial \mathbf{F}}. \end{aligned} $$
(10)

The description of the cardiac muscle mechanics faces a number of difficulties. Indeed, the myocardium is non-homogeneous and it is composed by several layers; moreover, fibers have different orientation in each layer and rotate across the heart wall, featuring a complex mechanical characterization. To model this complex behavior we consider the orthotropic model proposed by Holzapfel and Ogden in [43], characterized by a simple invariant-based formulation. This model hinges upon the idea that for an orthotropic, incompressible material the strain energy density function can be written as

$$\displaystyle \begin{aligned} \mathscr{W} = \mathscr{W}_1(\mathscr{I}_1) + \mathscr{W}_{4,{\mathbf{f}}_0}(\mathscr{I}_{4,{\mathbf{f}}_0}) + \mathscr{W}_{4,{\mathbf{s}}_0}(\mathscr{I}_{4,{\mathbf{s}}_0}) + \mathscr{W}_{8,{\mathbf{f}}_0{\mathbf{s}}_0}(\mathscr{I}_{8,{\mathbf{f}}_0{\mathbf{s}}_0}), \end{aligned}$$

where f 0, s 0 are the two (fibers and sheets respectively) preferred directions and \(\mathscr {I}_1\), \(\mathscr {I}_{4,{\mathbf {f}}_0}\), \(\mathscr {I}_{4,{\mathbf {s}}_0}\), \(\mathscr {I}_{8,{\mathbf {f}}_0{\mathbf {s}}_0}\) are invariants of the right Cauchy-Green strain tensor,

$$\displaystyle \begin{aligned} \mathscr{I}_1= tr(\mathbf{C}), \quad \mathscr{I}_{4,{\mathbf{f}}_0} = {\mathbf{f}}_0 \cdot \mathbf{C}{\mathbf{f}}_0, \quad \mathscr{I}_{4,{\mathbf{s}}_0} = {\mathbf{s}}_0 \cdot \mathbf{C}{\mathbf{s}}_0, \quad \mathscr{I}_{8,{\mathbf{f}}_0{\mathbf{s}}_0}= {\mathbf{f}}_0 \cdot \mathbf{C}{\mathbf{s}}_0, \end{aligned}$$

respectively. In particular, we have

$$\displaystyle \begin{aligned} \mathscr{W}_1(\mathscr{I}_1) &= \frac{a}{2b}\Bigl[ e^{b(\mathscr{I}_1 - 3)} - 1 \Bigr], \qquad \qquad \mathscr{W}_{4,{\mathbf{f}}_0}(\mathscr{I}_{4,{\mathbf{f}}_0}) = \frac{a_f}{2 b_f}\Bigl[ e^{b_f(\mathscr{I}_{4,{\mathbf{f}}_0} - 1)^2} - 1 \Bigr], \\ \mathscr{W}_{4,{\mathbf{s}}_0}(\mathscr{I}_{4,{\mathbf{s}}_0}) &= \frac{a_s}{2b_s}\Bigl[ e^{b_s(\mathscr{I}_{4,{\mathbf{s}}_0} - 1)^2} - 1 \Bigr], \qquad \mathscr{W}_{8,{\mathbf{f}}_0{\mathbf{s}}_0}(\mathscr{I}_{8,{\mathbf{f}}_0{\mathbf{s}}_0}) = \frac{a_{fs}}{2b_{fs}}\Bigl[ e^{b_{fs}\mathscr{I}_{8,{\mathbf{f}}_0{\mathbf{s}}_0}^2} - 1 \Bigr]. \end{aligned} $$
(11)

The coefficients of the Holzapfel-Ogden constitutive law are taken from [33] and are reported in Table 1.

Table 1 Parameters of the Holzapfel-Ogden model

In order to describe myocardium deformations, we consider a quasi-incompressible formulation [39, 77], which offers several advantages with respect to a full incompressible one, from both a modeling and a numerical viewpoint. Indeed, taking into account limited volumetric changes is possible according to experimental evidence since the volume of cardiac tissue can vary until 7% during systolic contraction [6]. Moreover, a quasi-incompressible formulation leads to a simpler numerical problem with respect to a full incompressible one [65]. The adopted formulation can be obtained by introducing a multiplicative decomposition F = F iso F vol of the deformation gradient tensor, where we impose det(F iso) = 1 and det(F vol) = J. This formulation leads to an additive decomposition of the isotropic part \(\mathscr {W}_1\) of the strain energy function, which reads as

$$\displaystyle \begin{aligned} \mathscr{W}_1= \mathscr{W}_{1,iso} + \mathscr{W}_{vol} = \frac{a}{2b}\Bigl[ e^{b(J^{-\frac{2}{3}} \mathscr{I}_1 - 3)} - 1 \Bigr] + \frac{\kappa}{2}J{\mathbf{F}}^{-T}(J-J^{-1}) \end{aligned} $$
(12)

where κ > 0 denotes the Bulk modulus, which measures the material resistance to a uniform compression.

2.2.2 Active Mechanics

The cardiomyocytes of the heart muscle contract after being electrically activated, without the need of an external load. This behavior can be modeled by including the active contraction of the muscular fibers in the force balance (9); however, this is a challenging task because muscular contraction occurring at the macroscale is caused by release of energy at the microscale, inside each cardiomyocyte. Different approaches have been investigated in order to obtain accurate mathematical description of the active mechanics; the most popular ones are the active stress [37, 52, 53, 62, 78] and the active strain approaches; see [4, 73] for numerical comparisons. Both strategies allow to couple electrophysiology and mechanics, defining a modified first Piola-Kirchhoff tensor P which involves a passive component describing the stress required to obtain a given deformation of the passive myocardium, and an active component denoting the tension generated by the depolarization of the propagating electrical signal that provides the internal active forces responsible for the contraction. Thus, Eq. (9) becomes

$$\displaystyle \begin{aligned} \begin{cases} - \nabla_0 \cdot \mathbf{P}(\mathbf{u}(t);t,c)=\mathbf{0} \quad &\text{ in } \varOmega\\ \mathbf{P}(\mathbf{u}(t);t,c) \, \mathbf{n} =\mathbf{g} \quad &\text{ on } \varGamma_{endo} \\ \mathbf{P}(\mathbf{u}(t);t,c)\, \mathbf{n}+ \alpha \mathbf{u}(t) =\mathbf{0} \quad &\text{ on } \varGamma_{epi} \cup \varGamma_{base}.\\ \end{cases} \end{aligned} $$
(13)

This leads to a coupled electromechanical problem, where the electrical solution affects cardiac deformations. Here we focus on the active strain approach [3, 23, 51, 81], which is based on a multiplicative decomposition of the deformation gradient tensor, under the form

$$\displaystyle \begin{aligned} \mathbf{F}(\mathbf{u},t)={\mathbf{F}}_e(\mathbf{u}){\mathbf{F}}_a(t). \end{aligned}$$

F e describes the elastic deformation of the myocardium and F a(t) is the anelastic deformation due to the fibers contraction. The active strain decomposition is based on the idea that fibers inside the muscle contract and shorten; the deformation F a can thus be seen as a prescribed distortion of the microstructure, whereas the deformation at the macroscale F e is needed to ensure compatibility of F.

In particular, the anelastic deformation takes the form

$$\displaystyle \begin{aligned} {\mathbf{F}}_a(t)= I + \gamma_f(t) {\mathbf{f}}_0 \otimes {\mathbf{f}}_0 + \gamma_s(t) {\mathbf{s}}_0 \otimes {\mathbf{s}}_0 +\gamma_n(t) {\mathbf{n}}_0 \otimes {\mathbf{n}}_0, \end{aligned}$$

where n 0 is a vector normal to f 0 and s 0; γ f, γ s and γ n are time-dependent coefficients describing the cell shortening respectively in the f 0, s 0 and n 0 directions. The fibers shortening γ f can be computed from the following evolution law

$$\displaystyle \begin{aligned} \begin{cases} \displaystyle{\mu_A \dot{\gamma_f} = f_A(c) + \frac{2 \mathscr{I}_{4,f}}{(1+\gamma_f)^3} -2 \mathscr{I}_{4,f}|{}_{c=c_0}} \quad &\text{in } \varOmega_0 \times (0,T),\\ \gamma_f(0)=\gamma_{f,0} \quad &\text{in } \varOmega_0, \end{cases} \end{aligned} $$
(14)

where c(t) is the calcium concentration. We remark that the anelastic deformation F a depends on the calcium concentration through the coefficients γ f, γ s and γ n. Here, \(f_A(c(t)) = \alpha (c(t)-c_0)^2R_{FL} (\mathscr {I}_{4,f})\), where we assume α = −2.5 [72], and R FL is the sarcomere force-length relationship of the cardiac cells given by

$$\displaystyle \begin{aligned} \begin{array}{rcl} \displaystyle{ R_{FL} (\mathscr{I}_{4,f}) =\chi_{[SL_{min},SL_{max}]}(\mathscr{I}_{4,f}) \left\{ \frac{c_0}{2} +\sum_{n=1}^3 [ c_n \sin (n\mathscr{I}_{4,f} l_0) + d_n \cos (n\mathscr{I}_{4,f} l_0)]\right\}; } \end{array} \end{aligned} $$

here, l 0 represents the initial length of a single contractile unit (sarcomere) and we assume l 0 = 1.95 μm, whereas the coefficients c n and d n are parameters of a truncated Fourier series fitted to match the experimental length-force relations reported in [79]; see [75] for further details. Moreover, \(\chi _{[SL_{min},SL_{max}]}(\cdot )\) is the characteristic function of the interval [SL min, SL max], which represent the minimum and maximum sarcomere length, respectively; here we assume SL min = 0.87 μm SL max = 1.33 μm [72]. Here c 0 represents the calcium concentration at the end of the diastolic phase.

The other two coefficients γ s and γ n can be directly derived from the expression of γ f, relying on an orthotropic activation model, as

$$\displaystyle \begin{aligned} \displaystyle{\gamma_s=\kappa_f \gamma_f , \quad \gamma_n = \frac{1}{(1+\gamma_f)(1+\gamma_s)}-1}. \end{aligned}$$

The parameter κ f allows to correctly describe the thickening occurring during myocardial contraction in the sheets direction. In the mechanical equations, the Piola tensor takes the following form

$$\displaystyle \begin{aligned} \displaystyle{\mathbf{P}=det({\mathbf{F}}_a) \frac{\partial \mathscr{W}({\mathbf{F}}_e)}{\partial {\mathbf{F}}_e} {\mathbf{F}}_a^{-T}} \end{aligned}$$

leading to the following full mechanical problem, where we highlight the dependence on γ f(t):

$$\displaystyle \begin{aligned} \begin{cases} - \nabla_0 \cdot \mathbf{P}(\mathbf{u}(t);\gamma_f(t))=\mathbf{0} \quad &\text{ in } \varOmega\\ \mathbf{P}(\mathbf{u}(t);\gamma_f(t)) \, \mathbf{n} =\mathbf{g} \quad &\text{ on } \varGamma_{endo} \\ \mathbf{P}(\mathbf{u}(t);\gamma_f(t))\, \mathbf{n}+ \alpha \mathbf{u}(t) =\mathbf{0} \quad &\text{ on } \varGamma_{epi} \cup \varGamma_{base}. \end{cases} \end{aligned} $$
(15)

We point out that in the active strain approach the solution of the mechanical problem depends on the calcium concentration c, rather than on the transmembrane potential. However, we need to compute the solution of the full electrical problem in order to characterize the mechanical displacement, since c is coupled to the transmembrane potential v, e.g., in the monodomain model (5).

A schematic representation of the model describing the electromechanical coupling is reported in Fig. 2.

2.3 Parameters of Interest

ROM techniques allow to efficiently solve the problems introduced so far in different scenarios in order assess the effect of clinically relevant parameters on their solutions by taking into account a possible inter-patient variability. We denote by \(\boldsymbol {\mu } \in \mathscr {P} \subset \mathbb {R}^p\) the set of p selected parameters.

In particular, we are interested in analyzing how the electrical conductivities—σ f, σ s and σ n introduced in (5)—and the fibers orientation f 0 affect heart contraction. Electrical conductivities significantly influence the propagation of the electrical signal and, consequently, the displacement of the cardiac muscle; fibers orientation highly varies among subjects and can have a crucial impact on the correct torsion and shortening of the ventricle. We will restrict our attention to these parameters in this work; note that fibers’ orientation affects both the electrophysiology and the mechanics since it directly enters in the monodomain Eq. (5) as well as in the constitutive law (11). Instead, electrical conductivities affects primarily the monodomain equation through the conductivity tensor D, and only indirectly the myocardium displacement. Additional parameters of interest are, for instance, the (isotropic) coefficient a(μ) introduced in (11), related to the stiffness of the cardiac muscle, as well as the Bulk modulus κ defined in (12), related to the material incompressibility; more can be found in [13, 14].

Regarding electrophysiology, we thus have D = D(μ) and the parametrized electrical model reads as:

$$\displaystyle \begin{aligned} \begin{cases} \displaystyle{C_m \frac{\partial v(\boldsymbol{\mu})}{\partial t} + I_{ion}(v(\boldsymbol{\mu}),\mathbf{w}(\boldsymbol{\mu}) )- \nabla \cdot (\mathbf{D}(\boldsymbol{\mu}) \nabla v(\boldsymbol{\mu})) = I_{app} } \quad &\text{in } \varOmega_0 \times (0,T),\\ \displaystyle{\frac{\partial \mathbf{w}(\boldsymbol{\mu})}{\partial t} = \mathbf{s}(v(\boldsymbol{\mu}),\mathbf{w}(\boldsymbol{\mu}))} \quad &\text{in } \varOmega_0 \times (0,T),\\ \mathbf{D}(\boldsymbol{\mu}) \nabla v(\boldsymbol{\mu}) \cdot \mathbf{n} =0 \quad &\text{on } \partial \varOmega_0 \times (0,T),\\ v(t_0)=v_0 \qquad w(t_0)=w_0 \quad &\text{in } \varOmega_0. \end{cases} \end{aligned} $$
(16)

If D is μ-dependent, also the variables v and w will depend on parameters. Since the activation equation depends on the solution of the electrical problem, we also have γ f = γ f(μ), so that (14) reads as

$$\displaystyle \begin{aligned} \displaystyle{\mu_A \dot{\gamma_f}(\boldsymbol{\mu}) = f_A(c(\boldsymbol{\mu})) + \frac{2 \mathscr{I}_{4,f}}{(1+\gamma_f(\boldsymbol{\mu}))^3} -2 \mathscr{I}_{4,f}|{}_{c=c_0}} \quad \text{in } \varOmega_0 \times (0,T). \end{aligned}$$

As for the mechanical problem, we have u = u(μ), either if we consider parameters directly affecting mechanics or parameters which directly enter only in the electrophysiology, so that (13) modifies as:

$$\displaystyle \begin{aligned} \begin{cases} - \nabla_0 \cdot \mathbf{P}(\mathbf{u}(t,\boldsymbol{\mu});\gamma_f(t,\boldsymbol{\mu}))=\mathbf{0} \quad &\text{ in } \varOmega\\ \mathbf{P}(\mathbf{u}(t,\boldsymbol{\mu});\gamma_f(t,\boldsymbol{\mu})) \, \mathbf{n} =\mathbf{g} \quad &\text{ on } \varGamma_{endo} \\ \mathbf{P}(\mathbf{u}(t,\boldsymbol{\mu});\gamma_f(t,\boldsymbol{\mu}))\, \mathbf{n}+ \alpha \mathbf{u}(t,\boldsymbol{\mu}) =0 \quad &\text{ on } \varGamma_{epi} \cup \varGamma_{base}.\\ \end{cases} \end{aligned} $$
(17)

In this work, we neglect the influence of the blood in the ventricular chamber, thus taking g = 0—that is, p endo(t) = 0, by assuming that no information on the blood inside the ventricle are available. Note that the problem is not trivial: indeed, even if external loads are zero, stress (and then deformation) originates because of the presence of a term depending on the fiber shortening γ f.

3 Full-Order Model: Finite Element Method

Before addressing the reduction of the electrophysiology and the mechanical problems, we sketch their finite element (FE) approximation [31, 38, 82, 84], which the reduced order model is built on, and plays the role of full-order model (FOM). For the sake of notation the dependence on the parameter vector μ is understood in this section.

3.1 Electrical Model

After deriving the weak formulation of problem (16), we introduce the discretization \(\mathscr {T}_{ep}\) of the domain Ω 0 and the finite dimensional spaces Z h and Q h with dim(Z h) = N z <  and dim(Q h) = N q < , respectively, for the approximation of the potential v and the ionic variables \(\mathbf {w} \in \mathbb {R}^d\), d = 3. We denote by \( \{ \varphi _i \}_{i=1}^{N_z}\), φ i ∈ Z h and \( \{ \psi _i \}_{i=1}^{N_q}\), ψ i ∈ Q h, their FE bases, so that the approximated potential v h and ionic variables w h can be expressed under the form

$$\displaystyle \begin{aligned} \begin{array}{rcl}{} v_h(\mathbf{x},t)= \sum_{i=1}^{N_z} {\mathrm{v}_i(t) \varphi_i(\mathbf{x})} \quad \text{and}\quad {\mathbf{w}}_h (\mathbf{x},t) = \begin{pmatrix} w_{1,h}(\mathbf{x},t)\\w_{2,h}(\mathbf{x},t)\\c_h(\mathbf{x},t) \end{pmatrix}= \sum_{i=1}^{N_q} {\mathbf{w}}_i(t) \circ \boldsymbol{\psi_i}^d(\mathbf{x});\\ \end{array} \end{aligned} $$
(18)

here ψ i d are the basis functions of the space \(Q_h^d\) and the operator ∘ is the element-wise vector product. We denote the components of \({\mathbf {w}}_i \in \mathbb {R}^3\), i = 1, …, N q, as w1,i, w2,i, ci, respectively. The FE approximation of the monodomain model (5) turns into the following nonlinear system of algebraic equation

$$\displaystyle \begin{aligned} { \begin{cases} \displaystyle{ \sum_{i=1}^{N_z} \Big( C_m \frac{\partial v_i}{\partial t} (\varphi_i, \varphi_j) + v_i a(\varphi_i,\varphi_j) \Big) + I(\sum_{i=1}^{N_z} {v_i \varphi_i},\sum_{i=1}^{N_q} {\mathbf{w}}_i \circ \boldsymbol{\psi_i}^d; \varphi_j) =0 } \quad & \forall j=1,\dots,N_z,\\ \displaystyle{ \sum_{i=1}^{N_q} \frac{\partial {\mathbf{w}}_i}{\partial t} (\boldsymbol{\psi}_i, \boldsymbol{\psi}_j) = \Big( \mathbf{s}(\sum_{i=1}^{N_z} {v_i \varphi_i},\sum_{i=1}^{N_q} {\mathbf{w}}_i \circ \boldsymbol{\psi_i}^d), \boldsymbol{\psi}_j \Big) } \quad &\forall j=1,\dots,N_q \end{cases} } \end{aligned} $$
(19)

by defining the bilinear form a and the functional I as

$$\displaystyle \begin{aligned} a(v,z)= \int_{\varOmega_0}{\mathbf{D} \nabla v \cdot \nabla z}d\varOmega_0, \qquad I(v,\mathbf{w};z)= \big( I_{ion}(v,\mathbf{w})-I_{app}, z), \end{aligned}$$

respectively, with

$$\displaystyle \begin{aligned} (v,w)=\int_{\varOmega_0}{vwd\varOmega_0}, \qquad (\mathbf{v},\mathbf{w})=\int_{\varOmega_0}{\mathbf{v} \cdot\mathbf{w} d\varOmega_0}. \end{aligned}$$

Here we restrict ourselves to the case of linear (P1) finite elements, so that \(N_z=N_q=N_h^e\). We denote by \(\mathbf {V}=(\mathrm {v}_1,\dots ,\mathrm {v}_{N_h^e})^T\), W = (W 1, W 2, C), where \({\mathbf {W}}_1=(\mathrm {w}_{1,1},\dots ,\mathrm {w}_{1,N_h^e})^T\), \({\mathbf {W}}_2=(\mathrm {w}_{2,1},\dots ,\mathrm {w}_{2,N_h^e})^T\) and \(\mathbf {C}=(\mathrm {c}_{1},\dots ,\mathrm {c}_{N_h^e})^T\). Moreover, M ij = (φ j, φ i), \({\mathbf {M}}_{q,ij}^d=(\boldsymbol {\psi }_j, \boldsymbol {\psi }_i)\) and K ij = a(φ j, φ i) denote the mass matrices and the stiffness matrix associated to problem (19), respectively. To treat the nonlinear term I, we rely on the so-called ionic current interpolation (ICI) method, which introduces a linear interpolation of the ionic currents,

$$\displaystyle \begin{aligned} I(\sum_{i=1}^{N_h^e} {v_i \varphi_i},\sum_{i=1}^{N_h^e} {\mathbf{w}}_i \circ \boldsymbol{\psi_i}^d; \varphi_j) \approx \int_{\varOmega_0} I(v_j,{\mathbf{w}}_i)\varphi_j(\mathbf{x}) \varphi_j(\mathbf{x})= \mathbf{I}(\mathbf{V},\mathbf{W}) \end{aligned} $$
(20)

and makes the assembling of the ionic currents term straightforward, only requiring a matrix-vector multiplication, \(\mathbf {I}(\mathbf {V},\mathbf {W}) = \mathbf {M} \tilde {\mathbf {I}}(\mathbf {V},\mathbf {W})\), where \(\tilde {\mathbf {I}}(\mathbf {V},\mathbf {W})=( I(v_1,{\mathbf {w}}_1), \dots , I(v_{N_h^e}, {\mathbf {w}}_{N_h^e}))^T\). A further enhancement of this procedure can be obtained by considering a lumped version of the ICI strategy (L-ICI) where the ionic currents are interpolated nodally or, equivalently, the mass matrix arising in the ICI method is lumped, thus yielding \(\mathbf {I}(\mathbf {V},\mathbf {W}) = {\mathbf {M}}_L \tilde {\mathbf {I}}(\mathbf {V},\mathbf {W})\). We remark that a possible alternative to the ICI method is the so-called state variable interpolation (SVI) method, in which the transmembrane potential and the variables of the ionic model are computed on the quadrature points and then used to evaluate the ionic current in the monodomain equation. The SVI method turns out to be more accurate than the ICI, since it does not approximate the nonlinear term with piecewise linear functions. However, the ICI method represents a reasonable trade-off between accuracy and computational cost; a detailed comparison between the two approaches can be found in [63]. Moreover, the ICI method better fits with the matrix formulation of the hyper-reduction techniques we have exploited, thus making the coupling between the monodomain equation and the ionic model more efficient when dealing with the reduced order model for electrophysiology. We also point out that when using coarse meshes, the L-ICI method underestimates the propagation velocity of the electrical signal. However, this problem can be solved by artificially increasing the electrical conductivities σ f, σ s and σ n in the L-ICI method, as done in [72].

The nonlinear function s appearing in the ionic model is approximated as

$$\displaystyle \begin{aligned} \Big( \mathbf{s}(\sum_{i=1}^{N_h^e} {v_i \varphi_i},\sum_{i=1}^{N_h^e} {\mathbf{w}}_i \circ \boldsymbol{\psi_i}^d), \boldsymbol{\psi}_j \Big) \approx \sum_{i=1}^{N_h^e} \mathbf{s}(v_i,{\mathbf{w}}_i ) (\boldsymbol{\psi_i}^d, \boldsymbol{\psi_j}^d)=\mathbf{S}(\mathbf{V},\mathbf{W}), \end{aligned} $$
(21)

so that \(\mathbf {S}(\mathbf {V},\mathbf {W})= {\mathbf {M}}_q^d \tilde {\mathbf {S}}(\mathbf {V},\mathbf {W})\), where \(\tilde {\mathbf {S}}(\mathbf {V},\mathbf {W})=(\mathbf {s}(v_1,{\mathbf {w}}_1), \dots , \mathbf {s}(v_{N_h^e},{\mathbf {w}}_{N_h^e}))^T\). Since the ionic variables can be computed at each node independently, the second equation of (19) yields to a system of \(N_h^e\) uncoupled ODEs, \(\dot {\mathbf {W}}- \tilde {\mathbf {S}}(\mathbf {V},\mathbf {W})=0\).

The spatial FE discretization of (19) thus leads to the following system:

$$\displaystyle \begin{aligned} \begin{cases} C_m \mathbf{M} \dot{\mathbf{V}} + \mathbf{K} \mathbf{V} + {\mathbf{M}}_L \tilde{\mathbf{I}}(\mathbf{V},\mathbf{W})=0 \\ \dot{\mathbf{W}} - \tilde{\mathbf{S}}(\mathbf{V},\mathbf{W})=0 \end{cases} \end{aligned} $$
(22)

Let us now introduce a time discretization of (22), denoting by Δt e = Tn t the time step, with t n = nΔt e, n = 1, …, n t; the superscript n denotes a quantity evaluated at time t n. We adopt a forward Euler scheme to solve the ODEs representing the ionic model, with a sufficiently small Δt to preserve the stability of the method. To discretize in time the monodomain equation, we rely on a semi-implicit scheme; in particular, we treat the diffusion term implicitly and the reaction term explicitly. This strategy allows us to solve, at each time step, a linear system instead of a nonlinear one, as it would have been instead required by an implicit method.

We finally assume a weak coupling between all the electrophysiology fields, that is we consider an explicit algorithm to compute the solution of (22), solving sequentially two separate problems in order to compute the ionic variables w and the potential v. In conclusion, we obtain the following system: given V 0, W 0, for n = 0, …, n t − 1 compute

$$\displaystyle \begin{aligned} \begin{cases} {\mathbf{W}}^{n+1} = {\mathbf{W}}^{n} + \varDelta t \tilde{\mathbf{S}}({\mathbf{V}}^n,{\mathbf{W}}^n) \\ \displaystyle{ \Big( \frac{C_m}{\varDelta t} {\mathbf{M}}_L + \mathbf{K} \Big){\mathbf{V}}^{n+1}= \frac{C_m}{\varDelta t} {\mathbf{M}}_L {\mathbf{V}}^n + {\mathbf{M}}_L \tilde{\mathbf{I}}({\mathbf{V}}^n,{\mathbf{W}}^{n+1}) }, \end{cases} \end{aligned} $$
(23)

where mass lumping is commonly used (note the presence of the matrix M L) to reduce possible oscillations near the wave-front [46, 67].

3.2 Activation Equation

Regarding the activation Eq. (14), we first perform a Taylor series expansion around γ f = 0 of the quantity

$$\displaystyle \begin{aligned} \displaystyle{\mathscr{F}(\gamma_f)= \frac{2 \mathscr{I}_{4,f}}{(1+\gamma_f)^3} = \sum_{j=0}^{\infty} {-1^j (j+1) (j+2)\mathscr{I}_{4,f} \gamma_f^j} } \end{aligned} $$
(24)

appearing at the right-hand side of the ODE in (14). Since \(\mathscr {F}(\mathbf {u},0) = 2 \mathscr {I}_{4,f}|{ }_{c=c_0}\), we can approximate the ODE under the form

$$\displaystyle \begin{aligned} \mu_A \dot{\gamma_f} = f_A(c) + \sum_{j=1}^M {-1^j (j+1) (j+2)\mathscr{I}_{4,f} \gamma_f^j} =: F(c,\gamma_f); \end{aligned} $$
(25)

the choice M = 5 ensures that \(||\mathscr {F}(\mathbf {u},\gamma _f) - \sum _{j=1}^M {-1^j (j+1) (j+2)\mathscr {I}_{4,f} \gamma _f^j} || <0.005\), see [72]. Similarly to the discretization of the ionic model (21), the spatial semidiscretization reads

$$\displaystyle \begin{aligned} \mu_A {\mathbf{M}}_q \dot{\mathbf{G}}_f = \mathbf{F}(\mathbf{C},{\mathbf{G}}_f): = \sum_{i=1}^{N_h^e} {F}(c_i,\gamma_{f_i}) ({\psi_i}, {\psi_j}), \end{aligned}$$

where linear finite elements have been chosen to approximate γ f. Here \({\mathbf {G}}_f= (\gamma _{f_1}, \dots , \gamma _{f_N})^T \in \mathbb {R}^{N_h^e}\) and \(\mathbf {C}\in \mathbb {R}^{N_h^e}\) denote the vectors of degrees of freedom (dofs) related to γ f and to the calcium variable c, respectively. The fully discretized problem, obtained by adopting the forward Euler scheme for the time discretization, then reads as follows: given \({\mathbf {G}}_f^{0}\), for n = 0, …, n t − 1 compute

$$\displaystyle \begin{aligned} {\mathbf{M}}_q {\mathbf{G}}_f^{n+1} = {\mathbf{M}}_q {\mathbf{G}}_f^{n} + \frac{\varDelta t}{\mu_A} \mathbf{F}({\mathbf{C}}^{n+1},{\mathbf{G}}_f^n). \end{aligned} $$
(26)

3.3 Mechanical Model

We now turn to the FE approximation of the mechanical subproblem (15), which is a fully nonlinear, quasi-static problem since it depends on time through the coupling with the electrical subproblem. We rely on the Newton method to solve, at a given time instant, such a nonlinear problem. Performing a Newton step at the continuous level around a generic displacement \(\hat {\mathbf {u}}(t)\) yields a weak problem under the following form to be solved: find δ u(t) such that

$$\displaystyle \begin{aligned} J_{\hat{\mathbf{u}}(t)}(\delta \mathbf{u}(t), \mathbf{v} ) = -(R_{\hat{\mathbf{u}}(t)}, \mathbf{v}) \quad \forall \mathbf{v} \in V, \, t \in [0,T), \end{aligned} $$
(27)

where

$$\displaystyle \begin{aligned} J_{\hat{\mathbf{u}}(t)}(\delta \mathbf{u}(t), \mathbf{v} ) = \int_{\varOmega_0}{\left[ \frac{\partial \mathbf{P}}{\partial \mathbf{F}} (\hat{\mathbf{u}}(t)) : \nabla \delta \mathbf{u}(t) \right] : \nabla \mathbf{v} d \varOmega} + \int_{\varGamma_R}{\alpha \delta \mathbf{u}(t) \cdot \mathbf{v} d \sigma} \end{aligned}$$

and

$$\displaystyle \begin{aligned} (R_{\hat{\mathbf{u}}(t)}, \mathbf{v}) = \int_{\varOmega_0}{ \mathbf{P}(\hat{\mathbf{u}}(t)) : \nabla \mathbf{v}d \varOmega} + \int_{\varGamma_R}{\alpha \hat{\mathbf{u}}(t) \cdot \mathbf{v} d\sigma} - \int_{\varGamma_N}{\mathbf{g} \cdot \mathbf{v}d \sigma}. \end{aligned}$$

This problem arises after integrating (15) by parts over Ω 0 and linearizing the resulting problem; recall that F is the deformation gradient tensor defined in (7).

The FE approximation of problem (27) over a suitable triangulation \(\mathscr {T}_m\) of the domain Ω 0 can be obtained in a straightforward way; in this work, we use linear (P1) finite elements to approximate the mechanical displacement, denoting by \(N_h^m\) the dimension of the FE space for the approximated displacement. We then obtain the following algebraic form of the Newton problem: for each t n, n = 0, …, N t − 1, given U (0)(t n), for every k ≥ 1 we search δ U(t n) satisfying

$$\displaystyle \begin{aligned} \begin{cases} \mathbf{J}({\mathbf{U}}^{(k-1)}(t_n)) \delta {\mathbf{U}}^{(k)}(t_n) = - \mathbf{R}({\mathbf{U}}^{(k-1)}(t_n)),\\ {\mathbf{U}}^{(k)}(t_n) = {\mathbf{U}}^{(k-1)}(t_n) + \delta {\mathbf{U}}^{(k)}(t_n) \end{cases} \end{aligned} $$
(28)

until \(|| \mathbf {R} ({\mathbf {u}}^k_h(t_n))||{ }_{2}< \varepsilon \), being ε > 0 a small fixed tolerance. Here, for any \(\mathbf {U} \in \mathbb {R}^{N_h^m}\),

$$\displaystyle \begin{aligned} \begin{aligned} \left[ \mathbf{J}(\mathbf{U}(t)) \right]_{ij}&= J_{{\mathbf{u}}(t)}(\boldsymbol{\varphi}_j, \boldsymbol{\varphi}_i ), \qquad i,j=1,\ldots, N_h^m \\ {}[\mathbf{R}(\mathbf{U}(t))]_{i}&= (R_{{\mathbf{u}}(t)}, \boldsymbol{\varphi}_i), \qquad i=1,\ldots, N_h^m \end{aligned} \end{aligned} $$
(29)

are the components of the Jacobian \(\mathbf {J}(\mathbf {U}) \in \mathbb {R}^{N_h^m \times N_h^m}\) and the residual \(\mathbf {R}(\mathbf {U}) \in \mathbb {R}^{N_h^m}\) evaluated at \(\mathbf {U} \in \mathbb {R}^{N_h^m}\); \(\{\boldsymbol {\varphi }_i, i=1,\ldots ,N_h^m\}\) denote the (vector) basis functions of the FE space for the displacement and \(\mathbf {U}(t) = (u_1(t),\ldots ,u_{N_h^m}(t))^T\) the vector of dofs of its high-fidelity approximation u(t)—here denoted, with a slight abuse of notation, in the same way as the displacement at the continuous level.

Algorithm 1 FOM for the (one-way) coupled electromechanical model

A segregated algorithm is finally chosen for the solution of the electromechanical problem, in which the governing equations are solved sequentially—that is, segregated from one another; see Algorithm 1. This approach is shown to be appropriate when considering a model which is independent on the fibers stretch or which depends on the stretch but not on the stretch-rate [62]. In particular:

  • we consider two different time steps for the electrical and the mechanical problem. The electrophysiology requires a significantly small time-step Δt e = Tn t in order to correctly capture the propagation front of the electrical potential. Since the mechanical displacement is slower (of a factor ranging between 10 and 100) than the electrical signal propagation, for the mechanical model it is sufficient to consider a time step Δt m = TN t small enough to guarantee the convergence of the Newton method. In particular, we set them so that Δt m = DΔt e, that is, n t = DN t. Since we are discretizing the activation equation with the forward Euler method, we need to solve (26) using the time step Δt e of the electrical model to guarantee the stability of the overall numerical scheme. Therefore, D time steps for the electrical subproblem (23) and the activation Eq. (26) are evaluated between two time instants in which the mechanical subproblem is solved;

  • different meshes \(\mathscr {T}_{ep}\), \(\mathscr {T}_m\) are employed for the electrical and mechanical problems, respectively; the latter problem requires less mesh-size restrictions than the former and can thus be solved on a coarser mesh [69]. This implies the need of transferring information between the two meshes: to impose the activation in the mechanical problem we need to evaluate the solution of the electrophysiology problem on \(\mathscr {T}_m\), whereas the electromechanical feedback (which here is not considered) would require to evaluate the solution of the mechanical problem on \(\mathscr {T}_{ep}\). This inter-grid transfer is performed by means of a rescaled localized radial basis functions (RBF) interpolation technique introduced in [32]; see also [9, 72].

4 Reduced Order Modeling Techniques

The reduced basis (RB) method allows to speed up the approximation of a parameter-dependent PDE in the case multiple evaluations of its solution are required for several values of the parameter \(\boldsymbol {\mu } \in \mathscr {P}\). The basic idea of the RB method is to seek the solution of a problem in a subspace of much smaller dimension than the one, N h, of the FOM space. During the offline stage, the parameter domain is explored, and a set of high-fidelity solutions (snapshots) is computed to generate a low dimensional RB space of dimension N ≪ N h. This space can be built by means of either a greedy algorithm (if suitable a posteriori error estimators are available and can be efficiently evaluated) or, in more general situations, proper orthogonal decomposition (POD) technique; see Sect. 4.1. Then, during the online phase, for each new value of μ, the RB approximation is rapidly computed by combining (possibly few) arrays stored offline, whose complexity must no longer depend on N h.

The technique is well-established for linear PDEs (both of elliptic and parabolic type) showing an affine dependence on μ; see, e.g., [68] for an in-depth presentation of the methodology. Under the assumption of affine parametric dependence, the differential operators and data can be expressed as a linear combination of μ-independent forms (which can thus be precomputed) weighted by μ-dependent coefficients, which can be inexpensively evaluated. The RB method in its classical formulation, however, is no longer efficient when dealing with nonlinear (and/or nonaffinely parametrized) problems, unless we employ suitable hyper-reduction techniques to perform system approximation in addition to solution-space reduction; in the nonlinear case, these two operations shall be performed at the same time.

We first address the issue of solution-space reduction, which is achieved by means of the POD technique. We consider the case of a nonlinear stationary problem, a class which the mechanical subproblem fits in, for the sake of general exposition. We postpone the case of time-dependent nonlinear problems—albeit treated in a semi-implicit way, thus requiring the solution of a linear system at each time step—to Sect. 5, where we address the reduction of the monodomain equation. For the sake of exposition, we formulate everything in a purely algebraic form.

4.1 POD-Galerkin Method

Let us consider the following, abstract, nonlinear μ-dependent algebraic system

$$\displaystyle \begin{aligned} \mathbf{R}(\mathbf{U}(\boldsymbol{\mu});\boldsymbol{\mu})= \mathbf{0}. \end{aligned} $$
(31)

and the associated Newton method: given \({\mathbf {U}}^{(0)}(\boldsymbol {\mu }) \in \mathbb {R}^{N_h}\), for k ≥ 1, find \(\delta \mathbf {U}(\boldsymbol {\mu }) \in \mathbb {R}^{N_h}\) s.t.

$$\displaystyle \begin{aligned} \begin{cases} \mathbf{J}({\mathbf{U}}^{(k-1)}(\boldsymbol{\mu});\boldsymbol{\mu}) \delta {\mathbf{U}}^{(k)}(\boldsymbol{\mu}) = - \mathbf{R}({\mathbf{U}}^{(k-1)}(\boldsymbol{\mu});\boldsymbol{\mu}),\\ {\mathbf{U}}^{(k)}(\boldsymbol{\mu}) = {\mathbf{U}}^{(k-1)}(\boldsymbol{\mu}) + \delta {\mathbf{U}}^{(k)}(\boldsymbol{\mu}) \end{cases} \end{aligned} $$
(32)

and iterate until ||R(U (k)(μ);μ)||2 < ε, being ε > 0 a small, given tolerance. As before, \(\mathbf {J}(\mathbf {U}(\boldsymbol {\mu });\boldsymbol {\mu }) \in \mathbb {R}^{N_h \times N_h}\) denotes the μ-dependent Jacobian matrix (with linearization around U(μ)) and \(\mathbf {R}(\mathbf {U}(\boldsymbol {\mu });\boldsymbol {\mu }) \in \mathbb {R}^{N_h}\) the μ-dependent residual vector.

In the case of mechanical problems characterized by complex nonlinear constitutive laws, the computational burden in solving (32)1 is represented by the assembling of the Jacobian matrix, which can consume almost the entire CPU time required by each Newton step. To reduce the computational complexity of problem (32), the RB method seeks, for any \(\boldsymbol {\mu } \in \mathscr {P}\), an approximation of U (k)(μ) given by a linear combination of (possibly few) basis functions,

$$\displaystyle \begin{aligned} {\mathbf{U}}^{(k)}(\boldsymbol{\mu}) \approx \mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu}), \quad \forall k\geq 1, \,N\ll N_h, \end{aligned} $$
(33)

where \({\mathbf {u}}_N^{(k)}(\boldsymbol {\mu }) \in \mathbb {R}^N\) and \(\mathbf {Z} \in \mathbb {R}^{N_h\times N}\) is a matrix whose N ≪ N h columns contained the nodal values of the RB functions. Problem (32) is then replaced by the following: given \({\mathbf {u}}_N^{(0)}(\boldsymbol {\mu }) \in \mathbb {R}^{N}\), for k ≥ 1, find \( \delta {\mathbf {u}}_N \in \mathbb {R}^{N}\) s.t.

$$\displaystyle \begin{aligned} \begin{cases} {\mathbf{Z}}^T \mathbf{J}(\mathbf{Z} {\mathbf{u}}_N^{(k-1)}(\boldsymbol{\mu});\boldsymbol{\mu}) \mathbf{Z}\delta {\mathbf{u}}_N(\boldsymbol{\mu}) = - {\mathbf{Z}}^T \mathbf{R}( \mathbf{Z} {\mathbf{u}}_N^{(k-1)}(\boldsymbol{\mu});\boldsymbol{\mu}),\\ {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu}) = {\mathbf{u}}_N^{(k-1)}(\boldsymbol{\mu}) + \delta {\mathbf{u}}_N(\boldsymbol{\mu}), \end{cases} \end{aligned} $$
(34)

and iterate until \(||{\mathbf {Z}}^T \mathbf {R}( \mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu })||{ }_2< \varepsilon _{RB}\), being ε RB > 0 a small, given tolerance. If (34) converges, Zu N(μ) can be regarded as an approximation of U(μ) in the RB space, with \({\mathbf {u}}_N= \lim _{k \rightarrow \infty } {\mathbf {u}}_N^{(k)} \). Problem (34)1 is obtained by requiring that the Galerkin projection over V N of the FOM residual computed on the ansatz (33) vanishes, where V N has to be intended as the space spanned by the columns of Z.

The POD technique—through the so-called method of snapshots—can be used to compute the reduced basis Z (and, as we shall see in Sect. 4.2, for the construction of both DEIM and MDEIM bases). In the case of a stationary, μ-dependent nonlinear problem, POD performs the singular value decomposition of a matrix

$$\displaystyle \begin{aligned} \mathbf{S}= [ {\mathbf{U}}^{(1)}(\boldsymbol{\mu}_1) \quad {\mathbf{U}}^{(2)}(\boldsymbol{\mu}_1) \quad \ldots \quad {\mathbf{U}}^{(1)}(\boldsymbol{\mu}_{n_s}) \quad {\mathbf{U}}^{(2)}(\boldsymbol{\mu}_{n_s}) \quad \ldots ] \end{aligned}$$

of snapshots of the high-fidelity problem and returns an orthonormal basis of the RB space made by the first N right singular vectors of S. Here snapshots are represented by Newton steps obtained for n s parameter vectors \(\boldsymbol {\mu }_i\in \mathscr {D}\), i = 1, …, n s, randomly sampled over \(\mathscr {P}\); more ad-hoc strategies, such as e.g. latin hypercube sampling or sparse grid, could be exploited especially for high-dimensional parameter spaces.

Hence, from the factorization S = Z ΣΛ T, where Λ = diag(σ 1, σ 2, …) is the matrix of singular values of S, the POD basis Z N of dimension N ≤ n s is obtained by collecting the first N columns of Z (i.e. the first N left singular vectors), corresponding to the first N (largest) singular values; we can set the basis dimension N as the minimum integer such that

$$\displaystyle \begin{aligned} \frac{\sum_{i=1}^N{\sigma_i^2} }{\sum_{i=1}^{n_s}{\sigma_i^2}} \geq 1-\varepsilon_{POD}, \end{aligned}$$

given a suitable, small tolerance ε POD > 0. The reduced basis provided by POD is optimal, in the sense that it minimizes the sum of the squared distances between each snapshot and the corresponding projection onto the subspace. When denoting by Z the POD basis, its dimension N will be understood.

4.2 Hyper-Reduction Techniques

When using Newton iterations to solve nonlinear problems, assembling the ROM for any new parameter would require to assemble (also in the online phase) the FOM arrays first and then to project them onto the reduced space, thus calling into play high-fidelity arrays at the online stage, too. This issue is even more relevant when dealing with fully nonlinear problems, for which the global Jacobian matrix has to be entirely reassembled at each Newton step.

Hyper-reduction (or system approximation) techniques aim to recover an approximate affine structure of nonlinear terms to guarantee an efficient offline-online decomposition. The archetypical hyper-reduction technique introduced in the RB framework is the empirical interpolation method (EIM), developed in [10, 49] to approximate nonaffinely parametrized functions. Its discrete variant, the so-called Discrete EIM (DEIM), was originally proposed in [21] to efficiently deal with nonlinear problems, but has also been applied to nonaffinely parametrized linear operators. More recently, a matrix version of DEIM (MDEIM) has been developed [19, 87], and then further explored in [55] to approximate the full-order parametrized operators in a purely algebraic way.

4.2.1 DEIM for Residual Approximation

For the problem at hand, at each Newton step, DEIM [21] allows to efficiently express the residual vector as a linear combination of (possibly few) μ-independent terms so that the μ-dependent weights of this combination can be efficiently computed by solving an interpolation problem. In particular, we project the residual vector \(\mathbf {R}(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu })\) onto a low-dimensional subspace spanned by a basis \(\boldsymbol {\varPhi }_R \in \mathbb {R}^{N_h \times m_R}\) such that, ∀k ≥ 1

$$\displaystyle \begin{aligned} \mathbf{R}(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu});\boldsymbol{\mu}) \approx {\mathbf{R}}_m(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu});\boldsymbol{\mu})= \boldsymbol{\varPhi}_R \boldsymbol{\theta}_R(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu}),\boldsymbol{\mu}) \end{aligned} $$
(35)

where \(\boldsymbol {\theta }_R(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu }),\boldsymbol {\mu }) \in \mathbb {R}^{m_R}\) is a coefficient vector to be determined. In particular:

Algorithm 2 DEIM algorithm (as originally proposed in [21])

  • the basis Φ R can be computed (once for all) by performing POD on a set of snapshots

    $$\displaystyle \begin{aligned} {\mathbf{S}}_R = \{ \mathbf{R}(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu}_i);\boldsymbol{\mu}_i) \quad i=1, \ldots ,n_s, k=1,\ldots \}. \end{aligned}$$

    To obtain the residual snapshots \(\mathbf {R}(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu }_i);\boldsymbol {\mu }_i)\), we need to solve the reduced problem (34) for different values of μ and, at each Newton iteration, to store the computed residual vectors;

  • the coefficient vector \(\boldsymbol {\theta }_R(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu }),\boldsymbol {\mu })\) can be evaluated for each new value of μ by imposing m R interpolation constraints on a subset \(\boldsymbol {\wp }=[\wp _1, \ldots , \wp _{m_R}]\) of entries of \(\mathbf {R}(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu })\) (the so-called magic points, introduced in [49]), selected by the DEIM algorithm, see Algorithm 2. For ease of notation, we introduce the matrix

    $$\displaystyle \begin{aligned} \mathbf{P} =[{\mathbf{e}}_{\wp_1},\cdots,{\mathbf{e}}_{\wp_{m_R}}] \in \mathbb{R}^{N_h \times m_R}, \end{aligned} $$
    (36)

    where \({\mathbf {e}}_{\wp _i}=[0,\cdots ,0,1,0,\cdots ,0]^T \in \mathbb {R}^{N_h}\) is the i-th column of the identity matrix \(I \in \mathbb {R}^{N_h \times N_h}\), for i = 1, ⋯ , m R. The coefficient vector \(\boldsymbol {\theta }_R(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu }),\boldsymbol {\mu })\) is then obtained as the solution of

    $$\displaystyle \begin{aligned} {\mathbf{P}}^T \boldsymbol{\varPhi}_R \boldsymbol{\theta}_R(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu}),\boldsymbol{\mu}) = {\mathbf{P}}^T \mathbf{R}(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu});\boldsymbol{\mu}); \end{aligned}$$

    P T Φ R and \( {\mathbf {P}}^T \mathbf {R}(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu })\) are the restrictions of Φ R and \(\mathbf {R}(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu })\) to the subset of indices , respectively.

The approximation of the reduced residual vector in (34) can be obtained by projecting (35) onto the reduced space yielding

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} {\mathbf{Z}}^T \mathbf{R}(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu});\boldsymbol{\mu}) \approx {\mathbf{Z}}^T \boldsymbol{\varPhi}_R ({\mathbf{P}}^T \boldsymbol{\varPhi}_R)^{-1} {\mathbf{P}}^T \mathbf{R}(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu});\boldsymbol{\mu}):= {\mathbf{R}}_{N,m}(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu});\boldsymbol{\mu}).\\ \end{array} \end{aligned} $$
(37)

All the quantities appearing in (37) which do not depend on μ can be precomputed offline; in the online stage we only need to assemble \({\mathbf {P}}^T \mathbf {R}(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu })\), which is the restriction of the residual to the subset of DEIM nodes. In the FE context, this restriction can be computed by simply integrating the residual only on the quadrature points belonging to those mesh elements which provide a non-zero contribution to the entries ; this set of elements is usually referred to as reduced mesh [18].

4.3 Jacobian Approximation

An affine approximation of the reduced Jacobian matrix \({\mathbf {J}}_N(\mathbf {Z} {\mathbf {u}}^{(k)}_N(\boldsymbol {\mu });\boldsymbol {\mu })\) can be obtained by relying on either the DEIM algorithm or a MDEIM alternative technique.

The classical DEIM approach to tackle nonlinear problems (see e.g. [11, 22, 45, 64]) computes the reduced Jacobian J N(Zw N(μ);μ), for any \({\mathbf {w}}_N \in \mathbb {R}^N\), as the derivative of the reduced approximated residual vector (i.e. the right-hand side of (37)),

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} {\mathbf{J}}_{N,m}(\mathbf{Z} {\mathbf{w}}_N(\boldsymbol{\mu});\boldsymbol{\mu}) = \frac{\partial {\mathbf{R}}_{N,m}(\mathbf{Z} {\mathbf{w}}_N(\boldsymbol{\mu});\boldsymbol{\mu})}{\partial {\mathbf{w}}_N} = {\mathbf{Z}}^T \boldsymbol{\varPhi}_R ({\mathbf{P}}^T \boldsymbol{\varPhi}_R)^{-1} {\mathbf{P}}^T \mathbf{J}(\mathbf{Z} {\mathbf{w}}_N(\boldsymbol{\mu});\boldsymbol{\mu}) \mathbf{Z}.\\ \end{array} \end{aligned} $$
(38)

As for the residual vector, we can precompute the μ-independent quantities offline, while online we have to assemble \({\mathbf {P}}^T \mathbf {J}(\mathbf {Z} {\mathbf {w}}_N(\boldsymbol {\mu });\boldsymbol {\mu }) \in \mathbb {R}^{m_R \times N_h}\), that is the restriction of the Jacobian matrix to the rows which correspond to the indices in . Consequently, we need to assemble online, at each Newton step, a matrix of dimension m R × N h, which still depends on the dimension N h of the FE problem, which is unfeasible when m R becomes large. Note that since the reduced Jacobian matrix is obtained as the derivative of the reduced residual, DEIM yields the application of the exact Newton method (i.e. with the exact reduced Jacobian matrix) although on an approximated version of problem (34).

When a large number m R of DEIM terms is obtained, a matrix version of DEIM (MDEIM) can be employed to perform hyper-reduction of the Jacobian matrices arising in (34). The idea is to directly approximate the reduced Jacobian \({\mathbf {Z}}^T \mathbf {J}(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu }) \mathbf {Z}\) by relying on a different basis than the one used for the residual. This yields a quasi-Newton method since the reduced Jacobian matrix is not the exact derivative of the reduced residual; nevertheless, since the μ-dependent Jacobian matrix usually varies in a significantly smaller range compared to the residual vector, few (much less than m R) terms are required.

MDEIM provides an approximation of the Jacobian matrix \(\mathbf {J}(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu })\in \mathbb {R}^{N_h \times N_h}\) under the form

$$\displaystyle \begin{aligned} \mathbf{J}(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu});\boldsymbol{\mu}) \approx {\mathbf{J}}_m(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu});\boldsymbol{\mu}) = \sum_{i=1}^{m_J} \theta_J^i(\boldsymbol{\mu}) {\mathbf{J}}^i, \end{aligned} $$
(39)

being \(\{ {\mathbf {J}}^i \in \mathbb {R}^{N_h \times N_h}\), i = 1, …, m J} a set of μ-independent matrices that can be computed once for all and \(\boldsymbol {\theta _J}(\boldsymbol {\mu })=(\theta ^1_J(\boldsymbol {\mu }),\cdots ,\theta ^{m_J}_J(\boldsymbol {\mu }))^T\) a coefficient vector. This approximation is obtained by defining \(j(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu }) = \text{vec} (\mathbf {J}(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu }) \in \mathbb {R}^{N_h^2}\) as the vector obtained by stacking all the columns of \(\mathbf {J}(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu })\), and approximating \(j(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu }) \) by its DEIM counterpart

$$\displaystyle \begin{aligned} \begin{array}{rcl} j(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu});\boldsymbol{\mu}) \approx j_m(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu});\boldsymbol{\mu})= \boldsymbol{\varPhi}_J \boldsymbol{\theta}_J(\boldsymbol{\mu}), \quad \boldsymbol{\varPhi}_J= (\boldsymbol{\phi}_1, \ldots, \boldsymbol{\phi}_n)^T \in \mathbb{R}^{N_h^2 \times m_J}. \end{array} \end{aligned} $$

Then, the matrices J i can be computed transforming each column \(\boldsymbol {\phi }_i \in \mathbb {R}^{N_h^2 }\) of Φ J into a matrix \({\mathbf {J}}^i \in \mathbb {R}^{N_h \times N_h}\) by reverting the vec operation, as J i = vec−1(ϕ i), so that \({\mathbf {J}}_m(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu }) = \text{vec}^{-1} ( j_m(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu }))\). The basis Φ J and the coefficient vector θ J(μ) are determined following the same procedure used for the residual vectors, relying on a set of snapshots S J = \(\{\mathbf {J}(\mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu }_i);\boldsymbol {\mu }_i), \, i=1, \dots ,n_s, \ k=1,\ldots \}\), evaluated on the reduced solution. Finally, the reduced Jacobian matrix in (34) can be approximated as

$$\displaystyle \begin{aligned} {\mathbf{Z}}^T \mathbf{J}(\mathbf{Z} {\mathbf{u}}_N^{(k)}(\boldsymbol{\mu});\boldsymbol{\mu}) \mathbf{Z} \approx \sum_{i=1}^{m_J} \theta^i_J(\boldsymbol{\mu}) {\mathbf{Z}}^T {\mathbf{J}}^i\mathbf{Z}. \end{aligned} $$
(40)

4.3.1 Efficient Assembling on a Reduced Mesh

By using DEIM and MDEIM as above, the POD solution-space reduction is first performed, while the bases associated to the DEIM and MDEIM approximations of R and J are computed at a later time. The major drawback of this strategy is that problem (34) must be solved n s times. To avoid this, we can rely on an intermediate problem where the Jacobian matrix is replaced by its MDEIM approximation and the residual is exact: given \({\mathbf {u}}_{N,m}^{(0)} \in \mathbb {R}^N\), at each Newton step we search \(\delta {\mathbf {u}}_{N,m}^{(k)} \in \mathbb {R}^N\), k ≥ 1 satisfying

$$\displaystyle \begin{aligned} \begin{cases} \displaystyle \sum_{i=1}^{m_J}{\theta_i^J(\boldsymbol{\mu}) {\mathbf{Z}}^T {\mathbf{J}}^i \mathbf{Z}} \, \delta {\mathbf{u}}_{N,m}(\boldsymbol{\mu})= - {\mathbf{Z}}^T \mathbf{R}(\mathbf{Z} {\mathbf{u}}_{N,m}^{(k-1)}(\boldsymbol{\mu}))\\ {\mathbf{u}}_{N,m}^{(k)}(\boldsymbol{\mu}) = {\mathbf{u}}_{N,m}^{(k-1)}(\boldsymbol{\mu}) + \delta {\mathbf{u}}_{N,m}(\boldsymbol{\mu}) \end{cases} \end{aligned} $$
(41)

and iterate until \(||{\mathbf {Z}}^T \mathbf {R}( \mathbf {Z} {\mathbf {u}}_N^{(k)}(\boldsymbol {\mu });\boldsymbol {\mu })||{ }_2< \varepsilon _{RB} \). Solving this problem is significantly faster than solving problem (34), since J is assembled only onto the reduced mesh. Moreover, problem (41) is very fast to solve since it requires almost the same effort of the full hyper-reduced problem. The complete procedure for the ROM construction is reported in Algorithm 3.

Algorithm 3 ROM construction (stationary, nonlinear problem)

5 RB Methods for Cardiac Electrophysiology

We now apply the techniques introduced in the previous section to the electrical problem. The parametrized version of problem (23) reads: given \(\boldsymbol {\mu } \in \mathscr {D}\), V 0(μ) and W 0(μ), for each n = 0, …, n t − 1 solve

$$\displaystyle \begin{aligned} \begin{cases} {\mathbf{W}}^{n+1}(\boldsymbol{\mu}) = {\mathbf{W}}^{n}(\boldsymbol{\mu}) + \varDelta t \tilde{\mathbf{S}}({\mathbf{V}}^n(\boldsymbol{\mu}),{\mathbf{W}}^n(\boldsymbol{\mu})) \\ \displaystyle{ \Big( \frac{C_m}{\varDelta t} {\mathbf{M}}_L + \mathbf{K}(\boldsymbol{\mu}) \Big){\mathbf{V}}^{n+1}(\boldsymbol{\mu})= \frac{C_m}{\varDelta t} {\mathbf{M}}_L {\mathbf{V}}^n(\boldsymbol{\mu}) + {\mathbf{M}}_L \tilde{\mathbf{I}}({\mathbf{V}}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})) }. \end{cases} \end{aligned} $$
(42)

A ROM for the monodomain Eq. (42)1, exploits the POD technique for the construction of the reduced space, and on the DEIM technique to approximate the nonlinear terms. Moreover, we exploit the MDEIM technique to efficiently recover an affine decomposition for the μ-dependent stiffness matrix, and use the DEIM technique to reduce the computational cost associated to the ionic model (42)2.

We consider a vector of physical parameters \(\boldsymbol {\mu } \in \mathscr {P}\) as in Eq. (16) affecting the conductivity tensor D = D(μ) (and possibly the initial data); this yields a μ-dependent stiffness matrix \(\mathbf {K}(\boldsymbol {\mu }) \in \mathbb {R}^{N_h^e \times N_h^e}\); in the case we considered a geometrical parametrization of the domain where the problem is set, also the mass matrix M L would be μ-dependent. Moreover, for the sake of simplicity we do not consider the case of parameters affecting the ionic terms; see [59] for more about this subject.

5.1 Monodomain Equation

We rely on the POD-Galerkin method recalled in Sect. 4.1: for each value of \(\boldsymbol {\mu } \in \mathscr {P}\), we approximate the FE discretization of the potential at time t n as

$$\displaystyle \begin{aligned} {\mathbf{V}}^{n}(\boldsymbol{\mu})\approx {\mathbf{Z}}_e{\mathbf{V}}^{n}_{N^e}(\boldsymbol{\mu}), \quad n=0,\dots,n_t, \end{aligned} $$
(43)

where \({\mathbf {V}}_{N^e}(\boldsymbol {\mu }) \in \mathbb {R}^{N^e}\) denotes the reduced transmembrane potential and Z e denotes the matrix whose columns span the RB space for the monodomain equation. By substituting (43) in (23)1 and projecting the resulting residual onto the reduced space spanned by the columns of Z e, we obtain the following problem: given \(\boldsymbol {\mu } \in \mathscr {P}\) and \({\mathbf {V}}_{N^e}^0(\boldsymbol {\mu })\), for each n = 0, …, n t − 1 solve

$$\displaystyle \begin{aligned} \begin{aligned} {\mathbf{Z}}_e^T \Big( \frac{C_m}{\varDelta t} {\mathbf{M}}_L + \mathbf{K}(\boldsymbol{\mu}) \Big){\mathbf{Z}}_e {\mathbf{V}}_{N^e}^{n+1}(\boldsymbol{\mu}) &= \frac{C_m}{\varDelta t} {\mathbf{Z}}_e^T{\mathbf{M}}_L{\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu})\\ &+ {\mathbf{Z}}_e^T {\mathbf{M}}_L \tilde{\mathbf{I}}({\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})). \end{aligned} \end{aligned} $$
(44)

Since the matrix \({\mathbf {Z}}_e^T \mathbf {K}(\boldsymbol {\mu }) {\mathbf {Z}}_e \) depends on μ, it has to be reassembled for each new value of μ; to avoid this, we replace K(μ) by an approximate affine expansion

$$\displaystyle \begin{aligned} \mathbf{K}(\boldsymbol{\mu}) \approx \sum_{i=1}^{m_K}{\theta_K^i(\boldsymbol{\mu}){\mathbf{K}}^i} \end{aligned} $$
(45)

obtained through the MDEIM technique. Here \(\{ {\mathbf {K}}^i \in \mathbb {R}^{N_h^e \times N_h^e}\), i = 1, …, m K} are a set of μ-independent matrices that can be computed once for all and \(\boldsymbol {\theta }_K(\boldsymbol {\mu })=[\theta ^1_K(\boldsymbol {\mu }),\cdots ,\theta ^{m_K}_K(\boldsymbol {\mu })] \) a vector of coefficients to be evaluated for any \(\boldsymbol {\mu } \in \mathscr {P}\). In this way, no matter which kind of μ-dependence is considered in the expression of the diffusion tensor (6), the ROM stiffness matrix can be assembled using a set of precomputed quantities; in particular, if μ also includes the maximum fibers rotation angle θ max, the vector defining the fiber direction f 0(μ) cannot be written under affine form; see [13]. We point out that K(μ) is time-independent, hence it has to be assembled only once for each value of μ; in particular, during the online stage, we can compute θ K(μ) and the corresponding approximation (45) of K(μ) when selecting a new μ, and then use the computed quantities for all time instants.

Using approximation (45), problem (44) becomes: given \(\boldsymbol {\mu } \in \mathscr {P}\) and \({\mathbf {V}}_{N^e}^0(\boldsymbol {\mu })\), for each n = 0, …, n t − 1 solve

$$\displaystyle \begin{aligned} \bigg[ \frac{C_m}{\varDelta t}{\mathbf{Z}}_e^T{\mathbf{M}}_L{\mathbf{Z}}_e + \sum_{i=1}^{m_K} \theta_K^i(\boldsymbol{\mu}) {\mathbf{Z}}_e^T {\mathbf{K}}_i {\mathbf{Z}}_e \bigg] {\mathbf{V}}_{N^e}^{n+1}(\boldsymbol{\mu}) &= \frac{C_m}{\varDelta t} {\mathbf{Z}}_e^T{\mathbf{M}}_L{\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu})\\ &+ {\mathbf{Z}}_e^T {\mathbf{M}}_L \tilde{\mathbf{I}}({\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})). \end{aligned} $$
(46)

Since the term describing the ionic current is nonlinear, we replace it by its DEIM approximation. We introduce a basis \(\boldsymbol {\varPhi }_I \in \mathbb {R}^{N_h^e\times m_I}\), and express

$$\displaystyle \begin{aligned} \begin{aligned} \tilde{\mathbf{I}}({\mathbf{Z}}_e{\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})) &\approx \boldsymbol{\varPhi_I} \boldsymbol{\theta}_I({\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})). \end{aligned} \end{aligned} $$
(47)

The basis \(\boldsymbol {\varPhi }_I \in \mathbb {R}^{N_h^e\times m_I}\) has to be precomputed during the offline phase by performing a POD on a set of snapshots \(\{ \tilde {\mathbf {I}}({\mathbf {Z}}_e{\mathbf {V}}_{N^e}^n(\boldsymbol {\mu }_i),{\mathbf {W}}^{n+1}(\boldsymbol {\mu }_i))\), i = 1, …, n s}; instead, the coefficient vector \(\boldsymbol {\theta }_I({\mathbf {V}}_{N^e}^n(\boldsymbol {\mu }),{\mathbf {W}}^{n+1}(\boldsymbol {\mu })) \in \mathbb {R}^{m_I} \) has to be computed online, by solving the interpolation problem

$$\displaystyle \begin{aligned} {\mathbf{P}}_I^T \boldsymbol{\varPhi_I} \boldsymbol{\theta}_I({\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})) = {\mathbf{P}}_I^T \tilde{\mathbf{I}}({\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})), \end{aligned} $$
(48)

where \({\mathbf {P}}_I^T=[{\mathbf {e}}_{\wp _{I,1}},\cdots ,{\mathbf {e}}_{\wp _{I,m_R}}]^T \in \mathbb {R}^{N_h^e \times m_I}\) is the restriction matrix to the set of DEIM indices I defined in (36). The DEIM approximation of (47) is thus

$$\displaystyle \begin{aligned} \tilde{\mathbf{I}}({\mathbf{Z}}_e{\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})) \approx \boldsymbol{\varPhi_I} ({\mathbf{P}}_I^T \boldsymbol{\varPhi_I} )^{-1} {\mathbf{P}}_I^T \tilde{\mathbf{I}}({\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})). \end{aligned} $$
(49)

To obtain the second term of the right hand side of (44) we can simply project (49) onto the reduced space spanned by Z e, thus getting

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} {\mathbf{Z}}_e^T {\mathbf{M}}_L \tilde{\mathbf{I}}({\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})) \approx {\mathbf{Z}}_e^T {\mathbf{M}}_L \boldsymbol{\varPhi_I} ({\mathbf{P}}_I^T \boldsymbol{\varPhi_I} )^{-1} {\mathbf{P}}_I^T \tilde{\mathbf{I}}({\mathbf{Z}}_e{\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})).\\ \end{array} \end{aligned} $$
(50)

We point out that the matrices \({\mathbf {Z}}_e^T {\mathbf {M}}_L \boldsymbol {\varPhi _I} \in \mathbb {R}^{N^e \times m_I}\) and \({\mathbf {P}}_I^T \boldsymbol {\varPhi _I} \in \mathbb {R}^{m_I \times m_I} \) can be precomputed during the offline stage, since they are μ-independent. For the sake of system approximation, during the online stage we only need to evaluate (only once) the restriction of \(\tilde {\mathbf {I}}\) to the indices I, that is, \({\mathbf {P}}_I^T \tilde {\mathbf {I}}({\mathbf {Z}}_e{\mathbf {V}}_{N^e}^n(\boldsymbol {\mu }),{\mathbf {W}}^{n+1}(\boldsymbol {\mu })) \in \mathbb {R}^{m_I}\).

Relying on (50), instead of (44) we thus obtain the following hyper-reduced monodomain equation: given \(\boldsymbol {\mu } \in \mathscr {P}\) and \({\mathbf {V}}_{N^e}^0(\boldsymbol {\mu })\), for each n = 0, …, n t − 1 solve

(51)

The construction of the reduced basis Z e and the snapshots selection strategy will be addressed in Sect. 5.3.

5.2 The Full Electrophysiology Problem

In this section we aim at developing an efficient ROM for the full electrical problem (42), which involves a PDE (monodomain equation) and a system of ODEs (ionic model). Replacing the second equation of (42) with the ROM (51) derived in the previous section, we obtain the following problem: given \(\boldsymbol {\mu } \in \mathscr {D}\) and \({\mathbf {V}}^0_{N^e}(\boldsymbol {\mu })\) and W 0(μ), for each n = 0, …, n t − 1 solve

$$\displaystyle \begin{aligned} \begin{cases} {\mathbf{W}}^{n+1}(\boldsymbol{\mu}) = {\mathbf{W}}^{n}(\boldsymbol{\mu}) + \varDelta t \tilde{\mathbf{S}}({\mathbf{V}}^n(\boldsymbol{\mu}),{\mathbf{W}}^n(\boldsymbol{\mu})) \\ \begin{aligned} \bigg[ \frac{C_m}{\varDelta t}{\mathbf{Z}}_e^T{\mathbf{M}}_L{\mathbf{Z}}_e + \sum_{i=1}^{m_K} \theta_K^i(\boldsymbol{\mu}) &{\mathbf{Z}}_e^T {\mathbf{K}}_i {\mathbf{Z}}_e \bigg] {\mathbf{V}}_{N^e}^{n+1}(\boldsymbol{\mu}) =\frac{C_m}{\varDelta t} {\mathbf{Z}}_e^T{\mathbf{M}}_L{\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu})\\ &+ {\mathbf{Z}}_e^T {\mathbf{M}}_L \boldsymbol{\varPhi_I} ({\mathbf{P}}_I^T \boldsymbol{\varPhi_I} )^{-1} {\mathbf{P}}_I^T \tilde{\mathbf{I}}({\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})). \end{aligned} \end{cases} \end{aligned} $$
(52)

Since the ODEs still depend on the high-fidelity approximation of the potential V n at each time t n, n = 1, …, n t, we should in principle compute the matrix-vector product \({\mathbf {V}}^n={\mathbf {Z}}_e {\mathbf {V}}_{N^e}^n\) at each time t n to evaluate \(\tilde {\mathbf {S}}({\mathbf {V}}^n(\boldsymbol {\mu }),{\mathbf {W}}^n(\boldsymbol {\mu }))\) and solve the ionic model. To avoid this operation, we can again rely on a DEIM approximation. In fact, we can express the restriction of \(\tilde {\mathbf {I}}(\mathbf {V},\mathbf {W})\) to the subset of DEIM indices I as

$$\displaystyle \begin{aligned} \begin{aligned} {\mathbf{P}}_I^T \tilde{\mathbf{I}}({\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})) &= \tilde{\mathbf{I}}({\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu}))|{}_{\boldsymbol{\wp}_I} \\&= \tilde{\mathbf{I}}({\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu})|{}_{\boldsymbol{\wp}_I},{\mathbf{W}}^{n+1}(\boldsymbol{\mu})|{}_{\boldsymbol{\wp}_I}). \end{aligned} \end{aligned} $$
(53)

In particular, we observe that in order to solve (52)2, only the restriction of the ionic variables vector W n+1(μ) to the indices I is required. Hence, (52) becomes: given \(\boldsymbol {\mu } \in \mathscr {D}\), \({\mathbf {V}}^0_{N^e}(\boldsymbol {\mu })\) and W 0(μ), for each n = 0, …, n t − 1 solve

$$\displaystyle \begin{aligned} \begin{cases} {\mathbf{W}}^{n+1}(\boldsymbol{\mu})|{}_{\boldsymbol{\wp}_I} = {\mathbf{W}}^{n}(\boldsymbol{\mu})|{}_{\boldsymbol{\wp}_I} + \varDelta t \tilde{\mathbf{S}}({\mathbf{V}}^n(\boldsymbol{\mu}),{\mathbf{W}}^n(\boldsymbol{\mu}))|{}_{\boldsymbol{\wp}_I} \\ \begin{aligned} \bigg[ \frac{C_m}{\varDelta t}{\mathbf{Z}}_e^T{\mathbf{M}}_L{\mathbf{Z}}_e + \sum_{i=1}^{m_K} \theta_K^i(\boldsymbol{\mu}) &{\mathbf{Z}}_e^T {\mathbf{K}}_i {\mathbf{Z}}_e \bigg] {\mathbf{V}}_{N^e}^{n+1}(\boldsymbol{\mu}) =\frac{C_m}{\varDelta t} {\mathbf{Z}}_e^T{\mathbf{M}}_L{\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu})\\ &+ {\mathbf{Z}}_e^T {\mathbf{M}}_L \boldsymbol{\varPhi_I} ({\mathbf{P}}^T \boldsymbol{\varPhi_I} )^{-1} \tilde{\mathbf{I}}({\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu})|{}_{\boldsymbol{\wp}_I},{\mathbf{W}}^{n+1}(\boldsymbol{\mu})|{}_{\boldsymbol{\wp}_I}). \end{aligned} \end{cases} \end{aligned} $$
(54)

As done in (53) for the ionic current, we write

$$\displaystyle \begin{aligned} \tilde{\mathbf{S}}({\mathbf{V}}^n(\boldsymbol{\mu}),{\mathbf{W}}^n(\boldsymbol{\mu}))|{}_{\boldsymbol{\wp}_I}= \tilde{\mathbf{S}}({\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu})|{}_{\boldsymbol{\wp}_I},{\mathbf{W}}^n(\boldsymbol{\mu})|{}_{\boldsymbol{\wp}_I}) \end{aligned}$$

so that, exploiting the approximation \({\mathbf {V}}^{n}(\boldsymbol {\mu }) \approx {\mathbf {Z}}_e{\mathbf {V}}^{n}_{N^e}(\boldsymbol {\mu }),\ n=0,\dots ,n_t-1\), the hyper-reduced order model for the electrical problem reads as follows: given \(\boldsymbol {\mu } \in \mathscr {D}\), \({\mathbf {V}}^0_{N^e}(\boldsymbol {\mu })\) and W 0(μ), for each n = 0, …, n t − 1 solve

(55)

Hence, instead of solving the ODEs (54)1 for each degree of freedom of \(\mathscr {T}_{ep}\), we compute their solution only at m I nodes, with \(m_I \ll N_h^e\). Indeed, both the ionic model and the monodomain equation only depend on the restriction of the potential to the indices I; in particular, by recalling that

$$\displaystyle \begin{aligned} {\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu})|{}_{\boldsymbol{\wp}_I}= {\mathbf{P}}_I^T {\mathbf{Z}}_e {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}), \end{aligned}$$

we notice that the matrix \({\mathbf {P}}_I^T {\mathbf {Z}}_e \in \mathbb {R}^{m_I \times N^e}\) can be precomputed offline. Solving the ODEs system at each node of the mesh would have been required if the activation equation underwent a similar reduction procedure and a ROM for the coupled electromechanical problem was built; see [13] for more on this subject.

5.3 Snapshots Selection Strategy

To build Z e and Φ I we rely on a POD-POD strategy, namely we perform POD with respect to both the time and the parameter vector. In particular:

  • for each parameter value \(\boldsymbol {\mu }_1,\ldots , \boldsymbol {\mu }_{n_s}\) randomly chosen in \(\mathscr {P}\), we solve the high-fidelity problem (42) and perform a POD in time to compress the snapshots V n(μ i), n = 1, …, n t, thus obtaining a basis Z i; finally, we obtain the POD basis Z e performing a POD on the n s bases Z 1, …, \({\mathbf {Z}}_{n_t}\);

  • regarding the nonlinear term, we collect the snapshots \(\tilde {\mathbf {I}}(\mathbf {Z} {\mathbf {V}}_{N^e}^n(\boldsymbol {\mu }_i),{\mathbf {W}}^{n+1}(\boldsymbol {\mu }_i))\), n = 1, …, n t, i = 1, …, n s by solving the following problem: given \({\mathbf {V}}^0_{N^e}(\boldsymbol {\mu }_i)\) and W 0(μ i), i = 1, …, n s, for each n = 0, …, n t − 1 compute

    $$\displaystyle \begin{aligned} \begin{cases} {\mathbf{W}}^{n+1}(\boldsymbol{\mu}) = {\mathbf{W}}^{n}(\boldsymbol{\mu}) + \varDelta t \tilde{\mathbf{S}}({\mathbf{V}}^n(\boldsymbol{\mu}),{\mathbf{W}}^n(\boldsymbol{\mu})) \\ \begin{aligned} \Big[ \frac{C_m}{\varDelta t} {\mathbf{Z}}^T {\mathbf{M}}_L \mathbf{Z} + \sum_{i=1}^{m_K} \theta_K^i(\boldsymbol{\mu}) {\mathbf{Z}}^T {\mathbf{K}}_i \mathbf{Z} \Big] {\mathbf{V}}_{N^e}^{n+1}(\boldsymbol{\mu})&= \frac{C_m}{\varDelta t} {\mathbf{Z}}^T{\mathbf{M}}_L\mathbf{Z} {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu})\\ &+ {\mathbf{Z}}^T {\mathbf{M}}_L \tilde{\mathbf{I}}(\mathbf{Z} {\mathbf{V}}_{N^e}^n(\boldsymbol{\mu}),{\mathbf{W}}^{n+1}(\boldsymbol{\mu})) \end{aligned} \end{cases} \end{aligned} $$
    (56)

    and then perform the same POD-POD procedure with respect to time and parameters as in the previous case; see Algorithm 4.

Algorithm 4 ROM construction (electrophysiology)

Here we rely on global reduced bases; considering local bases obtained by partitioning the snapshot set either with respect to time or the parameters, or, alternatively, produced by a clustering procedure in the physical space, represents a further improvement, currently under investigation; see [59] for further details.

6 RB Methods for Cardiac Mechanics

We now show how to take advantage of the techniques presented in Sect. 4 in order to build a ROM for the mechanical problem. This latter is a time-driven problem, since its solution depends on time only through its coupling with the electrophysiology model, which is intrinsically unsteady. Relying on the RB method provides a twofold advantage, since the problem has to be solved not only for different parameters, but also at several time instants.

The parametrized version of problem (28) reads: given U (0)(t n;μ) = U(t n−1;μ), for n = 1, …, N t, N t = TΔt m, for k ≥ 1 solve:

$$\displaystyle \begin{aligned} \begin{cases} \mathbf{J}({\mathbf{U}}^{(k-1)}(t_{n},\boldsymbol{\mu});{\mathbf{G}}_f^{m}(\boldsymbol{\mu})) \delta \mathbf{U}(t_{n};\boldsymbol{\mu}) = - \mathbf{R}({\mathbf{U}}^{(k-1)}(t_{n};\boldsymbol{\mu});{\mathbf{G}}_f^{l}(\boldsymbol{\mu})),\\ {\mathbf{U}}^{(k)}(t_{n};\boldsymbol{\mu}) = {\mathbf{U}}^{(k-1)}(t_{n};\boldsymbol{\mu}) + \delta \mathbf{U}(t_{n};\boldsymbol{\mu}), \end{cases} \end{aligned} $$
(57)

until \(|| \mathbf {R}({\mathbf {U}}^{(k-1)}(t_{n}; \boldsymbol {\mu });{\mathbf {G}}_f^{l}(\boldsymbol {\mu })||{ }_{2}< \varepsilon \), where k is the index of the Newton iterations, t n denotes the time instant which the mechanical problem is computed at, and l = (n + 1)D − 1, with D = Δt mΔt e. Here we also have made the dependence on the (discrete representation of the) fibers shortening G f; recall that the time stepping for this latter variable follows the one of the electrical problem.

For the mechanical problem, time is instead considered as an additional parameter, although with peculiar features. Indeed, as we are not interested in solving problem (57) for generic values of t selected online, we use the same time step Δt m in both the offline and online stages; in particular, online we solve the reduced problem associated with (57) only in the time instants of the form t n = n Δt m used during the offline stage for the snapshots computation.

6.1 Jacobian Approximation by the Broyden Method

When dealing with time dependent (and/or large scale) problems, (M)DEIM might be not efficient enough to guarantee a rapid approximation of the Jacobian matrix during the online phase. In particular, the classical DEIM technique (see Sect. 4.3) provides moderate computational speed-up when dealing with nonlinear problems which require a large number of terms m R. On the other hand, MDEIM may require an overwhelming amount of CPU time and memory to store the snapshots \(\mathbf {J}({\mathbf {U}}^{(k-1)}(t_n;\boldsymbol {\mu }_i);{\mathbf {G}}_f^{l}(\boldsymbol {\mu }_i))\), and to build the basis Φ J during the offline phase. For these reasons, a possible alternative to approximate the reduced Jacobian matrix (38) is to rely on a purely algebraic technique such as the Broyden method [16], developed to effectively approximate the Jacobian matrix when its analytic form is unknown, or it is too expensive to compute. This approach has been applied for the reduction of nonlinear structural problems in [71] and further improved in [13].

This yields the following hyper-reduced order model for the mechanical problem: for each t n, n = 1, …, N t, given \({\mathbf {u}}_{N,m}^{(0)}(t_n;\boldsymbol {\mu })\), for k ≥ 1 solve:

$$\displaystyle \begin{aligned} \begin{cases} {\mathbf{J}}_N^B( {\mathbf{u}}_{N,m}^{(k)}(t_n;\boldsymbol{\mu});{\mathbf{G}}_f^l(\boldsymbol{\mu})) \delta {\mathbf{u}}_{N,m}^{(k)}(t_n;\boldsymbol{\mu}) = - {\mathbf{R}}_{N,m}( \mathbf{Z} {\mathbf{u}}_{N,m}^{(k)}(t_n;\boldsymbol{\mu});{\mathbf{G}}_f^l(\boldsymbol{\mu})),\\ {\mathbf{u}}_{N,m}^{(k+1)}(t_n;\boldsymbol{\mu}) = {\mathbf{u}}_{N,m}^{(k)}(t_n;\boldsymbol{\mu}) + \delta {\mathbf{u}}_{N,m}^{(k)}(t_n;\boldsymbol{\mu}), \end{cases} \end{aligned} $$
(58)

and iterate until \(||{\mathbf {R}}_{N,m}( \mathbf {Z} {\mathbf {u}}_{N,m}^{(k)}(t_n;\boldsymbol {\mu });{\mathbf {G}}_f^l(\boldsymbol {\mu }))||{ }_2< \varepsilon _{RB}\); as in (57), here l = (n + 1)D − 1. We underline that the high-fidelity approximation of the fibers shortening variable G f is considered, that is, we do not deal in this work with the reduction of the coupled electro-mechanical problem; rather, we focus on the efficient reduction of the mechanical problem only.

At each Newton step, the Broyden approximation of the reduced Jacobian matrix is computed as

$$\displaystyle \begin{aligned} \begin{array}{rcl} {} {\mathbf{J}}_N^B({\mathbf{u}}_{N,m}^{(k)}(t_n;\boldsymbol{\mu})) = {\mathbf{J}}_N^B( {\mathbf{u}}_{N,m}^{(k-1)}(t_n;\boldsymbol{\mu})) + \frac{\varDelta \bar{\mathbf{R}}_{N,m} - {\mathbf{J}}_N^B({\mathbf{u}}_{N,m}^{(k-1)}(t_n;\boldsymbol{\mu})) \varDelta \bar{\mathbf{u}}_{N,m}}{ \varDelta \bar{\mathbf{u}}_{N,m}^T \varDelta \bar{\mathbf{u}}_{N,m}} \varDelta \bar{\mathbf{u}}_{N,m}^T,\\ \end{array} \end{aligned} $$
(59)

where

$$\displaystyle \begin{aligned} \varDelta \bar{\mathbf{R}}_{N,m}= {\mathbf{R}}_{N,m}( \mathbf{Z} {\mathbf{u}}_{N,m}^{(k)}(t_n;\boldsymbol{\mu});t_n,\boldsymbol{\mu}) -{\mathbf{R}}_{N,m}( \mathbf{Z} {\mathbf{u}}_{N,m}^{(k-1)}(t_n;\boldsymbol{\mu});t_n\boldsymbol{\mu}) \end{aligned}$$

and

$$\displaystyle \begin{aligned} \varDelta \bar{\mathbf{u}}_{N,m} = {\mathbf{u}}_{N,m}^{(k)} (t_n;\boldsymbol{\mu}) - {\mathbf{u}}_{N,m}^{(k-1)} (t_n;\boldsymbol{\mu}). \end{aligned}$$

The method is based on a rank-one update of the Jacobian matrix \({\mathbf {J}}_N^B({\mathbf {u}}_{N,m}^{(k)}(t_n;\boldsymbol {\mu }))\); indeed, the second term of the right hand side of (59) is a rank one matrix since every column is a scalar multiple of \(\varDelta \bar {\mathbf {u}}_{N,m}^T \), and only require simple operations between vectors of dimension N. Therefore, at the online stage each Newton step only requires a residual assembling, since the update of the reduced Jacobian matrix and the solution of the low dimensional linear system are extremely fast. On the other hand, the initialization of the Jacobian matrix \({\mathbf {J}}_N^B({\mathbf {u}}_{N,m}^{(0)}(t_n;\boldsymbol {\mu });\gamma _f(t_n,\boldsymbol {\mu }))\) at step k = 0 represents a critical aspect of the Broyden technique. To provide a suitable approximation of the exact Jacobian matrix, we consider a finite difference approximation of the form

$$\displaystyle \begin{aligned} \begin{array}{rcl} [ {\mathbf{J}}_N^B({\mathbf{u}}_{N,m}^{(0)}(t_n;\boldsymbol{\mu}))]_{i,j} = \frac{[{\mathbf{R}}_{N,m}( \mathbf{Z} ( {\mathbf{u}}_{N,m}^{(0)}(t_n;\boldsymbol{\mu}) + \eta {\mathbf{e}}_i))]_j - [{\mathbf{R}}_{N,m}( \mathbf{Z} {\mathbf{u}}_{N,m}^{(0)}(t_n;\boldsymbol{\mu}))]_j}{\eta}, \end{array} \end{aligned} $$

where e i is the i-th column of the identity matrix and \(\eta \in \mathbb {R}\) is a coefficient to be properly chosen (here we take η = 10−5). η shall be small enough to guarantee an accurate approximation of the derivatives, however an excessively small value may lead to undesired cancellation errors. Note that the initialization requires to assemble online N times the residual vector—an affordable operation if N is relatively small. Instead, if N > m R, relying on DEIM to initialize the Jacobian matrix is more convenient than the finite difference approximation. In general, problems characterized by a large dimension of the reduced space N can be efficiently reduced exploiting the MDEIM technique, provided a small number m J of terms can be selected to accurately approximate the Jacobian matrix.

We close this section by pointing out that, during the online stage, only the reduced basis Z and a DEIM basis Φ R for the residual approximation are required. To build this latter, we rely on a strategy similar to the one described in Sect. 4.3.1, introducing the following intermediate problem similar to (41): for each t n, n = 0, …, N t, given \({\mathbf {u}}_{N}^{(0)}(t_n;\boldsymbol {\mu }) \in \mathbb {R}^N\), for k ≥ 1 solve:

$$\displaystyle \begin{aligned} \begin{cases} \tilde{\mathbf{J}}_N^B( {\mathbf{u}}_{N}^{(k)}(t_n;\boldsymbol{\mu});{\mathbf{G}}_f^l(\boldsymbol{\mu})) \delta {\mathbf{u}}_{N}^{(k)}(t_n;\boldsymbol{\mu}) = - {\mathbf{Z}}^T \mathbf{R}( \mathbf{Z} {\mathbf{u}}_{N}^{(k)}(t_n;\boldsymbol{\mu});{\mathbf{G}}_f^l(\boldsymbol{\mu})),\\ {\mathbf{u}}_{N}^{(k+1)}(t_n;\boldsymbol{\mu}) = {\mathbf{u}}_{N}^{(k)}(t_n;\boldsymbol{\mu}) + \delta {\mathbf{u}}_{N}^{(k)}(t_n;\boldsymbol{\mu}), \end{cases} \end{aligned} $$
(60)

and iterate until \(||{\mathbf {Z}}^T \mathbf {R}( \mathbf {Z} {\mathbf {u}}_{N}^{(k)}(t_n;\boldsymbol {\mu });{\mathbf {G}}_f^l(\boldsymbol {\mu }))||{ }_2< \varepsilon _{RB}\).

Precisely, we first solve the high-fidelity problem (28) n s times to compute the reduced basis Z; then, we solve (60) to store the residual snapshots \(\mathbf {R}(\mathbf {Z} {\mathbf {u}}_{N}^{(k)}(t_n; \boldsymbol {\mu }_i))\) needed to build the DEIM basis Φ R. Problem (60)1 is an inexact Newton step, for which the Jacobian matrix \(\tilde {\mathbf {J}}_N^B\) is approximated through the Broyden technique, however relying on the projection of the high-fidelity residual onto the RB space—rather than on the reduced residual, as in (59). Solving (60) is significantly faster than solving (28) since the only operation to perform is the assembling of the high-fidelity residual.The full snapshots selection procedure is summarized in the next section (see Algorithm 5).

Algorithm 5 ROM construction (mechanics)

6.2 Local-in-Time Reduced Basis

If the μ-dependent solution of a non stationary problem significantly varies throughout the time interval [0, T], describing the whole set of solutions for \(\boldsymbol {\mu } \in \mathscr {P}\) may require a large number of RB functions and, in particular, a large number of terms m R when considering nonlinear problems where the residual vector is approximated by DEIM. To overcome this issue, we build local-in-time bases of smaller dimension, instead than a unique (larger) global basis on [0, T], thus yielding a strong reduction in terms of online computational time, still retaining the same cost during the offline stage. In particular, we split the full time interval [0, T] into n b subintervals

$$\displaystyle \begin{aligned} I_1= [0,T_1], \, I_2=[T_1,T_2], \,\dots, \,I_{n_b}=[T_{n_b-1},T] \end{aligned}$$

and we build different bases on each subinterval. In particular, we compute n b set of bases \(\{ {\mathbf {Z}}^s,\boldsymbol {\varPhi }_R^s \},\ s=1,\dots ,n_b\) (and \(\boldsymbol {\varPhi }_J^s\) if using MDEIM), and each basis associated to the s-th interval is obtained by performing the POD only on the set of snapshots related to I s = [T s−1, T s].

We remark that the mechanical problem is solved in correspondence of evenly spaced time instants \(\{t_n\}_{n=0}^{N_t}\), whereas the new partition in subintervals I s is not necessarily uniform. This means that, denoting by τ s = {t n | t n ∈ I s}, the number of elements of τ s can be different from the number of elements of τ r when s ≠ r; in particular, larger subintervals I s are taken if the solution features a small variability in time, while narrow subintervals where the solution rapidly changes. The choice of number and width of the different subintervals is not trivial and multiple options can be considered. Here, we opt for an heuristic choice of the subintervals I s, s = 1, …, n b; a more-in-depth investigation is required in this respect. More general strategies to obtain multiple, local bases have been proposed in the literature; see e.g. [5, 85] for the use of proper clustering algorithms. They require to compute and store the solution snapshots, when varying time and parameters, and then to apply a clustering algorithm in order to build different bases, one for each cluster. While guaranteeing a satisfactory accuracy, snapshots storage can be quite large. Promising results in the case of cardiac electrophysiology can be found in [59].

The local-in-time basis approach combined with a POD-POD strategy allows to avoid the storage of all snapshots. Following this approach, for each μ i, i = 1, …, n s, we perform a full time-driven simulation and we store separately the snapshots U (k)(t n;μ i) associated with the subintervals I s, s = 1, …, n b. Then, for each subinterval I s, we apply the POD algorithm to the local snapshots U (k)(t n;μ i), t n ∈ I s, obtaining the POD bases Z i, s. Once we have performed the high-fidelity simulations for all μ i and we have computed all the POD bases, we build our final bases for each subinterval I s as:

$$\displaystyle \begin{aligned} {\mathbf{Z}}^s=POD({\mathbf{Z}}^{i,s}, \varepsilon). \end{aligned}$$

A schematic representation of the method is reported in Fig. 3. The same procedure is used also to build \(\boldsymbol {\varPhi }_R^s\) and, if required, \(\boldsymbol {\varPhi }_J^s\). In this way, different snapshots can be computed simultaneously; at the end of each simulation, we can only retain the POD bases \(\{ {\mathbf {Z}}^{i,s},\boldsymbol {\varPhi }_R^{is}, \boldsymbol {\varPhi }_J^{is} \}\), thus saving significant memory resources.

Fig. 3
figure 3

Flowchart of the POD-POD procedure combined with local-in-time bases to compute the bases Z s, s = 1, …, n b, of the reduced space

Fig. 4
figure 4

Computational grids adopted for the electrical problem (left) and the mechanical problem (center); fibers orientation (right)

The procedure described above has to be integrated with the generation of snapshots (and bases) to approximate residual vectors and Jacobian matrices; in particular, we split in two different stages the construction of \(\{ {\mathbf {Z}}^s, \boldsymbol {\varPhi }_J^s \}\) and \(\boldsymbol {\varPhi }_R^s\). The full procedure is described in Algorithm 5 in the case either MDEIM or Broyden approximations are considered.

7 Numerical Results

We apply the strategies described in the previous sections for the reduction of an electrical and a mechanical problem, both solved on a patient-specific left ventricle geometry, by focusing on the systolic phase of the heart beat. This geometry was generated from medical images using the semi-automatic segmentation method proposed in [34]. Fibers and sheets have been computed according to the algorithm proposed in [74]; this procedure is based on the assumption that sheets are lying along the radial direction s 0 and requires the solution of a Laplace problem over the ventricular domain to compute the sheets direction.

We rely on two different computational meshes: \(\mathscr {T}_{ep}\) with 248, 216 elements and \(N_h^e=45{,}817\) dofs for the electrical problem and \(\mathscr {T}_m\) with 31, 027 elements and N h = 18, 567 dofs for the mechanics. In Fig. 4 we show the two meshes, as well as the fibers distribution computed using the algorithm proposed in [74] with maximum fibers orientation on the epicardium and endocardium of θ epi = −60 and θ endo = 60, respectively. For both problems we consider as high-fidelity full-order model (FOM) the approximation obtained with linear (P1) finite elements.

7.1 Test Case 1: Electrophysiology

In the case of the electrophysiology problem, the parameters that we consider are those representing the electrical conductivities:

  • σ f ∈ [30 −1 cm −1, 80 −1 cm −1];

  • σ s = σ n ∈ [10 −1 cm −1, 30 −1 cm −1].

in the fibers direction (σ f) and in the plane orthogonal to the former (σ s = σ n), see Eq. (6). For the time discretization of the monodomain equation and the ionic model we employ a time step Δt e = 0.02 ms. The depolarization wave is initialized on a layer in the bottom part of the endocardium; this choice is motivated by the fact that the Purkinje fibers terminations are mainly located near the apex of the ventricle.

By employing the POD-Galerkin method with DEIM/MDEIM approximations for the nonlinear ionic terms/parametrized diffusion matrix described in Sect. 5 we reduce the two-way coupled electrical problem (42), which involves a PDE (monodomain equation) and a system of ODEs (ionic model). The proposed ROM yields a speed-up of more than one order of magnitude, since it takes about 0.01 s for each time step, while the FOM takes 0.12 s. The RB solutions have been computed using N e = 217 basis functions for the solution and m I = 363 DEIM terms to approximate the ionic currents, as specified in Table 2. Provided a sufficient number of basis functions N e, m I is considered, the front propagation captured by the ROM is similar to the one obtained with the FOM. However, depending on the chosen parametrization, this achievement might be more difficult to obtain; for instance, if parameters describe local variations of tissue properties (such as, for instance, the presence of a scar) the behavior of the solution is much more involved, thus requiring a larger number of basis functions to reach a good accuracy.

Table 2 Test case 1: numerical data

A comparison between the high-fidelity and the reduced solutions is reported in Fig. 5, where we observe that the two models provide very similar results from a qualitative point of view. The average relative error between the ROM and the FOM is shown in Fig. 6 for three different values of m I and is about 5%. The error has been computed over a test set of 50 randomly chosen parameters different than the values of the training sample used to compute the snapshots.

Fig. 5
figure 5

Test case 1: FOM and ROM solutions computed at different time instants for μ 1 = [30, 10] and μ 2 = [80, 30]

Fig. 6
figure 6

Test case 1: average L 2(0, T;H 1(Ω 0)) relative error between FOM and ROM solutions

Moreover, we report in Fig. 7 the activation maps obtained for different parameter values. The electrical signal first activates the central area of the epicardium, then it spreads towards the apex and finally reaches the base. As expected, the duration of the depolarization phase is longer if electrical conductivities are smaller. The depolarization time as a function of σ f is reported in Fig. 8.

Fig. 7
figure 7

Test case 1: activation maps for μ 1 = [30, 10], μ 2 = [45, 10], μ 3 = [65, 30] and μ 4 = [80, 30]

Fig. 8
figure 8

Test case 1: whole depolarization times (ms) when varying σ f, considering σ s = σ n = 20

7.2 Test Case 2: Mechanics

We now turn to the reduction of the mechanical problem, recalling that for the case at hand, the electromechanical coupling is not included in the ROM—that is, for each parameter value queried online we rely on the FOM approximation of the electrophysiology model and, in particular, of the fibers’ shortening variable.

We consider as parameters the electrical conductivities (similarly to test case 1) and the orientation of the fibers:

  • σ f ∈ [30 −1 cm −1, 80 −1 cm −1];

  • σ s = σ n ∈ [10 −1 cm −1, 30 −1 cm −1];

  • θ max ∈ [30, 80];

  • t ∈ [0, 100ms].

Time can be seen as an additional parameter, since the problem is quasi-static, and needs to be solved at different time steps. In particular, we split the [0, 100 ms], corresponding to the systolic phase of the heart beat, into n b = 4 subintervals: [0, 30 ms], [30 ms, 60 ms], [60 ms, 90 ms], [90 ms, 100 ms]. Such a partition is introduced heuristically, taking into account the fact that the solution changes very rapidly during the last part of the systole; for this reason the last interval is smaller than the others. We consider a time step Δt e = 0.02 ms for the time discretization of the electrical problem, and time instants equispaced with Δ m = 3 ms for t ∈ [0, 90) and Δ m = 0.5 ms for t ∈ [90, 100] for the mechanical problem. This latter is then solved, for different parameter values, at these time instants.

In Figs. 9 and 10 we show the displacement of the myocardium obtained with the FOM and the ROM on the whole ventricle and on a longitudinal section for two different parameters.

Fig. 9
figure 9

Test case 2: displacement at different time instants, μ 1 = [60, 10, 78] (first two rows), μ 2 = [80, 30, 34] (last two rows), obtained with the FOM and the ROM

Fig. 10
figure 10

Test case 2: section of the ventricle at different time instants, μ 1 = [60, 10, 78] (first two rows), μ 2 = [80, 30, 34] (last two rows), obtained with the FOM and the ROM

Employing the POD-Galerkin method with DEIM/Broyden approximations for the residual vector and the Jacobian matrix described in Sect. 6 we obtain also in the case of the mechanical problem even more promising results: the proposed ROM yields a speed-up of about 20, since the ROM takes about 20 s while the FOM requires 7 min for each solution of the mechanical problem at a single time instant, on a single-core processor. In particular, the Broyden technique turns out to be really appropriate since to efficiently reduce the cardiac mechanical problem we have to choose m R significantly bigger than N.

The proposed ROM correctly captures the high-fidelity solution, as it can be seen also from the behavior of the average relative error shown in Fig. 11; the difference between the FOM and the ROM solutions is about 2%. Numerical data associated to this test case are reported in Table 3.

Fig. 11
figure 11

Test case 2: average L 2(0, T;H 1(Ω 0)) relative error

Table 3 Test case 2: numerical data

We show in Fig. 12 the variation of the volume inside the ventricular cavity for different values of θ max and σ f. In particular, the cases σ f = 60, σ s = σ n = 20 (left) and θ max = 60, σ s = σ n = 20 (right) have been considered. The associated ejection fraction has been reported in Fig. 13, where also the ventricular shortening is shown. These analyses have been carried out by varying θ max and σ f since σ s and σ n have a moderate effect on the solution. The quantity of blood ejected by the ventricle is larger when θ max and σ f assume large values. On the contrary, shortening is higher when considering small values of θ max. This behavior appears counterintuitive since we may expect that higher shortening corresponds to higher ejection fraction. To explain this phenomenon, we report in Fig. 14 the displacement of the muscle for two different values of θ max: even if for θ max = 80 the shortening is smaller, the cavity is more shrunk due to a larger wall thickening.

Fig. 12
figure 12

Test case 2: internal volume variation when varying θ max (left) and σ f (right)

Fig. 13
figure 13

Test case 2: ejection fraction and ventricular shortening as functions of σ f and θ max

Fig. 14
figure 14

Displacement of the myocardium for θ max = 30 (up) and θ max = 80

The model is able to reproduce the wall thickening and the ventricular shortening of the heart contraction. In particular, we obtain a ventricular shortening ranging from 13% to 23%, coherent with physiological values. The ejection fraction, usually measured by an echocardiogram, varies between 50% and 55% in healthy patients.

8 Challenges and Perspectives

The proper integration of several techniques to perform both solution-space reduction (Galerkin-POD method) and system approximation (DEIM/MDEIM or, alternatively to this latter, Broyden approximation) has enabled the application of the reduced basis method for parametrized PDEs to problems arising in cardiac electromechanics. Cardiac electrophysiology and mechanics problems pose several challenges to ROM techniques, because of their complex, nonlinear, multiscale (both in space and time) nature; moreover, parameter dependence might be extremely involved, for instance when aiming at describing subject-specific clinical data and exploring inter-patient variability. On the other hand, ROM techniques provide a unique opportunity to solve relevant problems related with data-model integration, such as model calibration, uncertainty characterization and propagation, parameter identification and inverse problems, data assimilation.

All these problems are of primary importance in order to translate mathematical models into clinical care. Quantitative insights coming from the repeated solution of electrophysiology corresponding to different values of material parameter could provide better understanding of heart (mis)functionality; parameter identification has potential to improve the diagnosis of cardiovascular diseases; model calibration may be beneficial to develop therapies tailored to the subject characteristics. All these problems would be computationally unaffordable when relied only on high-fidelity techniques, aiming at considering variability of geometries, a wide number of scenarios to explore, and several parameters to deal with.

The roadmap to make ROM techniques even more efficient to tackle these challenging problems needs to address several bottlenecks. Among these, we mention those which, in our opinion, are the most relevant:

  1. 1.

    local ROMs. Using a global reduced basis for the whole parameter set and the whole time interval can be an extremely limiting approach. For instance, if the solution shows moving fronts and this latter is highly sensible with respect to parameter variations (as it might happen in the case of cardiac electrophysiology), applying the standard ROM techniques can become unfeasible. Local-in-time bases, as shown in this paper, can partially cure this problem, however more general and robust techniques to build local ROMs are required. As shown in [59, 60], a k-means clustering in the state space of the snapshots for both the solution and the nonlinear term can be a viable strategy to overcome this bottleneck;

  2. 2.

    time behavior. So far, POD has been applied also with respect to the time independent variable, to compress information carried by a set of solution snapshots computed at different time steps, no matter which is the time behavior characterizing the problem. In general, however, reduction of parametrized PDEs becomes much more difficult when passing from elliptic (or dissipative time-dependent) to hyperbolic problems (for instance pure transport equations). More ad-hoc strategies, able for instance to detect time invariances, or to track traveling waves, should be considered in the case of cardiac electrophysiology, because of the sharpness of the front and its extremely rapid dynamics;

  3. 3.

    coupled and multiphysics problems. Designing efficient ROMs (either monolithic or segregated) to couple different problems, such as cardiac electrophysiology and mechanics, is still an open issue, and almost untouched in the field of cardiovascular applications; preliminary investigations on the electromechanical case can be found in [13]. In this latter work it is also shown a possible strategy to realize a fully coupled electromechanical problem by including the mechano-electrical feedback only during the online stage, and relying on different ROMs for the two subproblems; Similarly, in this work the choice of using the monodomain model is performed. Such a model is adequate in physiological conditions, however the richer—but more complicated—bidomain model is required for treating some pathological conditions. The methods described in the previous sections can also apply to the bidomain model, however entailing an extra burden from a computational standpoint, because of the presence of two fields to be computed, and the different overall nature of the PDEs system.

  4. 4.

    multiscale problems. The multiscale nature of the electromechanical model should be properly taken into account in a ROM aiming at describing multiple behaviors at different scales. Among the mentioned open problems, this is by far the most involved one, because of the intrinsic difficulty of the models at the cellular scale. Several extensions of the RB method to multiscale problems showing highly oscillating coefficients have been considered in the last decade, however only focusing on elliptic problems [1, 2, 40, 57]. When applied to these problems, the RB method enables to speed up a large number of similar computations on the fine local mesh for each new realization of the coefficient; its application to complex nonlinear materials, however, is still completely open.

  5. 5.

    multi-fidelity problems. In view of exploiting reduced order modeling techniques to solve uncertainty quantification problems, the use of models characterized by different fidelities is also foreseen. Following, e.g., the approach relying on multi-fidelity sampling and a Bayesian formulation proposed in [12], information from an approximate, low-fidelity model can be rigorously exploited and incorporated to perform output evaluations, estimates on their variability and, ultimately, parameter studies. In this respect, the eikonal model and a recently proposed reaction-eikonal source model [56], this latter offering the computational advantages of the eikonal model while preserving the full biophysical details of a computationally costly reaction-diffusion model, could be considered as an extremely cheap, yet detailed, low-fidelity model.

The investigation and development of reliable and efficient reduced-order modeling techniques is a very active field of numerical analysis and scientific computing; with no doubt, cardiovascular applications represent one of the most challenging and significant environments.