원시데이터 수집 시스템
선정목록으로

Adaptive finite element solution of multiscale PDE–ODE systems

간접 관련 엔지니어링 플라스틱 · (23) 컴파운드 (7) MEA(막전극접합체)(15) 디스플레이 패널재료

기본 정보

저자
  1. August Johansson — Simula Research Laboratory
  2. Jehanzeb H. Chaudhry — Florida State University
  3. Varis Carey — Institute for Computational Engineering and Sciences, University of Texas at Austin, Austin, TX 78712, United States
  4. D. Estep — COLORADO STATE UNIVERSITY
  5. Victor Ginting — university of Wyoming
  6. Mats G. Larson — Umea University
  7. Simon Tavener — COLORADO STATE UNIVERSITY
DOI
10.1016/j.cma.2015.01.010
저널
Computer Methods in Applied Mechanics and Engineering
발행년도
2015
발행기관
Elsevier BV
피인용수
8
라이선스
publisher-specific-oa
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1016/j.cma.2015.01.010
토픽
Composite Material Mechanics
OpenAlex ID
W2050642474

평가 내용

관련도
간접 관련
사업분야
엔지니어링 플라스틱 · (23) 컴파운드
부 분야
(7) MEA(막전극접합체), (15) 디스플레이 패널재료
R&D 측면
분석·모델링
확신도
0.60
근거 용어
multiscale model, finite element method, PDE-ODE systems, numerical error, adaptive error control
판단 근거
이 논문은 거시적(PDE) 및 미시적(ODE) 스케일이 결합된 다중 스케일 시스템을 해결하기 위한 적응형 유한요소법(Adaptive FEM) 수치 해석 모델링을 다룹니다. 이는 복합소재(23)의 미세구조-물성 관계 해석이나 연료전지(7) 내의 화학 반응-물질 전달 결합 모델링 등에 응용 가능한 수치 해석 기법입니다.
R&D 활용 포인트
복합소재의 미세구조에 따른 거시적 물성 예측 모델링이나, 연료전지(PEMFC) 내의 이온 전도 및 화학 반응의 다중 스케일 시뮬레이션 정확도 향상에 활용 가능합니다.
평가 입력
본문 88,511자 중 30,032자 발췌

초록

초록이 없습니다.

본문 88,511자

본문 펼치기
## Adaptive Finite Element Solution of Multiscale PDE-ODE Systems A. Johansson <sup>a</sup>, J. H. Chaudhry <sup>b</sup>, V. Carey <sup>c</sup>, D. Estep <sup>d,</sup> <sup>_∗_</sup>, V. Ginting <sup>e</sup>, M. Larson <sup>f</sup>, S. Tavener <sup>g</sup> _aCenter for Biomedical Computing, Simula Research Laboratory, P.O. Box 134, 1325 Lysaker, Norway_ _bDepartment of Scientific Computing, Florida State University, Tallahassee, FL 32306_ _cInstitute for Computational Engineering and Sciences, University of Texas at Austin, Austin, TX 78712_ _dDepartment of Statistics, Colorado State University, Fort Collins, CO 80523_ _eDepartment of Mathematics, University of Wyoming, Laramie, WY 82071_ _fDept.of Mathematics, Umea University, S-90187 Umea, Sweden_ _gDepartment of Mathematics, Colorado State University, Fort Collins, CO 80523_ Abstract We consider adaptive finite element methods for solving a multiscale system consisting of a macroscale model comprising a system of reaction-diffusion partial differential equations coupled to a microscale model comprising a system of nonlinear ordinary differential equations. A motivating example is modeling the electrical activity of the heart taking into account the chemistry inside cells in the heart. Such multiscale models pose extremely computationally challenging problems due to the multiple scales in time and space that are involved. We describe a mathematically consistent approach to couple the microscale and macroscale models based on introducing an intermediate “coupling scale”. Since the ordinary differential equations are defined on a much finer spatial scale than the finite element discretization for the partial differential equation, we introduce a Monte Carlo approach to sampling the fine scale ordinary differential equations. We derive goal-oriented a posteriori error estimates for quantities of interest computed from the solution of the multiscale model using adjoint problems and computable residuals. We distinguish the errors in time and space for the partial differential equation and the ordinary differential equations separately and include errors due to the transfer of the solutions between the equations. The estimate also includes terms reflecting the sampling of the microscale model. Based on the accurate error estimates, we devise an adaptive solution method using a “blockwise” approach. The method and estimates are illustrated using a realistic problem. _Keywords:_ _a posteriori_ error analysis, adaptive error control, adaptive mesh refinement, adjoint problem, coupled physics, duality, generalized Green’s function, goal oriented error estimates, multiscale model, residual, variational analysis 1. Introduction Our interest in problems consisting of a macroscale time dependent partial differential equation (PDE) coupled to a miscroscale system of ordinary differential equations (ODEs) originates in the modeling of the electrical activity in the heart. The standard macroscale model of electrical phenomena in cardiac tissue is the bidomain model proposed by Tung [1], which consists of parabolic and elliptic _∗_ Corresponding author _Email addresses:_ august@simula.no ( A. Johansson), jehanzebh@hotmail.com (J. H. Chaudhry), varis@ices.utexas.edu (V. Carey), estep@stat.colostate.edu (D. Estep), vginting@uwyo.edu (V. Ginting), mats.larson@math.umu.se (M. Larson), tavener@math.colostate.edu (S. Tavener) _Preprint submitted to CMAME_ _October 3, 2018_ PDEs modeling the macroscopic potential distribution. These PDEs are derived assuming a representation of the tissue as two anisotropic media, one intracellular, which is strongly anisotropic, and one extracellular, which is weakly anisotropic. If the two media are assumed to have proportional conductivity tensors, it is possible to reduce the model to the monodomain model, consisting of a single reaction-diffusion PDE with a load depending on the solution to the ODEs. On the cellular level, the electrical activity may be modeled by a set of ODEs that depends on a potential determined by the solution of the PDE. Many cellular models are available, both phenomenological models that try to mimic measurements, and physiological models which are based on measurements as well as physiological theory. The latter may be very complex, involving up to hundred variables. For a review on mathematical models describing the electrical activity in the heart, see Sundnes et. al. [2] and the references therein. A space-time adaptive method can be found in Colli Franzone and coworkers [3]. A survey of heart modeling can be found in Noble [4]. Specialized numerical methods are required for high fidelity simulation of the heart, since the heart may consist of up to 10 <sup>10</sup> cells [2], each modeled by a set of ODEs, and it is impossible to solve the PDE on the same spatial scale as the ODEs. Moreover, determining the actual physical geometry and location of cells is itself a difficult problem. Thus, including the cellular scale phenomena in the macroscale discretization requires some form of “upscaling” or “recovery” of the information provided by the microscale modeling. This is in fact necessary if the PDE model derived using homogenization as is the case for the bidomain equations. Unfortunately, this subtle mathematical issue is often ignored in computational electrocardiography, where it is common to simply evaluate the ODEs in the cells located at the quadrature points of a finite element method, for example. However, this is not mathematically consistent, since caused the model to change with the PDE discretization. One consequence, for example, is that it is impossible to perform a mesh convergence study, which is the crudest form of uncertainty quantification. As an alternative, we create an intermediate “coupling” or “mesoscale” representation of the cellular scale physics that is used to exchange information between the macroscale and microscale. To deal with the very large number of cells, we create the mesoscale representation by sampling cells at the microscale at random and taking averages over the mesoscale cells. Another potential issue in such coupled systems is significant differences in the temporal scales in the different components. For example, in a system where the ODEs model chemical reactions and the PDE models global behavior such as transport, it is likely that the dynamics of the chemical systems are much faster than that of the total system. Coupled PDE-ODE systems where the ODEs describe chemical reactions and the PDE describe transport occur in applications such as the study of pollution in groundwater, surface water and the atmosphere, control theory and semiconductor simulation. To deal with this, we allow the PDE and ODE systems to employ significantly different time steps. Numerical solutions of such multiscale systems are invariably affected by error arising from numerous discretization effects and present significant discretization challenges in terms of obtaining a desired accuracy [5]. It is therefore critically important to accurately estimate the numerical error in computed quantities of interest and devise efficient discretization parameter selection algorithms. In this paper, we derive goal-oriented a posteriori error estimates that distinguish the relative contributions of various discretization effects, and thus provide the capability of adjusting various discretization parameters to efficiently obtain a desired accuracy. The error analysis is based on a posteriori error estimates that employ computable residuals and adjoint equations, see [6, 7, 8, 9, 10] for general information. For applications to multiscale systems, see [5, 11, 12, 13, 14, 15, 16]. We base the adaptive strategy on the block adaptive approach described in [17]. The content of this paper is organized as follows: In Section 2, we formulate the multiscale model. In Section 3, we describe the discretization methods. The a posteriori error analysis is presented in Section 4. In Section 5, we describe some implementation details and the adaptive algorithm. A numerical 2 example is presented in Section 6. The paper ends with a conclusion in Section 7. 2. Model description The nominal model problem consists of a reaction-diffusion PDE that describes macroscale behavior over a domain Ω coupled to systems of ODEs that model processes taking place inside small “cells” _C_ that comprise the heart domain. The coupling of the macro- and micro-scale processes taking place on vastly different scales in space and time raise serious challenges for analyzing the behavior and computing solutions of the model. We first describe the original coupled system, then we describe a new system that includes a coupling mechanism that provides an avenue to address these challenges. _2.1._ _The original model_ The region Ω _= ∪_ <sup>_NC_</sup> _i_ _=_ 1 <sup>_Ci_</sup> <sup>is comprised of</sup> <sup>_NC_</sup> <sup>cells</sup> <sup>_Ci_</sup> <sup>indexed as {1,...,</sup> <sup>_NC_</sup> <sup>}.</sup> <sup>We model the</sup> <sup>_microscale_</sup> behavior using a collection of ODEs: Find _p_ _i_ _∈_ [ _C_ <sup>1</sup> (0, _T_ )] <sup>_Nr_</sup> solving - _p_ ˙ _i_ _=_ _g_ _i_ ( _u_ ; _p_ _i_ ), _t ∈_ (0, _T_ ], _p_ _i_ (0) _=_ _p_ <sup>0</sup> _i_ <sup>,</sup> , _i_ _=_ 1,..., _NC_, (2.1) where _p_ _i_ is a vector of length _Nr_ and _u_ is the solution of a PDE modeling the macroscopic behavior described below. In the context of (2.1), _u_ has the role of a parameter. We have allowed the model for the microscale behavior _g_ _i_ to vary with each cell. For simplicity of notation, we have assumed the same number of equations in each cell model, however this is not necessary. In order to introduce the microscale solutions of the reactants into the macroscale model, we define the piecewise constant function _p_ ( _x_ ) for _x ∈_ Ω, _p_ ( _x_, _t_ ) _=_ _p_ _i_ ( _t_ ), ( _x_, _t_ ) _∈_ _Ci ×_ (0, _T_ ], _i_ _=_ 1,..., _NC_ . The _macroscale_ model problem reads: Find _u_ ( _x_, _t_ ) _∈_ _C_ <sup>1</sup> ((0, _T_ ); _C_ <sup>2</sup> (Ω)) such that        _u_ ˙ _−∇·_ _ϵ∇u = f_ ( _u_ ; _p_ ), ( _x_, _t_ ) _∈_ Ω _×_ (0, _T_ ], _n ·_ _ϵ∇u =_ 0, ( _x_, _t_ ) _∈_ _∂_ Ω _×_ (0, _T_ ], _u_ ( _x_,0) _= u_ <sup>0</sup> ( _x_ ), _x ∈_ Ω, (2.2) where _ϵ = ϵ_ ( _x_ ) _≥_ _ϵ_ 0 _>_ 0 is a continuous function and _f_ and _u_ <sup>0</sup> are sufficiently smooth functions. In this equation, _p_ now plays the role of a parameter, but one that varies in space on the microscale. _2.2._ _Multiscale coupling_ The coupled system (2.1)-(2.2) immediately raises several issues: - The solutions of the microscale ODEs (2.1) vary in space on the scale of the cells. This happens both because of varying cell model and because the ODE model (2.1) depend on experimentallydetermined parameters that vary stochastically. This microscale variation introduces extremely rapid variation in the coefficient _f_ on the scale of the macroscale PDE (2.2) along with discontinuities across cell boundaries. We would therefore have to use a spatial discretization for (2.2) that is finer than the cells while being consistent with the cell boundaries in order to achieve full order accuracy in numerical solutions. - The ODE system (2.1) has an extremely large dimension _NC ×_ _Nr_, with the consequence that the solution of many systems of nonlinear ODEs are required to advance the PDE solution if we solve the microscale model (2.1) in every cell. This raises another significant computational burden. 3 - At the same time, we expect to see a macroscale pattern in variations in cell type and model, which implies it is inefficient to integrate the microscale ODEs in every cell. To deal with these issues, we introduce a _coupling_ _scale_ decomposition of Ω. We assume that Ω _=_ _∪_ <sup>_Nω_</sup> _j_ _=_ 1 <sup>_ω_</sup> <sup>_j_</sup> <sup>is</sup> <sup>decomposed</sup> <sup>into</sup> <sup>a</sup> <sup>set</sup> <sup>of</sup> <sup>non-overlapping</sup> <sup>regions</sup> <sup>_ωi_</sup> <sup>.</sup> <sup>Each</sup> <sup>_ω_</sup> <sup>_j_</sup> <sup>is</sup> <sup>comprised</sup> <sup>of</sup> <sup>a</sup> <sup>collection</sup> of cells _ω_ _j_ _= ∪i_ _∈Ij_ _Ci_, where _Ij_ is a subset of the indices {1,..., _NC_ }. We assume the collection { _Ij_ } is non-intersecting while their union equals {1,..., _NC_ }. To smooth out the cell-scale variation in the reaction model (2.1), we average the reaction solutions over _ωi_ . We introduce a “recovery” operator _R_ : R <sup>_NC_</sup> <sup>_×Nr_</sup> _→_ [ _L_ <sup>2</sup> (Ω)] <sup>_Nr_</sup> defined as <u>1</u> _R_ _p_ ( _x_ ) _=_ _|ω_ _j_ _|_ _ω_ _j_ _i_ _∈Ij_ <u>1</u> _p_ ( _y_ ) _d y =_ _|ω_ _j_ _|_ _p_ _i_ _|Ci_ _|_ , _x ∈_ _ω_ _j_, _j_ _=_ 1,..., _Nω_, (2.3) where _|ω_ _j_ _|_ and _|Ci_ _|_ denote the volume of the indicated region and cell respectively. Note that <sup>�</sup> _i_ _∈Ij_ <sup>_|C_</sup> _i_ <sup>_| =_</sup> _|ω_ _j_ _|_ . The function _R_ _p_ is piecewise constant, but now varies on the coupling scale rather than the cell scale. One reasonable criteria to choosing the intermediate scale cells is to assume that the same reaction model _g_ _i_ is used for each cell _Ci_ in each coupling region _ω_ _j_ . We now replace the original _macroscale_ model problem (2.2) by   _u_ ˙ _−∇·_ _ϵ∇u = f_ ( _u_ ; _R_ _p_ ), ( _x_, _t_ ) _∈_ Ω _×_ (0, _T_ ],   _u_ ˙ _−∇·_ _ϵ∇u = f_ ( _u_ ; _R_ _p_ ), ( _x_, _t_ ) _∈_ Ω _×_ (0, _T_ ], _n ·_ _ϵ∇u =_ 0, ( _x_, _t_ ) _∈_ _∂_ Ω _×_ (0, _T_ ], (2.4)    _u_ ( _x_,0) _= u_ <sup>0</sup> ( _x_ ), _x ∈_ Ω, Next we note that in the original formulation, _p_ _i_ depends implicitly on the spatial variable _x_ (which has the role of a parameter) _inside_ each cell. To avoid this, we introduce a projection of _u_ into a space of functions that are constant on each cell. We let _P_ : _L_ <sup>2</sup> (Ω) _→_ R <sup>_NC_</sup> be a suitably chosen projection into functions that are piecewise constant on the cells and we replace (2.1) by - _p_ ˙ _i_ _=_ _g_ _i_ ( _P u_ ; _p_ _i_ ), _t ∈_ (0, _T_ ], _p_ _i_ (0) _=_ _p_ <sup>0</sup> _i_ <sup>,</sup> _i_ _=_ 1,..., _NC_, (2.5) When the exact spatial location of each cell is unavailable, as often is the case, we use a projection _P_ into the space of functions that are constant on the coupling scale domains _ω_ _j_, which also produces a function that is constant on each cell. 3. Multirate finite element methods In order to derive a variational a posteriori error estimate, we write the time discretization as a finite element method for a piecewise polynomial while using a common finite element method for spatial discretization. Combined with suitable quadrature formulas, the resulting approximations match standard finite difference schemes. _3.1._ _Variational formulation_ To this end, we let ( _·_, _·_ ) _X_ denote the inner product on _L_ <sup>2</sup> ( _X_ ) on a space _X_ with corresponding norm _∥·∥X_ and let _a_ ( _v_, _w_ ) denote the bilinear form _a_ ( _v_, _w_ ) _X_ _=_ ( _ϵ∇v_, _∇w_ ) _X_ . The subscript _X_ is dropped when _X_ _=_ Ω. Furthermore, we let _〈·_, _·〉C j_ denote the inner product on R <sup>_Nr_</sup> on cell _C j_ and let _〈·_, _·〉=_ <sup>�</sup> _i_ <sup>_N_</sup> _=_ <sup>_C_</sup> 1 <sup>_〈·_</sup> <sup>,</sup> <sup>_·〉Ci_</sup> <sup>.</sup> The corresponding norm is denoted by _∥·∥_, which is the same notation as for the _L_ <sup>2</sup> -norm, but it is obvious from the context which norm is intended. Furthermore, we write the right hand side functions _f_ and _g_ as functions of two variables, replacing ’;’ with ’,’. 4 t t2 t1 t0 ∆ t ∆ s x Figure 3.1: The PDE time steps ∆ _t_ (long horizontal lines) is allowed to depend on _t_ but not on _x_ . The ODE time steps ∆ _s_ (short horizontal lines) may depend on both _t_ and _x_ . We first write (2.5)-(2.4) in variational form: The solutions _p_ _i_ _∈_ [ _H_ <sup>1</sup> (0, _T_ )] <sup>_Nr_</sup> of (2.5) satisfy, - _T_ _〈_ _p_ ˙ _i_, _q_ _〉_ _dt =_ 0 - _T_ _〈_ _g_ _i_ ( _P u_, _p_ _i_ ), _q_ _〉_ _dt_, _∀_ _q_ _∈_ [ _L_ <sup>2</sup> (0, _T_ )] <sup>_Nr_</sup>, _i_ _=_ 1,..., _NC_, (3.1) 0 while the solution _u ∈_ _L_ <sup>2</sup> ((0, _T_ ); _H_ <sup>1</sup> (Ω)) satisfies, - _T_ ( ˙ _u_, _v_ ) _+ a_ ( _u_, _v_ ) _dt =_ 0 _3.2._ _A multirate finite element method_ - _T_ ( _f_ ( _u_, _R_ _p_ ), _v_ ) _dt_, _∀v ∈_ _L_ <sup>2</sup> ((0, _T_ ); _H_ <sup>1</sup> (Ω)). (3.2) 0 We solve the coupled system (2.5)-(2.4) using a discretization that allows different time steps to be used for the ODEs and the PDE. The discretization yields a nonlinear coupled system of discrete equations for the approximate solution that must be solved iteratively in practice. It is common to fix the number of iterations used for such coupled systems, which can significantly affect the properties of the resulting numerical solution. In the extreme case with no iteration, this represents a so-called explicit-implicit scheme. For the temporal discretization for the PDE, the time interval [0, _T_ ] is partitioned into _N_ subintervals 0 _= t_ 0 _< t_ 1 _< ··· < tN_ _= T_, and we denote each subinterval by _In =_ ( _tn−_ 1, _tn_ ] with length by ∆ _tn = tn −tn−_ 1. For the temporal mesh for the ODEs, each interval _In_ may be divided into _Mn_ subintervals by _tn−_ 1 _=_ _s_ 0, _n_ _< s_ 1, _n_ _< ··· < sMn_, _n_ _= tn_, where _Jm_, _n_ _=_ ( _sm−_ 1, _n_, _sm_, _n_ ] and is of length ∆ _sm_, _n_ _= sm_, _n −_ _sm−_ 1, _n_ . This is illustrated in Fig. 3.1. We also allow for different time steps in different cells, but the notation becomes very cumbersome so we do not indicate this. Moreover, we note that it is possible to let the individual _Nr_ ODE components have different time stepping as in [13], but this is not considered here. The space of polynomials of order _r_ is denoted P <sup>_r_</sup>, and we discretize all the _Nr_ ODE components _rp_ in the space of polynomials of degree _rp_, _Qm_, _n_ <sup>_=_</sup> <sup>{</sup> <sup>_q_</sup> <sup>(</sup> <sup>_t_</sup> <sup>) :</sup> <sup>_q_</sup> <sup>_|_</sup> _Im_, _n_ <sup>_∈_</sup> <sup>[P</sup> <sup>_rp_</sup> <sup>(</sup> <sup>_I_</sup> _m_, _n_ <sup>)]</sup> <sup>_Nr_</sup> <sup>}.</sup> <sup>We</sup> <sup>denote</sup> <sup>the</sup> <sup>space</sup> <sup>of</sup> functions _∪m_ <sup>_M_</sup> _=_ <sup>_n_</sup> 1 <sup>_Q_</sup> _rmp_, _n_ <sup>by</sup> <sup>_Q_</sup> _rnp_ <sup>.</sup> <sup>To</sup> <sup>simplify</sup> <sup>notation,</sup> <sup>we</sup> <sup>use</sup> <sup>the</sup> <sup>same</sup> <sup>order</sup> <sup>of</sup> <sup>polynomial</sup> <sup>in</sup> <sup>all</sup> <sup>cells,</sup> though this is not necessary. _rmp_, _n_ <sup>_=_</sup> <sup>{</sup> <sup>_q_</sup> <sup>(</sup> <sup>_t_</sup> <sup>) :</sup> <sup>_q_</sup> <sup>_|_</sup> _Im_, _n_ <sup>_∈_</sup> <sup>[P</sup> <sup>_rp_</sup> <sup>(</sup> <sup>_I_</sup> _m_, _n_ <sup>)]</sup> <sup>_Nr_</sup> <sup>}.</sup> <sup>We</sup> <sup>denote</sup> <sup>the</sup> <sup>space</sup> <sup>of</sup> functions _∪m_ <sup>_Mn_</sup> _m_ <sup>_M_</sup> _=_ <sup>_n_</sup> 1 <sup>_Q_</sup> _rp_ _m_, _n_ <sup>by</sup> <sup>_Q_</sup> For the PDE, we define a triangulation _Tn_ <sup>_h_</sup> For the PDE, we define a triangulation _Tn_ <sup>_h_</sup> <sup>of</sup> <sup>Ω</sup> <sup>on</sup> <sup>each</sup> <sup>interval</sup> <sup>_In_</sup> <sup>that</sup> <sup>is</sup> <sup>inconsistent</sup> <sup>with</sup> <sup>the</sup> coupling scale decomposition Ω _= ∪_ <sup>_N_</sup> _j_ _=_ <sup>_ω_</sup> 1 <sup>_ω_</sup> <sup>_j_</sup> <sup>:</sup> <sup>We</sup> <sup>let</sup> <sup>_T_</sup> _n_ <sup>_h_</sup> <sup>be</sup> <sup>hexahedral</sup> <sup>elements</sup> <sup>and</sup> <sup>let</sup> <sup>the</sup> <sup>coupling</sup> scale partition be the Voronoi tessellation defined by _Nω_ uniformly distributed random points in Ω, i.e. each _ω_ _j_ is a Voronoi cell [18]. An illustration of this tessellation can be seen in Fig. 3.2. Let _Vn_ <sup>_h_</sup> <sup>_⊂_</sup> <sup>_H_</sup> <sup>1(Ω)</sup> <sup>be</sup> <sup>the</sup> <sup>space</sup> <sup>_V_</sup> _n_ <sup>_h_</sup> <sup>_=_</sup> <sup>{</sup> <sup>_v_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_∈_</sup> <sup>_C_</sup> <sup>(Ω) :</sup> <sup>_v|K_</sup> <sup>_∈_</sup> <sup>P</sup> <sup>_r_</sup> <sup>(</sup> <sup>_K_</sup> <sup>),</sup> <sup>_K_</sup> <sup>_∈_</sup> <sup>_T_</sup> _n_ <sup>_h_</sup> <sup>}.</sup> <sup>To</sup> <sup>indicate</sup> <sup>the</sup> <sup>sizes</sup> <sup>of</sup> the elements in _Vn_ <sup>_h_</sup> <sup>,</sup> <sup>we</sup> <sup>introduce</sup> <sup>the</sup> <sup>mesh</sup> <sup>function</sup> <sup>_hK_</sup> <sup>_=_</sup> <sup>diam(</sup> <sup>_K_</sup> <sup>)</sup> <sup>for</sup> <sup>_K_</sup> <sup>_∈_</sup> <sup>_T_</sup> _n_ <sup>_h_</sup> <sup>and</sup> <sup>_h_</sup> <sup>_=_</sup> <sup>max</sup> <sup>_hK_</sup> <sup>.</sup> <sup>The</sup> <sup>_N_</sup> _j_ _=_ <sup>_ω_</sup> 1 <sup>_ω_</sup> <sup>_j_</sup> <sup>:</sup> <sup>We</sup> <sup>let</sup> <sup>_T_</sup> _n_ <sup>_h_</sup> Let _Vn_ <sup>_h_</sup> _n_ <sup>_h_</sup> <sup>_⊂_</sup> <sup>_H_</sup> <sup>1(Ω)</sup> <sup>be</sup> <sup>the</sup> <sup>space</sup> <sup>_V_</sup> _n_ <sup>_h_</sup> _n_ <sup>_h_</sup> <sup>_=_</sup> <sup>{</sup> <sup>_v_</sup> <sup>(</sup> <sup>_x_</sup> <sup>)</sup> <sup>_∈_</sup> <sup>_C_</sup> <sup>(Ω) :</sup> <sup>_v|K_</sup> <sup>_∈_</sup> <sup>P</sup> <sup>_r_</sup> <sup>(</sup> <sup>_K_</sup> <sup>),</sup> <sup>_K_</sup> <sup>_∈_</sup> <sup>_T_</sup> _n_ <sup>_h_</sup> _n_ <sup>_h_</sup> <sup>,</sup> <sup>we</sup> <sup>introduce</sup> <sup>the</sup> <sup>mesh</sup> <sup>function</sup> <sup>_hK_</sup> <sup>_=_</sup> <sup>diam(</sup> <sup>_K_</sup> <sup>)</sup> <sup>for</sup> <sup>_K_</sup> <sup>_∈_</sup> <sup>_T_</sup> _n_ <sup>_h_</sup> _n_ <sup>_h_</sup> <sup>and</sup> <sup>_h_</sup> <sup>_=_</sup> <sup>max</sup> <sup>_hK_</sup> <sup>.</sup> <sup>The</sup> 5 1 0.8 0.6 0.4 0.2 0 1 y 0.5 0 1 0.8 0.6 0.4 0.2 0 x Figure 3.2: Illustration of a Voronoi tessellation with _Nω =_ 4096. _n_ <sup>_ru_</sup> _=_ { _w_ ( _x_, _t_ ) : _w_ ( _x_, _t_ ) _=_ <sup>�</sup> <sup>_r_</sup> _i_ _=_ <sup>_u_</sup> approximation is in the space-time function space _Wn_ <sup>_ru_</sup> <sup>_r_</sup> _i_ _=_ <sup>_u_</sup> 0 <sup>_t_</sup> <sup>_i vi_</sup> <sup>(</sup> <sup>_x_</sup> <sup>),</sup> <sup>_vi_</sup> <sup>_∈_</sup> <sup>_V_</sup> _n_ <sup>_h_</sup> approximation is in the space-time function space _Wn_ <sup>_ru_</sup> _=_ { _w_ ( _x_, _t_ ) : _w_ ( _x_, _t_ ) _=_ <sup>�</sup> <sup>_r_</sup> _i_ _=_ <sup>_u_</sup> 0 <sup>_t_</sup> <sup>_i vi_</sup> <sup>(</sup> <sup>_x_</sup> <sup>),</sup> <sup>_vi_</sup> <sup>_∈_</sup> <sup>_V_</sup> _n_ <sup>_h_</sup> <sup>,</sup> <sup>(</sup> <sup>_x_</sup> <sup>,</sup> <sup>_t_</sup> <sup>)</sup> <sup>_∈_</sup> Ω _× In_ }. The functions in _Wn_ <sup>_ru_</sup> and _Qrnp_ <sup>are</sup> <sup>discontinuous</sup> <sup>at</sup> <sup>time</sup> <sup>nodes,</sup> <sup>and</sup> <sup>we</sup> <sup>denote</sup> <sup>the</sup> <sup>jump</sup> <sup>across</sup> <sup>a</sup> time nodes _ti_ by [ _v_ ] _i_ _= vi_ <sup>_+_</sup> <sup>_−_</sup> <sup>_v_</sup> _i_ <sup>_−_</sup> <sup>,</sup> <sup>where</sup> <sup>_v_</sup> _i_ <sup>_±_</sup> <sup>_=_</sup> <sup>lim</sup> <sup>_t_</sup> <sup>_→t_</sup> _i_ <sup>_±_</sup> <sup>_v_</sup> <sup>(</sup> <sup>_t_</sup> <sup>).</sup> <sup>Finally in order to evaluate Galerkin orthogo-</sup> The functions in _Wn_ <sup>_ru_</sup> _n_ <sup>_ru_</sup> and _Q_ _i_ <sup>_−_</sup> <sup>,</sup> <sup>where</sup> <sup>_v_</sup> _i_ <sup>_±_</sup> _i_ <sup>_+_</sup> <sup>_−_</sup> <sup>_v_</sup> _i_ <sup>_−_</sup> _i_ <sup>_±_</sup> <sup>_=_</sup> <sup>lim</sup> <sup>_t_</sup> <sup>_→t_</sup> _i_ <sup>_±_</sup> time nodes _ti_ by [ _v_ ] _i_ _= vi_ <sup>_+_</sup> <sup>_−_</sup> <sup>_v_</sup> _i_ <sup>_−_</sup> <sup>,</sup> <sup>where</sup> <sup>_v_</sup> _i_ <sup>_±_</sup> <sup>_=_</sup> <sup>lim</sup> <sup>_t_</sup> <sup>_→t_</sup> _i_ <sup>_±_</sup> <sup>_v_</sup> <sup>(</sup> <sup>_t_</sup> <sup>).</sup> <sup>Finally in order to evaluate Galerkin orthogo-</sup> nality, we use the following projection operators into the discrete spaces: Π _n_ : _L_ <sup>2</sup> (Ω) _→_ _Vn_ <sup>_h_</sup> <sup>,</sup> (3.3) _π_ <sup>_u_</sup> _n_ <sup>:</sup> <sup>_L_</sup> <sup>2(</sup> <sup>_In_</sup> <sup>)</sup> <sup>_→_</sup> <sup>P</sup> <sup>_ru_</sup> <sup>(</sup> <sup>_In_</sup> <sup>),</sup> (3.4) _π_ _m_ <sup>_p_</sup>, _n_ <sup>: [</sup> <sup>_L_</sup> <sup>2(</sup> <sup>_I_</sup> _m_, _n_ <sup>)]</sup> <sup>_Nr_</sup> <sup>_→_</sup> <sup>[P</sup> <sup>_rp_</sup> <sup>(</sup> <sup>_I_</sup> _m_, _n_ <sup>)]</sup> <sup>_Nr_</sup> <sup>.</sup> (3.5) Note that _π_ <sup>_u_</sup> _n_ <sup>_u_</sup> _n_ <sup>Π</sup> <sup>_n =_</sup> <sup>Π</sup> <sup>_nπu_</sup> _n_ <sup>_u_</sup> _n_ <sup>:</sup> <sup>_L_</sup> <sup>2(Ω</sup> <sup>_× In_</sup> <sup>)</sup> <sup>_→_</sup> <sup>_W_</sup> _n_ <sup>_ru_</sup> Note that _π_ <sup>_u_</sup> _n_ <sup>Π</sup> <sup>_n =_</sup> <sup>Π</sup> <sup>_nπu_</sup> _n_ <sup>:</sup> <sup>_L_</sup> <sup>2(Ω</sup> <sup>_× In_</sup> <sup>)</sup> <sup>_→_</sup> <sup>_W_</sup> _n_ <sup>_ru_</sup> <sup>.</sup> The multirate finite element method now reads: For all cells in _C_ and for each time interval _n_ _=_ _rp_ 1,..., _N_, find _P_ _∈_ _Qm_, _n_ <sup>for</sup> <sup>_m =_</sup> <sup>1,...,</sup> <sup>_M_</sup> _n_ <sup>such that</sup> - _〈_ _g_ ( _P U_, _P_ ), _q_ _〉_ _dt_, _∀_ _q_ _∈_ _Q_ _Im_, _n_ _rp_ _m_, _n_ <sup>,</sup> (3.6) _Im_, _n_ _〈_ _P_ <sup>˙</sup>, _q_ _〉_ _dt +〈_ [ _P_ ] _m−_ 1, _n_, _q_ <sup>_+_</sup> _〉=_ with _P_ <sup>0</sup> <sup>_−_</sup> _=_ _p_ <sup>0</sup> . Note that there are _NC_ ODE systems in (3.6). The PDE discretization is: Find _U_ _∈_ _Wn_ <sup>_ru_</sup> such that _In_ _In_ ( _U_ <sup>˙</sup>, _v_ ) _+ a_ ( _U_, _v_ ) _dt +_ ([ _U_ ] _n−_ 1, _v_ <sup>_+_</sup> ) _=_ ( _f_ ( _U_, _R_ _P_ ), _v_ ) _dt_, _∀v ∈_ _Wn_ <sup>_ru_</sup> <sup>,</sup> (3.7) where _U_ 0 <sup>_−_</sup> <sup>_=_</sup> <sup>Π0</sup> <sup>_u_</sup> <sup>0.</sup> Note that if we use _rp_ _= ru =_ 0 with a left-hand rectangle rule for time integrals and employ a standard “lumped-mass” quadrature rule in space (trapezoidal rule on elements), then we obtain a standard difference approximation consisting of the implicit Euler in time and 5 point stencil difference scheme in space [8]. _3.3._ _Practical discretization considerations_ There are additional considerations for discretization that are used in practice. 6 _Evaluation of the recovery operator_ The definition of the recovery operator _R_ in (2.3) requires the solution of the cell reaction equations (2.5) on all _NC_ cells. We expect _NC_ to be very large, e.g. on the order of millions to billions. At the same time, we expect that the physical properties of cells vary over the macroscale rather than microscale, so it is inefficient to solve (2.5) on every cell. We approximate _R_ by an average _R_ <sup>�</sup> computed using a Monte Carlo sampling approach with a (relatively small) sample of the problems (2.5). As a consequence, we replace the PDE equation (3.7) by: Find _U_ _∈_ _Wn_ <sup>_ru_</sup> such that Find _U_ _∈_ _Wn_ <sup>_ru_</sup> such that - ( _f_ ( _U_, _R_ <sup>�</sup> _P_ ), _v_ ) _dt_, _∀v ∈_ _Wn_ <sup>_ru_</sup> _In_ _In_ ( _U_ <sup>˙</sup>, _v_ ) _+ a_ ( _U_, _v_ ) _dt +_ ([ _U_ ] _n−_ 1, _v_ <sup>_+_</sup> ) _=_ _n_ <sup>_ru_</sup> <sup>,</sup> (3.8) where _U_ 0 <sup>_−_</sup> <sup>_=_</sup> <sup>Π0</sup> <sup>_u_</sup> <sup>0.</sup> There are two ways to compute the samples. First, we can sample in the spatial variable _x_, so for _x ∈_ _ω_ _j_, _R_ - _p_ ( _x_ ) _=_ _K_ <sup><u>1</u></sup> _j_ _K j_ - _p_ ( _x j_, _k_ ), (3.9) _k=_ 1 where { _x j_, _k_ } _K j_ _k=_ 1 <sup>is</sup> <sup>a</sup> <sup>set</sup> <sup>of</sup> <sup>_K j_</sup> <sup>points</sup> <sup>chosen</sup> <sup>at</sup> <sup>random</sup> <sup>in</sup> <sup>_ω_</sup> <sup>_j_</sup> <sup>,</sup> <sup>for</sup> <sup>each</sup> <sup>_j_</sup> <sup>_=_</sup> <sup>1,...,</sup> <sup>_Nω_</sup> <sup>.</sup> <sup>In</sup> <sup>this</sup> <sup>approach,</sup> _K j_ we solve the reaction model (2.5) only in cells located at { _x j_, _k_ } _k=_ 1 <sup>.</sup> <sup>This</sup> <sup>means</sup> <sup>that</sup> <sup>the</sup> <sup>average</sup> <sup>is</sup> <sup>af-</sup> fected by by physical size of the cells, since bigger cells contribute more samples with some probability. Alternatively, we can sample by choosing cell indices at random, so for _x ∈_ _ω_ _j_, we solve the reaction model (2.5) only in cells located at { _x j_, _k_ } _R_ - _p_ ( _x_ ) _=_ _K_ <sup><u>1</u></sup> _j_ _K j_ _k=_ 1 _p_ _ik_, (3.10) where { _ik_ } is a randomly selected subset of _Ij_ . In the second approach, the cell average is not affected by the size of the cell. Note that this Monte Carlo computation has the property that the computation is actually exact if sufficiently many samples are used, since there are only _NC_ different values. However for very large _NC_ and reasonably small numbers of samples, the convergence of the Monte Carlo approximations appears to behave according to the standard asymptotic results, so that the accuracy is roughly proportional to the variance of the integrand divided by the square root of the number of samples. Since we want to use relatively few samples, this indicates that the coupling regions _ω_ _j_ should be chosen so that the variance of the integrand defining _R_ has small variance. _Iterative solution of the nonlinear discrete equations_ In general, (3.6)-(3.8) presents a nonlinear coupled discrete system that is solved iteratively in practice. We describe a simple fixed point iteration. We use the superscript _ℓ_ to denote the iteration number and assume that we carry out _Ln_ total iterations on each time step. In practice, we may vary the number of iterations in each cell and for the PDE, but we suppress that notation. The fixed point - finite element method can be formulated on time interval _In_ as: Given _P_ <sup>0</sup> _=_ _P_ ( _tn−_ 1) and _U_ <sup>0</sup> _= U_ ( _x_, _tn−_ 1), for each cell find _P_ <sup>_ℓ_</sup> _∈_ _Qrmp_, _n_ <sup>for</sup> <sup>_m =_</sup> <sup>1,...,</sup> <sup>_M_</sup> _n_ on _In_ such that _Im_, _n_ _〈_ _P_ <sup>˙</sup> <sup>_ℓ_</sup>, _q_ _〉_ _dt +〈_ ( _P_ <sup>_ℓ+_</sup> _−_ _P_ <sup>_−_</sup> ) _|m−_ 1, _n_, _q_ _m_ <sup>_+_</sup> _−_ 1, _n_ <sup>_〉=_</sup> _Im_, _n_ _〈_ _g_ ( _P U_ <sup>_ℓ−_</sup> <sup>1</sup>, _P_ <sup>_ℓ_</sup> ), _q_ _〉_ _dt_, _∀_ _q_ _∈_ _Q_ _rp_ _m_, _n_ <sup>.</sup> (3.11) 7 Then, given _P_ <sup>_ℓ_</sup> on _In_, find _U_ <sup>_ℓ_</sup> _∈_ _Wn_ <sup>_ru_</sup> such that _In_ ( _U_ <sup>˙</sup> <sup>_ℓ_</sup>, _v_ ) _+ a_ ( _U_ <sup>_ℓ_</sup>, _v_ ) _dt +_ (( _U_ <sup>_ℓ+_</sup> _−U_ <sup>_−_</sup> ) _|n−_ 1, _vn_ <sup>_+_</sup> _−_ 1 <sup>)</sup> _=_ _In_ ( _f_ ( _U_ <sup>_ℓ_</sup>, _R_ <sup>�</sup> _P_ <sup>_ℓ_</sup> ), _v_ ) _dt_, _∀v ∈_ _Wn_ <sup>_ru_</sup> <sup>,</sup> (3.12) given _U_ <sup>0</sup> . We iterate (3.11) and (3.12) for _ℓ_ _=_ 1,..., _Ln_, set _P_ _n_ <sup>_−_</sup> <sup>_=_</sup> <sup>_P_</sup> <sup>_Ln_</sup> <sup>(</sup> <sup>_tn_</sup> <sup>)</sup> <sup>and</sup> <sup>_U −_</sup> _n_ <sup>_= U Ln_</sup> <sup>(</sup> <sup>_tn_</sup> <sup>)</sup> <sup>to</sup> <sup>form</sup> <sup>the</sup> data for the next interval. _n_ <sup>_−_</sup> <sup>_=_</sup> <sup>_P_</sup> <sup>_Ln_</sup> <sup>(</sup> <sup>_tn_</sup> <sup>)</sup> <sup>and</sup> <sup>_U −_</sup> _n_ given _U_ <sup>0</sup> . We iterate (3.11) and (3.12) for _ℓ_ _=_ 1,..., _Ln_, set _P_ _n_ <sup>_−_</sup> In this iterative formulation, we are “lagging” the values of the PDE model _U_ in the cell reaction model, but treat the remaining nonlinear problems for _P_ <sup>_ℓ_</sup> and _U_ <sup>_ℓ_</sup> implicitly. This entails using an additional nonlinear solver for each model equation. However, we do not indicate this in the notation as these problems can typically be solved very accurately, e.g. using a standard Newton method. _An implicit-explicit method_ In practice, the iterative formulation (3.11)-(3.12) is often solved for only one iteration _Ln =_ 1, yield _rp_ ing an “implicit-explicit” method. This is: For _n =_ 1,..., _N_, find _P_ _∈_ _Qm_, _n_ <sup>for</sup> <sup>_m =_</sup> <sup>1,...,</sup> <sup>_M_</sup> _n_ <sup>such that</sup> _rp_ ing an “implicit-explicit” method. This is: For _n =_ 1,..., _N_, find _P_ _∈_ _Qm_, _n_ <sup>for</sup> <sup>_m =_</sup> <sup>1,...,</sup> <sup>_M_</sup> _n_ <sup>such that</sup> - _Im_, _n_ _rp_ _m_, _n_ <sup>,</sup> (3.13) _Im_, _n_ _〈_ _P_ <sup>˙</sup>, _q_ _〉_ _dt +〈_ [ _P_ ] _m−_ 1, _n_, _q_ <sup>_+_</sup> _〉=_ _〈_ _g_ ( _P Un−_ 1, _P_ ), _q_ _〉_ _dt_, _∀_ _q_ _∈_ _Q_ with _P_ <sup>0</sup> <sup>_−_</sup> _=_ _p_ <sup>0</sup> . Then find _U_ _∈_ _Wn_ <sup>_ru_</sup> Then find _U_ _∈_ _Wn_ <sup>_ru_</sup> such that _In_ _In_ ( _U_ <sup>˙</sup>, _v_ ) _+ a_ ( _U_, _v_ ) _dt +_ ([ _U_ ] _n−_ 1, _v_ <sup>_+_</sup> ) _=_ ( _f_ ( _U_, _R_ <sup>�</sup> _P_ ), _v_ ) _dt_, _∀v ∈_ _Wn_ <sup>_ru_</sup> <sup>,</sup> (3.14) where _U_ 0 <sup>_−_</sup> <sup>_=_</sup> <sup>Π0</sup> <sup>_u_</sup> <sup>0.</sup> <sup>The scheme is said to be explicit-implicit due to the use of explicit use of</sup> <sup>_Un−_</sup> <sup>1</sup> <sup>when</sup> solving for _P_ on _In_, while _Un_ is solved implicitly. 4. A posteriori error analysis In this section, we derive adjoint-based error representation formulas for the methods above. Using these formulas, we derive indicators of local contributions to the global error that can serve as the basis for an adaptive method. Ignoring the effect of iteration in the solution of the discrete equations, there are three discretization parameters that affec the numerical accuracy, namely the spatial mesh size, the time steps for the PDE, and the time steps for the ODEs. In addition, there is a choice of the projection and recovery operators. We present error indicators that distinguish the relative contributions of these choices to the global error. For the iterative method, there is the additional parameter of number of iterations per time step. We begin by noting that since the right hand side of (3.13) involves the solution _Un−_ 1 from the previous time step and since the right hand side of (3.14) involves the approximation _R_ <sup>�</sup>, there is an error arising from operator decomposition [5] due the differences _U_ and _Un−_ 1 as well as a modeling error due to the differences between _R_ and _R_ <sup>�</sup> . _4.1._ _Preliminaries_ The adjoint to the function spaces presented is denoted by the superscript _∗_ . The same notation is used for the adjoint operators, as noted in the following identities ( _v_, _R_ _q_ ) _= 〈R_ <sup>_∗_</sup> _v_, _q_ _〉_, (4.1) _〈P v_, _q_ _〉=_ ( _v_, _P_ <sup>_∗_</sup> _q_ ), (4.2) 8 which hold for any _q_ _∈_ _Q_ _rmp_, _n_ <sup>and</sup> <sup>_v ∈_</sup> <sup>_W_</sup> _n_ <sup>_ru_</sup> which hold for any _q_ _∈_ _Qm_, _n_ <sup>and</sup> <sup>_v ∈_</sup> <sup>_W_</sup> _n_ <sup>_ru_</sup> <sup>.</sup> We define the residuals, the linearizations of the functions _f_ and _g_ and state the adjoint problems. The derivation of the theorems follow in the next Section. _rp_ _∗_ Definition 4.1. _Let_ _the_ _residuals_ _corresponding_ _to_ (3.13) _and_ (3.14) _be_ _denoted_ _by_ _R_ _p_ ( _P_ ) _∈_ _Qm_, _n_ <sup>_and_</sup> _Ru_, _K_ ( _U_, _P_ ) _∈_ _Wn_ <sup>_ru_</sup> <sup>_∗_</sup> _._ _These are defined by_ Definition 4.1. _Let_ _the_ _residuals_ _corresponding_ _to_ (3.13) _and_ (3.14) _be_ _denoted_ _by_ _R_ _p_ ( _P_ ) _∈_ _Q_ _n_ <sup>_ru_</sup> <sup>_∗_</sup> _._ _These are defined by_ _Im_, _n_ _〈_ _R_ _p_ ( _P_ ), _q_ _〉_ _dt =_ _〈_ _g_ ( _P Un−_ 1, _P_ ) _−_ _P_ <sup>˙</sup>, _q_ _〉_ _dt −〈_ [ _P_ ] _m−_ 1, _n_, _q_ _m_ <sup>_+_</sup> _−_ 1, _n_ <sup>_〉_</sup> <sup>,</sup> (4.3) _Im_, _n_ _Im_, _n_ - _Im_, _n_ _〈_ _R_ _p_ ( _P_ ), _q_ _〉_ _dt =_ _〈_ _g_ ( _P Un−_ 1, _P_ ) _−_ _P_ <sup>˙</sup>, _q_ _〉_ _dt −〈_ [ _P_ ] _m−_ 1, _n_, _q_ _m_ <sup>_+_</sup> _In_ _In_ ( _Ru_, _K_ ( _U_, _P_ ), _v_ ) _K_ _dt =_ ( _f_ ( _U_, _R_ <sup>�</sup> _P_ ) _−U_ <sup>˙</sup> _+∇·_ _ϵ∇U_, _v_ ) _K_ _−_ 2 <sup><u>1</u></sup> <sup>([</sup> <sup>_n ·_</sup> <sup>_ϵ∇U_</sup> <sup>],</sup> <sup>_v_</sup> <sup>)</sup> <sup>_∂K_</sup> <sup>\</sup> <sup>_∂_</sup> <sup>Ω</sup> <sup>_dt −_</sup> <sup>([</sup> <sup>_U_</sup> <sup>]</sup> <sup>_n−_</sup> <sup>1,</sup> <sup>_v_</sup> _n_ <sup>_+_</sup> _−_ 1 <sup>)</sup> <sup>_K_</sup> <sup>.</sup> (4.4) Definition 4.2. _The linearizations of_ _f_ _and_ _g_ _are defined as_ _fu =_ _f_ _p =_ _<u>g</u>_ _u_ _=_ _<u>g</u>_ _p_ _=_ - 1 0 �� 1 0 �� 1 0 �� 1 0 _∂_ _<u>f</u>_ _∂u_ <sup>(</sup> <sup>_us +U_</sup> <sup>(1</sup> <sup>_−_</sup> <sup>_s_</sup> <sup>),</sup> <sup>_R_</sup> <sup>_p_</sup> <sup>_s +_</sup> <sup>_R_</sup> <sup>_P_</sup> <sup>(1</sup> <sup>_−_</sup> <sup>_s_</sup> <sup>))</sup> <sup>_ds_</sup> <sup>,</sup> (4.5) _∂_ _<u>g</u>_ _<u>i</u>_ _∂_ _p_ _j_ _∂_ _<u>f</u>_ _∂R_ _p_ _j_ - _Nr_ _j_ _=_ 1 ( _us +U_ (1 _−_ _s_ ), _R_ _p_ _s +_ _R_ _P_ (1 _−_ _s_ )) _ds_ , (4.6) - _Nr_ _∂_ _<u>g</u>_ _<u>i</u>_ _∂P u_ <sup>(</sup> <sup>_P us +_</sup> <sup>_P U_</sup> <sup>(1</sup> <sup>_−_</sup> <sup>_s_</sup> <sup>),</sup> <sup>_p_</sup> <sup>_s +_</sup> <sup>_P_</sup> <sup>(1</sup> <sup>_−_</sup> <sup>_s_</sup> <sup>))</sup> <sup>_ds_</sup> _i_ _=_ 1 , (4.7) . (4.8) ( _P us +_ _P U_ (1 _−_ _s_ ), _p_ _s +_ _P_ (1 _−_ _s_ )) _ds_ - _Nr_ _i_, _j_ _=_ 1 _4.2._ _Adjoint problems_ The definition of an appropriate adjoint problem for a multiscale model is a problematic issue [5]. First of all, there are a number of possible adjoint problems that can be associated with any nonlinear differential equation. In addition, it may be reasonable to account for the use of projections between scales and representations and the effects of a finite number of iterations in the definition. Another issue is the computational difficulty and cost required in the numerical solution of the adjoint. We consider two different adjoint problems that present a tradeoff between accuracy of the resulting estimates on one hand and the cost and practicality of implementation on the other. The first approach is closely related to the ideal adjoint of the coupled system (3.1)-(3.2) treated by an implicit discretization, a so-called “implicit adjoint”. This choice leads to a robustly accurate error estimate, but the cost is that the linear adjoint problem is nearly as difficult to solve numerically as the original multiscale model. As an alternative, we define a second adjoint problem that uses the same decomposition and finite iterations as used in the forward model. This approach is much more computationally tractable, however the resulting error estimate includes terms that cannot be estimated. It is possible to show that these terms are relative small compared to the terms that can be estimated in the limit of refined discretization however. _4.3._ _Fully implicit adjoint problem and error representation formula_ The ideal fully implicit adjoint reads: For _n_ _= N_,...,1, find _φ_ <sup>�</sup> _p_ ( _t_ ) _∈_ [ _L_ <sup>2</sup> ( _Im_, _n_ )] <sup>_Nr_</sup> on _m_ _=_ 1,..., _Mn_ and _φ_ <sup>�</sup> _u_ ( _x_, _t_ ) _∈_ _L_ <sup>2</sup> ( _In_ ; _H_ <sup>1</sup> (Ω)) such that _Im_, _n_ _〈_ _q_, _−_ _φ_ <sup>�˙</sup> _p_ _〉−〈_ _q_, _<u>g</u>_ _p_ _~~∗~~_ _φ_ - _p +_ _R∗_ _f_ _p_ 9 _<u>∗φ</u>_ - _u〉_ _dt =_ _Im_, _n_ _〈_ _q_, _ψ_ _p_ _〉_ _dt_ (4.9) and _In_ ( _v_, _ψu_ ) _dt_, (4.10) _In_ ( _v_, _−φ_ <sup>�˙</sup> _u_ ) _+ a_ ( _v_, _φ_ <sup>�</sup> _u_ ) _−_ ( _v_, _fu_ _<u>∗φ</u>_ - _u +_ _P ∗gu_ _~~∗~~_ _φ_ - _p_ ) _dt =_ where _ψu_ _∈_ _L_ <sup>2</sup> (Ω) and _ψ_ _p_ _∈_ [ _L_ <sup>2</sup> (Ω)] <sup>_Nr_</sup> are given data that determine the quantity of interest to be computed. The initial conditions for the adjoint problem are _φ_ <sup>�</sup> _u_ ( _x_, _T_ ) _=_ 0 and _φ_ <sup>�</sup> _p_ ( _T_ ) _=_ 0 . Next we derive the error representation formula corresponding to this fully implicit adjoint problem. Theorem 4.1 (Error representation formula) . _Let the quantity of interest be the linear functional m_ ( _u_, _p_ ) _be defined by the functions ψu ∈_ _L_ <sup>2</sup> (Ω) _and_ _ψ_ _p_ _∈_ [ _L_ <sup>2</sup> (Ω)] <sup>_Nr_</sup> _such that m_ ( _u_, _p_ ) _=_ �0 _T_ <sup>(</sup> <sup>_u_</sup> <sup>,</sup> <sup>_ψu_</sup> <sup>)</sup> <sup>_+〈_</sup> <sup>_p_</sup> <sup>,</sup> <sup>_ψ_</sup> <sup>_p_</sup> <sup>_〉_</sup> <sup>_dt._</sup> _The error representation formula for the error E_ ( _U_, _P_ ) _= |m_ ( _u_, _p_ ) _−_ _m_ ( _U_, _P_ ) _| reads_ _N_ ��� _n=_ 1 (4.11) ��� _E_ ( _U_, _P_ ) _=_ _=_ _In_ ( _eu_, _ψu_ ) _+〈_ _e_ _p_, _ψ_ _p_ _〉_ _dt_ _N_ ��� _I +_ _n=_ 1 _N_ ��� _I +_ ( _I In + I I In + IVn +_ _Vn +_ _VIn_ )���, (4.12) _where_ (4.13) _I_ _=_ ( _u_ <sup>0</sup> _−_ Π0 _u_ <sup>0</sup>, _φ_ <sup>�</sup> _u_,0), ( _Ru_, _K_ ( _U_, _P_ ), _φ_ <sup>�</sup> _u −_ Π _nπ_ <sup>_u_</sup> _n_ <sup>_φ_</sup> <sup>�</sup> <sup>_u_</sup> <sup>)</sup> <sup>_K_</sup> <sup>_dt_</sup> <sup>,</sup> (4.14) ( _Ru_, _K_ ( _U_, _P_ ), _φ_ <sup>�</sup> _u −_ Π _nπ_ <sup>_u_</sup> _n_ _I In =_ _I I In =_ _IVn =_ _Vn =_ _K ∈Tn_ <sup>_h_</sup> _In_ _In_ _Mn_ _m=_ 1 _In_ _Im_, _n_ (4.15) _〈_ _R_ _p_ ( _P_ ), _φ_ <sup>�</sup> _p −_ _π_ _m_ <sup>_p_</sup>, _n_ <sup>_φ_</sup> <sup>�</sup> _p_ <sup>_〉_</sup> <sup>_dt_</sup> <sup>,</sup> _〈_ _R_ _p_ ( _P_ ), _φ_ <sup>�</sup> _p −_ _π_ _m_ <sup>_p_</sup> _I_ ( _f_ ( _U_, _R_ _P_ ) _−_ _f_ ( _U_, _R_ <sup>�</sup> _P_ ), _φ_ <sup>�</sup> _u_ ) _dt_, (4.16) _〈_ _g_ ( _P U_, _P_ ) _−_ _g_ ( _P Un−_ 1, _P_ ), _φ_ <sup>�</sup> _p_ _〉_ _dt_ . (4.17) The first term is the contribution from error in the initial data for the PDE. The second and the third terms quantify the contributions of the discretization of the PDE and the ODEs respectively. The fourth term quantifies the contribution of the recovery operator and the fifth term is the contribution of the explicit splitting scheme. _Proof._ Introducing the errors _eu = u −U_ and _e_ _p =_ _p_ _−_ _P_, we use the chain rule identities to obtain, _〈_ _<u>g</u>_ _uP eu +_ _<u>g</u>_ _p_ _<u>e</u>_ _p_, _q_ _〉= 〈_ _g_ ( _P u_, _p_ ) _−_ _g_ ( _P U_, _P_ ), _q_ _〉_, (4.18) ( _fueu +_ _f_ _p_ _R_ _e_ _p_, _v_ ) _=_ ( _f_ ( _u_, _R_ _p_ ) _−_ _f_ ( _U_, _R_ _P_ ), _v_ ). (4.19) Note that (4.18) holds on each _Im_, _n_ whereas (4.19) holds on each _In_ . Furthermore, by the continuity of _u_, _eu_ <sup>_+_</sup>,( _u_ <sup>_+_</sup>,( _m−_ 1, _n_ ) <sup>_= u_</sup> _m_ <sup>_+_</sup> _m_ <sup>_+_</sup> _−_ 1, _n_ <sup>_−U +_</sup> _m_ <sup>_+_</sup> _m−_ 1, _n_ <sup>_=_</sup> <sup>(</sup> <sup>_u_</sup> _m_ <sup>_−_</sup> _m_ <sup>_−_</sup> _−_ 1, _n_ <sup>_−U −_</sup> _m_ <sup>_−_</sup> _m−_ 1, _n_ <sup>)</sup> <sup>_−_</sup> <sup>(</sup> <sup>_U +_</sup> _m_ <sup>_+_</sup> _m−_ 1, _n_ <sup>_−U −_</sup> _m_ <sup>_−_</sup> _m−_ 1, _n_ <sup>)</sup> (4.20) _= eu_ <sup>_−_</sup>,( _m−_ 1, _n_ ) <sup>_−_</sup> <sup>[</sup> <sup>_U_</sup> <sup>]</sup> <sup>_m−_</sup> <sup>1,</sup> <sup>_n_</sup> <sup>.</sup> Similarly, _e_ <sup>_+_</sup> _p_ <sup>_+_</sup> _p_,( _m−_ 1, _n_ ) <sup>_=_</sup> <sup>_e_</sup> <sup>_−_</sup> _p_ <sup>_−_</sup> _p_,( _m−_ 1, _n_ ) <sup>_−_</sup> <sup>[</sup> <sup>_P_</sup> <sup>]</sup> <sup>_m−_</sup> <sup>1,</sup> <sup>_n_</sup> <sup>.</sup> (4.21) 10 Now substituting _e_ _p_ for _q_ in (4.9) and applying integration by parts we arrive at, _〈_ _e_ _p_, _−_ _φ_ <sup>�˙</sup> _p_ _〉−〈_ _e_ _p_, _<u>g</u>_ _p_ _~~∗~~_ _φ_ - _p +_ _R∗_ _f_ _p_ _<u>∗φ</u>_ - _u〉_ _dt_ _〈_ _e_ _p_, _ψ_ _p_ _〉_ _dt =_ _Im_, _n_ _Im_, _n_ _= −〈_ _e_ <sup>_−_</sup> _p_ <sup>_−_</sup> _p_ <sup>,</sup> <sup>_φ_</sup> <sup>�</sup> <sup>_p_</sup> <sup>_〉m−_</sup> <sup>1,</sup> <sup>_n +〈_</sup> <sup>_e_</sup> <sup>_+_</sup> _p_ <sup>_+_</sup> _p_ <sup>,</sup> <sup>_φ_</sup> <sup>�</sup> <sup>_p_</sup> <sup>_〉m−_</sup> <sup>1,</sup> <sup>_n_</sup> _+_ _Im_, _n_ _〈_ _e_ ˙ _p_, _φ_ <sup>�</sup> _p_ _〉−〈_ _<u>g</u>_ _p_ _<u>e</u>_ _p_, _φ_ <sup>�</sup> _p_ _〉_ _dt −_ _Im_, _n_ _〈_ _f_ _p_ _R_ _e_ _p_, _φ_ <sup>�</sup> _u〉_ _dt_ Now we apply (4.21), _〈_ _e_ _p_, _ψ_ _p_ _〉_ _dt = −〈_ _e_ <sup>_−_</sup> _p_ <sup>_−_</sup> _p_ <sup>,</sup> <sup>_φ_</sup> <sup>�</sup> <sup>_p_</sup> <sup>_〉m−_</sup> <sup>1,</sup> <sup>_n −〈_</sup> <sup>[</sup> <sup>_P_</sup> <sup>]</sup> <sup>_m−_</sup> <sup>1,</sup> <sup>_n_</sup> <sup>,</sup> <sup>_φ_</sup> <sup>�</sup> <sup>_p_</sup> <sup>,(</sup> <sup>_m−_</sup> <sup>1,</sup> <sup>_n_</sup> <sup>)</sup> <sup>_〉_</sup> _Im_, _n_ <sup>_−_</sup> _p_ <sup>,</sup> <sup>_φ_</sup> <sup>�</sup> <sup>_p_</sup> <sup>_〉m_</sup> <sup>,</sup> <sup>_n +〈_</sup> <sup>_e_</sup> <sup>_−_</sup> _p_ <sup>,</sup> _〈_ _e_ ˙ _p_, _φ_ <sup>�</sup> _p_ _〉−〈_ _<u>g</u>_ _p_ _<u>e</u>_ _p_, _φ_ <sup>�</sup> _p_ _〉−〈_ _f_ _p_ _R_ _e_ _p_, _φ_ <sup>�</sup> _u〉_ _dt_ . _+_ A similar computation for _eu_ leads to, _Im_, _n_ ( _eu_, _ψu_ ) _dt = −_ ( _eu_ <sup>_−_</sup> <sup>,</sup> _u_ <sup>_−_</sup> <sup>, �</sup> <sup>_φu_</sup> <sup>)</sup> <sup>_n−_</sup> <sup>1</sup> <sup>_−_</sup> <sup>([</sup> <sup>_U_</sup> <sup>]</sup> <sup>_n−_</sup> <sup>1, �</sup> <sup>_φu_</sup> <sup>,(</sup> <sup>_n−_</sup> <sup>1))</sup> _In_ _u_ <sup>_−_</sup> <sup>, �</sup> <sup>_φu_</sup> <sup>)</sup> <sup>_n +_</sup> <sup>(</sup> <sup>_e_</sup> _u_ <sup>_−_</sup> (˙ _eu_, _φ_ <sup>�</sup> _u_ ) _+ a_ ( _eu_, _φ_ <sup>�</sup> _u_ ) _−_ ( _fueu_, _φ_ <sup>�</sup> _u_ ) _−_ ( _<u>guP eu</u>_, _φ_ <sup>�</sup> _p_ ) _dt_ . _+_ _In_ Summing (4.23) over all _m_, combining it with (4.24) and using (4.18) and (4.19) leads to, ( _eu_, _ψu_ ) _+〈_ _e_ _p_, _ψ_ _p_ _〉_ _dt = −〈_ _e_ <sup>_−_</sup> _p_ _u_ <sup>_−_</sup> <sup>, �</sup> <sup>_φu_</sup> <sup>)</sup> <sup>_n_</sup> _In_ <sup>_−_</sup> _p_ <sup>,</sup> <sup>_φ_</sup> <sup>�</sup> <sup>_p_</sup> <sup>_〉n −_</sup> <sup>(</sup> <sup>_e_</sup> _u_ <sup>_−_</sup> <sup>,</sup> _+〈_ _e_ <sup>_−_</sup> _p_ <sup>_−_</sup> _p_ <sup>,</sup> <sup>_φ_</sup> <sup>�</sup> <sup>_p_</sup> <sup>_〉n−_</sup> <sup>1</sup> <sup>_+_</sup> <sup>(</sup> <sup>_e_</sup> _u_ <sup>_−_</sup> _u_ <sup>_−_</sup> <sup>, �</sup> <sup>_φu_</sup> <sup>)</sup> <sup>_n−_</sup> <sup>1</sup> <sup>_+_</sup> _Mn_ _m=_ 1 _−〈_ [ _P_ ] _m−_ 1, _n_, _φ_ <sup>�</sup> _p_,( _m−_ 1, _n_ ) _〉_ (˙ _eu_, _φ_ <sup>�</sup> _u_ ) _+ a_ ( _eu_, _φ_ <sup>�</sup> _u_ ) _−_ ( _f_ ( _u_, _R_ _p_ ) _−_ _f_ ( _U_, _R_ _P_ ), _φ_ <sup>�</sup> _u_ ) _dt_ . (4.22) (4.23) (4.24) (4.25) (4.26) _−_ ([ _U_ ] _n−_ 1, _φ_ <sup>�</sup> _u_,( _n−_ 1)) _+_ _+_ _Im_, _n_ _〈_ _e_ ˙ _p_, _φ_ <sup>�</sup> _p_ _〉−〈_ _g_ ( _P u_, _p_ ) _−_ _g_ ( _P U_, _P_ ), _φ_ <sup>�</sup> _p_ _〉_ _dt_ _In_ Now, using (2.4) and (2.5), and summing over all _n_, _N_ _n=_ 1 _N_ _n=_ 1 _In_ ( _eu_, _ψu_ ) _+〈_ _e_ _p_, _ψ_ _p_ _〉_ _dt =_ ( _u_ <sup>0</sup> _−_ Π0 _u_ <sup>0</sup>, _φ_ <sup>�</sup> _u_,0) _+_ _Mn_ _m=_ 1 _−〈_ [ _P_ ] _m−_ 1, _n_, _φ_ <sup>�</sup> _p_,( _m−_ 1, _n_ ) _〉−_ _Im_, _n_ _〈_ _P_ <sup>˙</sup>, _φ_ <sup>�</sup> _p_ _〉−〈_ _g_ ( _P U_, _P_ ), _φ_ <sup>�</sup> _p_ _〉_ _dt_ . _−_ ([ _U_ ] _n−_ 1, _φ_ <sup>�</sup> _u_,( _n−_ 1)) _−_ _In_ ( _U_ <sup>˙</sup> _u_, _φ_ <sup>�</sup> _u_ ) _+ a_ ( _U_, _φ_ <sup>�</sup> _u_ ) _−_ _f_ ( _U_, _R_ _P_ ), _φ_ <sup>�</sup> _u_ ) _dt_ Addition and subtraction of - _In_ <sup>(</sup> <sup>_f_</sup> <sup>(</sup> <sup>_U_</sup> <sup>,</sup> _R_ <sup>�</sup> _P_ ), _φ_ <sup>�</sup> _u_ ) _dt_ and - _In_ <sup>_〈_</sup> <sup>_g_</sup> <sup>(</sup> <sup>_P Un−_</sup> <sup>1,</sup> <sup>_P_</sup> <sup>),</sup> <sup>_φ_</sup> <sup>�</sup> <sup>_p_</sup> <sup>_〉_</sup> <sup>_dt_</sup> <sup>, integration by parts on</sup> _a_ ( _U_, _φ_ <sup>�</sup> _u_ ) and the use of Galerkin orthogonalities (3.13) and (3.14) to subtract the interpolants Π _nπ_ <sup>_u_</sup> _n_ <sup>_φ_</sup> <sup><u>�</u></sup> <sup>_u_</sup> Addition and subtraction of _In_ <sup>(</sup> <sup>_f_</sup> <sup>(</sup> <sup>_U_</sup> <sup>,</sup> _R_ <sup>�</sup> _P_ ), _φ_ <sup>�</sup> _u_ ) _dt_ and _a_ ( _U_, _φ_ <sup>�</sup> _u_ ) and the use of Galerkin orthogonalities (3.13) and (3.14) to subtract the interpolants Π _nπ_ <sup>_u_</sup> _n_ <sup>_φ_</sup> <sup><u>�</u></sup> <sup>_u_</sup> and _π_ <sup>_p_</sup> _m_, _n_ <sup>_φ_</sup> <sup>�</sup> _p_ <sup>completes the proof.</sup> <sup>_p_</sup> _m_, _n_ <sup>_φ_</sup> <sup>�</sup> _p_ <sup>completes the proof.</sup> _4.4._ _The implicit-explicit adjoint problem and error representation formula_ Lemma 4.1 gives an error representation formula that requires numerical solution of the fully implicit adjoint problem. Alternatively, we consider an adjoint that employs the same discretization steps 11 as used for the original model. The exact implicit-explicit adjoint corresponding to the implicit-explicit numerical scheme reads: For _n = N_,...,1, find _φ_ _p_ ( _t_ ) _∈_ [ _L_ <sup>2</sup> ( _Im_, _n_ )] <sup>_Nr_</sup> on _m =_ 1,..., _Mn_ such that _Im_, _n_ _〈_ _q_, _−_ _φ_ <sup>˙</sup> _p_ _〉−〈_ _q_, _<u>g</u>_ _p_ _~~∗~~_ _φ_ _p +_ _R∗_ _f_ _p_ _<u>∗φu</u>_, _n〉_ _dt =_ _〈_ _q_, _ψ_ _p_ _〉_ _dt_ . (4.27) _Im_, _n_ Note the use of _φu_, _n_, which is known from the time interval _In+_ 1. Then find _φu_ ( _x_, _t_ ) _∈_ _L_ <sup>2</sup> ( _In_, _H_ <sup>1</sup> (Ω)) such that ( _v_, _−φ_ <sup>˙</sup> _u_ ) _+ a_ ( _v_, _φu_ ) _−_ ( _v_, _fu_ _In_ _In_ _<u>∗φu +</u>_ _P ∗gu_ _~~∗~~_ _φ_ _p_ ) _dt =_ ( _v_, _ψu_ ) _dt_ . (4.28) The corresponding iterative method follows. Theorem 4.2 (Error representation formula) . _Let the quantity of interest be the linear functional m_ ( _u_, _p_ ) _be defined by the functions ψu ∈_ _L_ <sup>2</sup> (Ω) _and_ _ψ_ _p_ _∈_ [ _L_ <sup>2</sup> (Ω)] <sup>_Nr_</sup> _such that m_ ( _u_, _p_ ) _=_ �0 _T_ <sup>(</sup> <sup>_u_</sup> <sup>,</sup> <sup>_ψu_</sup> <sup>)</sup> <sup>_+〈_</sup> <sup>_p_</sup> <sup>,</sup> <sup>_ψ_</sup> <sup>_p_</sup> <sup>_〉_</sup> <sup>_dt._</sup> _The error representation formula for the error E_ ( _U_, _P_ ) _= |m_ ( _u_, _p_ ) _−_ _m_ ( _U_, _P_ ) _| now reads_ _N_ ��� _n=_ 1 _E_ ( _U_, _P_ ) _=_ _=_ _In_ ( _eu_, _ψu_ ) _+〈_ _e_ _p_, _ψ_ _p_ _〉_ _dt_ ��� (4.29) ( _I In + I I In + IVn +_ _Vn +_ _VIn_ )���, (4.30) _N_ ��� _I +_ _n=_ 1 _N_ ��� _I +_ _where_ _I_ _=_ ( _u_ <sup>0</sup> _−_ Π0 _u_ <sup>0</sup>, _φu_,0), (4.31) ( _Ru_, _K_ ( _U_, _P_ ), _φu −_ Π _nπ_ <sup>_u_</sup> _n_ <sup>_φu_</sup> <sup>)</sup> <sup>_K_</sup> <sup>_dt_</sup> <sup>,</sup> (4.32) _I In =_ _I I In =_ _IVn =_ _Vn =_ _VIn =_ _K ∈Tn_ <sup>_h_</sup> _In_ _In_ _In_ _Mn_ _m=_ 1 _In_ _Im_, _n_ _〈_ _R_ _p_ ( _P_ ), _φ_ _p −_ _π_ _m_ <sup>_p_</sup>, _n_ <sup>_φ_</sup> _p_ <sup>_〉_</sup> <sup>_dt_</sup> <sup>,</sup> (4.33) ( _f_ ( _U_, _R_ _P_ ) _−_ _f_ ( _U_, _R_ <sup>�</sup> _P_ ), _φu_ ) _dt_, (4.34) _〈_ _g_ ( _P U_, _P_ ) _−_ _g_ ( _P Un−_ 1, _P_ ), _φ_ _p_ _〉_ _dt_, (4.35) ( _f_ _p_ _R_ _e_ _p_, _φu −_ _φu_, _n_ ) _dt_ . (4.36) The first five terms are similar to the error representation in Lemma 4.1. The last term is the contribution of the transfer error from the ODEs to the PDE through _f_, weighted by the effect of the splitting of the adjoint equations. _Proof._ The proof proceeds as in the case of Theorem 4.1. However we have to account for the implicitexplicit solve of the adjoint, which shows up in the analogue of (4.23) as, <sup>_−_</sup> _p_ <sup>,</sup> <sup>_φ_</sup> <sup>_p_</sup> <sup>_〉m−_</sup> <sup>1,</sup> <sup>_n −〈_</sup> <sup>[</sup> <sup>_P_</sup> <sup>]</sup> <sup>_m−_</sup> <sup>1,</sup> <sup>_n_</sup> <sup>,</sup> <sup>_φ_</sup> <sup>_p_</sup> <sup>,(</sup> <sup>_m−_</sup> <sup>1,</sup> <sup>_n_</sup> <sup>)</sup> <sup>_〉_</sup> _Im_, _n_ _〈_ _e_ _p_, _ψ_ _p_ _〉_ _dt = −〈_ _e_ <sup>_−_</sup> _p_ <sup>,</sup> <sup>_−_</sup> _p_ <sup>,</sup> <sup>_φ_</sup> <sup>_p_</sup> <sup>_〉m_</sup> <sup>,</sup> <sup>_n +〈_</sup> <sup>_e_</sup> <sup>_−_</sup> _p_ _+_ _〈_ _e_ ˙ _p_, _φ_ _p_ _〉−〈_ _<u>g</u>_ _p_ _<u>e</u>_ _p_, _φ_ _p_ _〉−〈_ _f_ _p_ _R_ _e_ _p_, _φu_, _n〉_ _dt_ . (4.37) _Im_, _n_ The presence of the term involving _<u>φu</u>_, _n_ prevents use of the fact that _p_ and _u_ satisfy (2.4) and (2.5) . Thus, we add and subtract - _Im_, _n_ <sup>_〈_</sup> <sup>_f_</sup> <sup>_p_</sup> <sup>_R_</sup> <sup>_e_</sup> <sup>_p_</sup> <sup>,</sup> <sup>_φu〉_</sup> <sup>_dt_</sup> <sup>to</sup> <sup>(4.37).</sup> <sup>The</sup> <sup>rest</sup> <sup>of</sup> <sup>the</sup> <sup>proof</sup> <sup>follows</sup> <sup>as</sup> <sup>before.</sup> . Thus, we add and subtract - _Im_, _n_ <sup>_〈_</sup> <sup>_f_</sup> <sup>_p_</sup> <sup>_R_</sup> <sup>_e_</sup> <sup>_p_</sup> <sup>,</sup> <sup>_φu〉_</sup> <sup>_dt_</sup> <sup>to</sup> <sup>(4.37).</sup> <sup>The</sup> <sup>rest</sup> <sup>of</sup> <sup>the</sup> <sup>proof</sup> <sup>follows</sup> <sup>as</sup> <sup>before.</sup> The addition and subtraction of the additional term leads to the sixth term in the error representation formula. 12 _4.5._ _Error indicators_ Theorem 4.3 (Error indicators) . _By decomposing the contributions to the discretization error of the PDE_ _into a spatial and temporal parts as I In = I In_ <sup>_x_</sup> <sup>_+I I t_</sup> _n_ <sup>_, we can distinguish the contributions from the spatial_</sup> _n_ <sup>_x_</sup> <sup>_+I I t_</sup> _n_ _into a spatial and temporal parts as I In = I In_ <sup>_x_</sup> <sup>_+I I t_</sup> _n_ <sup>_, we can distinguish the contributions from the spatial_</sup> _discretization for the PDE as E_ <sup>_x_</sup> _, the temporal discretization of the PDE by E_ <sup>_t_</sup> _and the ODE discretization_ _contribution as E_ <sup>_s_</sup> _, so_ _E_ ( _U_, _P_ ) _≤_ _E_ <sup>_x_</sup> _+_ _E_ <sup>_t_</sup> _+_ _E_ <sup>_s_</sup>, _where_ _E_ <sup>_x_</sup> _= I +_ _N_ _n=_ 1 ( _I In_ <sup>_x_</sup> <sup>_+ IVn_</sup> <sup>),</sup> (4.38) ( _I In_ <sup>_x_</sup> _E_ <sup>_t_</sup> _=_ _E_ <sup>_s_</sup> _=_ _N_ _n=_ 1 _N_ _n=_ 1 ( _I In_ <sup>_t_</sup> <sup>_+_</sup> <sup>_Vn_</sup> <sup>),</sup> (4.39) _I I In_ . (4.40) _Furthermore, these indicators can be approximated by the computable indicators_ Æ <sup>_x_</sup> _,_ Æ <sup>_t_</sup> _and_ Æ <sup>_s_</sup> _as_ _K ∈Tn_ <sup>_h_</sup> Æ <sup>_x_</sup> _=_ Æ <sup>_t_</sup> _=_ Æ <sup>_s_</sup> _=_ _N_ - ( _n=_ 1 _N_ _n=_ 1 _Mn_ _m=_ 1 _|I I Im_, _n|_, (4.43) _N_ _n=_ 1 _|I In_ <sup>_x_</sup>, _K_ <sup>_|+_</sup> _|IVn|_, (4.41) _|IK |+_ 0 <sup>_h_</sup> _N_ _n=_ 1 _K ∈T_ 0 <sup>_h_</sup> ( _|I In_ <sup>_t_</sup> <sup>_|+|Vn|_</sup> <sup>),</sup> (4.42) ( _|I In_ <sup>_t_</sup> _where the subscripts indicate restriction._ _For these to be computable we replace φu_ _and_ _φ_ _p_ _by the discrete_ _approximations_ Φ _u_ _and_ Φ _p_ _respectively._ _This leads to additional terms in the representation that cannot_ _be estimated but are relatively small in the limit of discretization refinement._ _Proof._ We have to account for the effect of replacing the exact adjoints _φu_ and _φ_ _p_ with the approxima tions Φ _u ∈_ _Wn_ <sup>_ru_</sup> <sup>_+_</sup> <sup>1</sup> and Φ _p ∈_ _Qmrp_, _+n_ 1 <sup>obtained by finite element discretizations similar to (3.14) and (3.13),</sup> _rp_ but with _q_ _∈_ _Qm_, _n_ <sup>and</sup> <sup>_v_</sup> <sup>_∈_</sup> <sup>_W_</sup> _n_ <sup>_ru_</sup> <sup>.</sup> <sup>The</sup> <sup>effect</sup> <sup>on</sup> <sup>_E_</sup> <sup>(</sup> <sup>_U_</sup> <sup>,</sup> <sup>_P_</sup> <sup>)</sup> <sup>of</sup> <sup>replacing</sup> <sup>_φ_</sup> _u_ <sup>with</sup> <sup>Φ</sup> _u_ <sup>in</sup> <sup>(4.31)</sup> <sup>–</sup> <sup>(4.36)</sup> <sup>leads</sup> tions Φ _u ∈_ _Wn_ <sup>_ru_</sup> <sup>_+_</sup> <sup>1</sup> _n_ <sup>_ru_</sup> <sup>_+_</sup> <sup>1</sup> and Φ _p ∈_ _Q_ _rmp_, _n_ <sup>and</sup> <sup>_v_</sup> <sup>_∈_</sup> <sup>_W_</sup> _n_ <sup>_ru_</sup> but with _q_ _∈_ _Qm_, _n_ <sup>and</sup> <sup>_v_</sup> <sup>_∈_</sup> <sup>_W_</sup> _n_ <sup>_ru_</sup> <sup>.</sup> <sup>The</sup> <sup>effect</sup> <sup>on</sup> <sup>_E_</sup> <sup>(</sup> <sup>_U_</sup> <sup>,</sup> <sup>_P_</sup> <sup>)</sup> <sup>of</sup> <sup>replacing</sup> <sup>_φ_</sup> _u_ <sup>with</sup> <sup>Φ</sup> _u_ <sup>in</sup> <sup>(4.31)</sup> <sup>–</sup> <sup>(4.36)</sup> <sup>leads</sup> to additional terms with weights of the type _φu −_ Φ _u_ . However, these additional terms are higher order. The same holds for replacing _φ_ _p_ with Φ _p_ . Since these errors are negligible we do not indicate this change in the terms _I_ - _VI_ below. To have separate indicators for the spatial and the temporal contributions from discretization of the PDE and the contribution for the discretization of the ODEs, we decompose the error _E_ ( _U_, _P_ ) into parts corresponding to these contributions. To distinguish the different contributions, we note that term _I I_ (4.32) contributes both to errors in space as well as in time. To deal with this, we write Φ _u −_ Π _nπ_ <sup>_u_</sup> _n_ <sup>_u_</sup> _n_ <sup>Φ</sup> <sup>_u =_</sup> <sup>Φ</sup> <sup>_u −_</sup> <sup>Π</sup> <sup>_n_</sup> <sup>Φ</sup> <sup>_n +_</sup> <sup>Π</sup> <sup>_n_</sup> <sup>Φ</sup> <sup>_n −_</sup> <sup>Π</sup> <sup>_nπu_</sup> _n_ <sup>_u_</sup> _n_ <sup>Φ</sup> <sup>_u_</sup> <sup>,</sup> (4.44) _n_ <sup>_x_</sup> <sup>_+ I I t_</sup> _n_ which gives _I In = I In_ <sup>_x_</sup> <sup>_t_</sup> _n_ <sup>, where</sup> ( _Ru_, _K_ ( _U_, _P_ ), Φ _u −_ Π _n_ Φ _u_ ) _K_ _dt_, (4.45) ( _Ru_, _K_ ( _U_, _P_ ), Π _n_ Φ _u −_ _π_ <sup>_u_</sup> _n_ <sup>Π</sup> <sup>_n_</sup> <sup>Φ</sup> <sup>_u_</sup> <sup>)</sup> <sup>_K_</sup> <sup>_dt_</sup> <sup>,</sup> (4.46) 13 _I In_ <sup>_x_</sup> <sup>_=_</sup> _In_ _In_ _I In_ <sup>_t_</sup> <sup>_=_</sup> _K ∈Tn_ <sup>_h_</sup> _K ∈Tn_ <sup>_h_</sup> where _Ru_, _K_ is the algebraic equivalent to (4.4), since Π _n_ Φ _u ∈_ _Vn_ <sup>_h_</sup> <sup>.</sup> Term _IVn_ involve the exact quantity _R_, which is not computable. We compute an approximation of this term by sampling at a large number of points to form _R_ and then choose only a subset of these samples to form _R_ <sup>�</sup> . Finally, the Term _VIn_ involving _e_ _p_, which arises from the choice of a computationally-tractable adjoint problem, is not directly computable. In some cases, such terms can be approximated at the cost of solving auxiliary adjoint problems [12]. Alternatively, a rigorous mathematical analysis showing such terms are small relative to the computable terms in the error estimate is carried out in [15]. Intuitively _VIn_ is small in the limit of discretization refinement because involves a product of the errors _e_ _p_ and _φu −_ _φu_, _n_ . On the other hand, if _VIn_ is large, we expect the other terms in the error estimate to be large as well. Hence, while the error estimate may not capture the true error accurately in this case, it is still be reliable in the sense of indicating a large error in the numerical solution. 5. Details of the discretization and the adaptive algorithm _5.1._ _Discretization details_ For discretization in space of the PDE, the partition _Tn_ <sup>_h_</sup> <sup>of</sup> <sup>Ω</sup> <sup>consists</sup> <sup>of</sup> <sup>hexahedral</sup> <sup>elements</sup> <sup>with</sup> trilinear basis functions for the primal PDE problem and triquadratic basis functions for its adjoint. The capability for spatial mesh adaptivity, including refinement and derefinement, is provided by the use of hanging nodes, where at most one hanging node per edge or face is allowed. Conformity of the basis at the hanging nodes is obtained by interpolation using the neighboring nodes, see [19]. Handling of such shape regular but non-uniform meshes is alleviated by an octree-based data structure [20]. For the stochastic discretization of the microscale ODEs, the Voronoi cells _ω_ _j_ are generated by _Nω_ uniformly distributed random points in Ω. Given these points, the corresponding Voronoi tessellation is generated by calling the _Voro++_ library [21]. Since this tessellation is generally _not_ aligned with _Tn_ <sup>_h_</sup> <sup>(as</sup> can be seen in Fig. 3.2) a map from each quadrature point in each _Tn_ <sup>_h_</sup> <sup>to</sup> <sup>the</sup> <sup>corresponding</sup> <sup>Voronoi</sup> cell is constructed. This procedure requires searching the Voronoi diagram, but the library supplies efficient routines for doing this. Moreover, _Tn_ <sup>_h_</sup> <sup>only</sup> <sup>varies</sup> <sup>when</sup> <sup>the</sup> <sup>mesh</sup> <sup>is</sup> <sup>changed,</sup> <sup>which</sup> <sup>happens</sup> fairly infrequently in the block adaptivity approach that we use (described in the next section). We sample by using 10 random points in each _ω_ _j_ to compute _RP_ in Term IV (cf. (4.34)) and sample using 1 point to compute (3.9) or (3.10). Computing the projection _P_ is performed using the same data structures created for _R_ : We sample 10 points in each _ω_ _j_, and for each of these points, we find the corresponding element in _Tn_ <sup>_h_</sup> <sup>and com-</sup> pute the function value at that point. Then we average over these function values to get the projection over _ω_ _j_ . The temporal discretization of the primal and adjoint PDE problem is performed using a dG(0) and a cG(1) respectively. For the ODEs, a dG(1) method is used for the primal and a dG(2) method for its adjoint. The ODEs are initially solved on the same temporal discretization as the PDE. However, the ODEs are allowed to have individual time steps in each slab _K × In_ (see Section 3). To determine these time steps, as well as the discretization of the PDE, we use blockwise adaptivity [17], which is a more efficient procedure than a standard compute – estimate – mark – refine strategy. This is described in the following section. Finally, the adjoint time discretization is set to be equal to the temporal discretization for the forward problem. To be able to represent data on the different grids, the octree data structure facilitates the projection and interpolation routines that are necessary. To alleviate the matrix allocations, assembly of the matrices and vectors as well as solving the linear systems involved we take use of the _PETSc_ library [22]. We 14 use its conjugated gradient method with the incomplete LU factorization as preconditioner. A Newton method is used for performing the nonlinear iterations for the primal PDE and ODEs. Finally, despite the higher order method used for the adjoints, the costs can be compared with those for the forward problem due to the fact that they are linear. _5.2._ _Blockwise adaptive error control_ To determine spatial and temporal refinement, the adaptive algorithm called blockwise adaptivity is used. This procedure, introduced by Carey et. al. in [17], is built upon the creation of a sequence of blocks of meshes. The meshes that constitute the block are carefully created to guarantee that the numerical method is accurate in terms of the goal functional as well as being efficient in the sense that they are as coarse as possible. The blocks form the partition in time by 0 _= T_ 0 _< T_ 1 _< ··· < TB_ _= T_ . In each block, both the spatial and temporal meshes are fixed but possibly non-uniform. Given initial primal and adjoint solutions on a coarse discretization, the algorithm is based on an absolute tolerance ATOL for the total error, the Principle of Equidistribution and a strategy for computing blocks. The Principle of Equidistribution says that an optimal mesh for controlling ATOL is obtained when the element contributions are approximately equal, see e.g. Eriksson et. al. [6]. The strategy may be based on a criteria, for example the maximum size of a mesh due to limitations in computer memory. This strategy, known as a memory-bound strategy, is employed in this paper. Other strategies include forming blocks by considering changes in the topology of the meshes. For the memory-bound strategy we place upper bounds on the number of degrees of freedom, such that there are - a maximum number of spatial elements xMAX, - a maximum number of PDE time intervals tMAX, - a maximum number of ODE time intervals sMAX. Each of this restrictions may define end time of blocks. For completeness we briefly present this method, but is thoroughly described in [17]. Assuming that in a mesh there are _Nx_ space elements, _N_ macro time intervals and _Mn_ subintervals in each macro interval, there is a total of _Nx_ _NMn_ space-time subslabs in the initial discretization. The Principle of Equidistribution determines an approximate local error tolerance on each subslab of <u>ATOL</u> LATOL _=_, (5.1) 3 _Nx_ _NMn_ since there are three different contributions to the error which should be equal: The spatial and temporal part of the PDE and the ODE. The next step is to predict meshes such that each element contribution is approximately LATOL. For example, standard a priori analysis may show that the error _E_ <sup>_s_</sup> _|Im_, _n_ on a subinterval of size ∆ _s_ is of the order of (∆ _s_ ) <sup>_r_</sup> for some _r_ . Due to the Principle of Equidistribution, the desired error should be LATOL. If this requires a subinterval of size ∆ _snew_ we have by proportionality - _r_ , (5.2) LATOL _≈_ _E_ <sup>_s_</sup> _|Im_, _n ×_ - ∆ _<u>snew</u>_ , ∆ _s_ which results in that the approximate subinterval length can be determined as �1/ _r_ , (5.3) ∆ _s_ new _≈_ ∆ _s ×_ - <u>LATOL</u> _E_ <sup>_s_</sup> _|Im_, _n_ 15 or as a number of new subintervals by �1/ _r_ . (5.4) ∆ _<u>s</u>_ ∆ _s_ new _=_ - _E s|Im_, _n_ LATOL It should be noted that if the original discretization is finer than needed, then ∆ _s_ new _>_ ∆ _s_, which suggests coarsening. Moreover, ∆ _s_ new is in fact a computable quantity, since _E_ <sup>_s_</sup> _|Im_, _n_ _≈_ Æ <sup>_s_</sup> _|Im_, _n_ (cf. equations (4.40) and (4.43)). For the space and discretizations of the PDE, the procedure is similar and uses the approximations Æ <sup>_x_</sup> and Æ <sup>_t_</sup> defined in (4.41) and (4.42). Using the memory bound strategy, we determine that the predicted number of elements that are of interest. Thus, besides (5.4) we also need to predict the number of elements in space and time for the PDE. The latter is done using a similar quotient as (5.4), but for the former, there is a scaling factor with the dimension _d =_ 3 as - <u>Æ</u> _x_ _|n_ <u>,</u> _<u>K</u>_ LATOL - _d_ / _r_ , (5.5) - _<u>h</u>_ _hnew_ where _r_ is the order of convergence in space. - _d_ _≈_ Using the predicted number of spatial elements (5.5), one can create a block by starting at _T_ 0 _=_ 0, loop over time and add up the total number of predicted number of elements until the sum is about equal to xMAX or tMAX. Then this time defines _T_ 1. If the maximum predicted number of ODE steps over all spatial elements exceeds sMAX, that PDE time interval is to be refined, thus increasing the predicted number of PDE time intervals. The second block starts with _T_ 1 and is formed analogously. Derefinement is restricted to the resolution of the initial coarse mesh, both is space and time. In addition to the three restriction criteria above, a sufficiently coarse predicted mesh may also define the end of a block. This can be determined by a parameter _θ_ defined as <u>#elements in current block</u> _θ =_ #elements predicted for the next block <sup>.</sup> (5.6) We coarsen the mesh when _θ >_ 10. We note there can be significant contributions to the error if the meshes on adjacent blocks are sufficiently different [17]. We do not include expressions estimating these contributions in the a posteriori error estimate. Rather, we reduce the impact of such contributions by using the maximum error estimate in the final time interval of the previous block to determine the refinements of the first time interval on the next block. Below, we use one iteration of the block adaptive algorithm, so the PDE-ODE system is solved once on the initial coarse mesh. This initial mesh is then refined in space and time according to the strategy described above with ATOL _≈_ 10% of the approximate total error estimate Æ <sup>_x_</sup> _+_ Æ <sup>_t_</sup> _+_ Æ <sup>_s_</sup> for the initial mesh. 6. A numerical example We consider a problem from electrocardiography known as the monodomain model (cf. [3]), which is (2.4) where _u_ is the transmembrane potential, i.e. the potential difference over the cell membrane and _f_ is a current of charged ions. We assume Ω _=_ [0,1] <sup>3</sup>, _T_ _=_ 400 ms, and a constant conductivity _ϵ =_ 0.1. The initial value _u_ <sup>0</sup> is set such that there is an excited region close to the origin, which decreases to a resting value using smoothed Heaviside functions _Gδ_ as, _u_ <sup>0</sup> ( _r_ ) _= v_ 1(1 _−Gδ_ ( _r_ )) _+ v_ 0 _Gδ_ ( _r_ ), (6.1) 16 where _r_ _= |x|−_ _r_ 0 and, _δ_ (6.2) _Gδ_ ( _x_ ) _=_      1, _x > δ_, <u>1</u> �1 _+_ <sup>_<u>x</u>_</sup> -, _|x| ≤_ 2 _δ_ <sup>_+_</sup> _π_ <sup><u>1</u></sup> <sup>sin</sup> <sup>_π_</sup> _δ_ <sup>_<u>x</u>_</sup> , _|x| ≤_ _δ_,     �1 _+_ _δ_ <sup>_<u>x</u>_</sup> <sup>_+_</sup> _π_ <sup><u>1</u></sup> _π_ <sup><u>1</u></sup> <sup>sin</sup> <sup>_π_</sup> _δ_ <sup>_<u>x</u>_</sup> 0, _x < −δ_, with _v_ 0 _= −_ 84.624 mV, _v_ 1 _=_ 20 mV, _r_ 0 _=_ 0.5 and _δ =_ 0.2. The monodomain model is coupled to an ODE model called the Beeler-Reuter model, a common model for describing mammalian ventricular action potentials, i.e., the voltage response of a specific type of heart muscle cells. The model is described in full in Beeler and Reuter’s original paper [23] and we review it briefly here for completeness. The model contains seven ODE variables, where six describe gates governing the inflow and outflow of certain ions through the cell membrane. These gating variables are modeled on the assumptions by Hodgkin and Huxley saying that the openness depends on the proportion of already open channels, _p_ _i_, and the proportion of closed channels, 1 _−_ _p_ _i_ . Thus, _p_ _i_ _∈_ [0,1], _i_ _=_ 1,...,6. Moreover, the level of openness is in turn depending on the potential by rate functions _αi_ ( _u_ ) and _βi_ ( _u_ ) to form _p_ ˙ _i_ _= αi_ ( _u_ )(1 _−_ _p_ _i_ ) _−_ _βi_ ( _u_ ) _p_ _i_, _i_ _=_ 1,...,6. (6.3) Three of the gating variables are fast and thus sensitive to changes in the potential, the other three are slower. See the seminal paper by Hodgkin and Huxley [24] for a thorough analysis of the modeling of the gating variables. Beeler and Reuter uses the following general expression for the rate functions _<u>c</u>_ <u>1 exp(</u> _<u>c</u>_ <u>2(</u> _<u>u +</u>_ _<u>c</u>_ <u>3))</u> _+_ _<u>c</u>_ <u>4(</u> _<u>u +</u>_ _<u>c</u>_ <u>5)</u> exp( _c_ 6( _u +_ _c_ 3)) _+_ _c_ 7 , (6.4) and the values for the constants _ck_, _k =_ 1,...,7, can be found in [23]. The seventh ODE variable models the concentration of calcium ions inside the cell, and is governed by the ODE _p_ ˙7 _= −a_ 0 _jS_ ( _u_, _p_ ) _−_ _b_ 0( _a_ 0 _−_ _p_ 7), (6.5) where _a_ 0 and _b_ 0 are constants and _jS_ is a current depending on the potential _u_ and the gating variables. The coupling to the PDE is through the ion current _f_ _= jion_ which is sum of different currents, _jion_ ( _u_, _p_ ) _= −_ ( _jNa_ ( _P u_, _p_ ) _+ jS_ ( _P u_, _p_ ) _+ j_ _X_ ( _P u_, _p_ ) _+ jK_ ( _P u_ )). (6.6) Similar to _jS_, the currents _jNa_ and _j_ _X_ depend on the potential _u_ and the gating variables. The current _jK_ depend only on the potential _u_ . We are interested in controlling the average error in the PDE solution, so we set _ψu =_ 1 and _ψ_ _p =_ 0 . For the initial temporal discretization of the PDE, a time step of ∆ _t_ _=_ 0.1 is chosen up to _t_ _=_ 10, after which point we use ∆ _t =_ 1. The total initial total number of time steps is thus 490. The motivation for this initial non-uniform discretization is that it is known a priori that the dynamics is rapid in the beginning of the front. We use _Ln =_ 2 for all _n_ . To form the initial spatial mesh, Ω is uniformly subdivided into 16 <sup>3</sup> _=_ 4096 elements. The adjoint PDE problem is solved on this mesh resolution for all times, even though the primal mesh is refined. Moreover we set _Nω =_ 75000. The parameters for blockwise adaptivity are set to be xMAX _=_ 75000 (i.e. equal to _Nω_ ), tMAX _=_ 1000 and sMAX _=_ 20. 17 Figure 6.1: The primal (left) and adjoint (right) PDE solutions at time 0.5 ms (block no. 1). Figure 6.2: The primal (left) and adjoint (right) PDE solutions at time 200 ms (block no. 5). The range of the primal solution is _−_ 11.76 to _−_ 11.70 mV and for the adjoint solution 1.405 _·_ 10 <sup>4</sup> to 1.406 _·_ 10 <sup>4</sup> . _6.1._ _Results_ Fig. 6.1 illustrates _U_ and Φ _u_ at _t_ _=_ 0.5 ms on the refined mesh. It is clear how the adjoint is large at the front. For later times, after wave has passed over the domain, the solution have little variation in space as shown in Fig. 6.2. The adjoint also has little variation in space. The dynamics of the PDE and its adjoint are clearly visible in Fig. 6.3, which illustrates the solutions in the center of Ω, i.e. at (0.5,0.5,0.5). The left graph shows that there is a very steep gradient of _U_ in the first 5 ms of the simulation after which the solution then decays fairly smoothly back to its initial and resting value after about 300 ms. The adjoint solution Φ _u_ in the right plot of Fig. 6.3 has a large peak around 240 ms. This may seem surprising at first, but its explanation can be found by looking at the dynamics of the coupled ODEs in Figures 6.4, 6.5 and 6.6. Recalling that the six of the ODE variables are gating variables and one models the calcium ion concentration, we can identify two types of gating variables by looking at Figures 6.4, 6.5 and 6.6. Three rapid gating variables in Fig. 6.4, which has a fast change in state in the beginning and then returns to its original state after about 250-350 ms - thus slightly later than the large peak of Φ _u_ . Moreover, the 18 40 20 0 -20 -40 -60 -80 -100 ~~0~~ ~~100~~ ~~200~~ ~~300~~ ~~40~~ 0 t 1.5 1 0.5 0 0 100 200 300 400 t Figure 6.3: Solutions of the primal (left) and adjoint (right) PDE measured in the center of Ω. calcium concentration in Fig. 6.5 seem to be strongly related to Φ _u_ at around 220 ms. Fig. 6.6 illustrates three slower gating variables, and similar to the calcium concentration, they are less influential for small _t_ but rather have their significance when the system goes back to its resting state. To examine convergence properties, we evaluate the error terms after varying the number of iterations _Ln_ in the iterative multirate method, the spatial and temporal mesh sizes of the PDE as well as the time steps of the ODEs. These four parameters were changed uniformly to produce Figures 6.7 and 6.8. The default values in these experiments are 4096 elements, ∆ _t_ _=_ ∆ _s =_ 0.1, _Ln_ _=_ 1, _Nω =_ 10000 and _T_ _=_ 20. As can be seen the errors in the various terms of (4.29) decrease as expected. The main observation is that the splitting error Term _V_ dominates the total error, but can be controlled by increasing _Ln_, cf. Fig. 6.8. In Fig. 6.9 we show the effect of varying the number of Voronoi cells, _Nω_, which also show expected behavior. The large dynamics in the system are naturally manifested in the number of blocks, and the spatial and temporal discretizations on these blocks. With the given tolerances and parameter values, 8 blocks are obtained and basic statistics about these blocks can be found in Table 6.1. As can be seen, the sizes of the first four blocks are limited by the xMAX criteria, with predicted number of elements being 77309, 79829, 94074 and 87403. Recalling that xMAX _=_ 75000, we thus obtain significantly more elements. This can be understood by looking at the block creation procedure in detail. For example, considering block 3, the predicted number of elements for the first interval (2.3,2.4] was 48987. Since this is less than xMAX, the procedure considers also the next interval (2.4,2.5]. The predicted number of elements for the total interval (2.3,2.5] results in 71870 elements. This is also less than xMAX, albeit close. The fact that this prediction is close to xMAX and knowing that the dynamics of the problem is rapid could suggest that the block should be ended. In the implementation here, the xMAX criterion is a strict inequality and the interval (2.5,2.6] is considered. This results in a prediction of 94074 elements to guarantee error control. The true number of elements obtained are slightly larger, although less than 1 %, due to the constraint of having at most one hanging node per element edge. The blocks 5, 6, 7 and 8 have the same spatial discretization with 45718 elements. Recall that the reason for the spatial meshes not being coarsened is due to the parameter _θ_ (5.6). As can be seen in Table 6.1, blocks 5, 6 and 7 are limited in time by the tMAX _=_ 1000 criteria. Finally we note that the variation in time is great: the time step size for the PDE and the ODEs are in the range of 10 <sup>_−_</sup> <sup>3</sup> to 1 ms and 10 <sup>_−_</sup> <sup>4</sup> to 1 ms respectively. Fig. 6.10 illustrates the various time steps over time for the PDE. 7. Conclusion We consider a problem of a macroscale parabolic PDE which is coupled to a set of microscale ODEs. We introduce an intermediate scale to couple information between the scales, and use projections to 19 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 14 12 10 8 6 4 2 0 <u>0</u> <u>100</u> <u>200</u> <u>300</u> <u>400</u> t 1 14 12 10 8 6 4 2 0 <u>0</u> <u>100</u> <u>200</u> <u>300</u> <u>400</u> t 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 <u>0</u> <u>100</u> <u>200</u> <u>300</u> <u>400</u> t 1 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 0 ~~0~~ ~~100~~ ~~200~~ ~~300~~ ~~40~~ 0 t 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 <u>0</u> <u>100</u> <u>200</u> <u>300</u> <u>400</u> t 0 <u>0</u> <u>100</u> <u>200</u> <u>300</u> <u>400</u> t Figure 6.4: Solutions of the primal (left column) and adjoint (right column) fast ODE gating variables measured in the center of Ω. 7 6 5 4 3 2 1 0 ~~0~~ ~~100~~ ~~200~~ ~~300~~ ~~40~~ 0 t 0 -500 -100 ~~0~~ -1500 <u>0</u> <u>100</u> <u>200</u> <u>300</u> <u>400</u> t Figure 6.5: The calcium ion concentration and its adjoint measured in the center of Ω. 20 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 <u>0</u> <u>100</u> <u>200</u> <u>300</u> <u>400</u> t 1 0.95 0.9 0.85 0.8 0.75 0.7 0.65 0.6 0.55 180 160 140 120 100 80 60 40 20 500 450 400 350 300 250 200 150 100 50 0 <u>0</u> <u>100</u> <u>200</u> <u>300</u> <u>400</u> t 0.5 <u>0</u> <u>100</u> <u>200</u> <u>300</u> <u>400</u> t 0 ~~0~~ ~~100~~ ~~200~~ ~~300~~ ~~400~~ t 50 0.4 0.35 0.3 0.25 0.2 0.15 0.1 0.05 0 ~~0~~ ~~100~~ ~~200~~ ~~300~~ ~~40~~ 0 t 0 -50 -150 -250 -350 -450 <u>0</u> <u>100</u> <u>200</u> <u>300</u> <u>400</u> t Figure 6.6: Solutions of the primal (left column) and adjoint (right column) slow ODE gating variables measured in the center of Ω. 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>0</sup> 10 <sup>-1</sup> 10 <sup>-2</sup> 10 <sup>-3</sup> 10 <sup>-4</sup> 10 <sup>-5</sup> 10 <sup>2</sup> 10 <sup>1</sup> Error II <sup>x</sup> I IV Error II <sup>t</sup> V 10 <sup><u>-2</u></sup> 10 <sup><u>-1</u></sup> h 10 <sup>0</sup> 10 <sup>-2</sup> 10 <sup>-1</sup> ∆ t Figure 6.7: Left: Error and selected contributions as the spatial mesh size varies. Right: Error and selected contributions as the PDE time step varies. 21 Error V 1 2 3 4 5 6 7 8 9 10 Ln 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>0</sup> Error III 10 <sup>-1</sup> 10 <sup>-3</sup> 10 <sup>-2</sup> 10 <sup>-1</sup> ∆ s 10 <sup>3</sup> 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>0</sup> 10 <sup>-1</sup> 10 <sup>-2</sup> Figure 6.8: Left: Error and selected contributions as the ODE time step varies. Right: Error and selected contribution as the number of iterations _Ln_ in the multirate iterative scheme varies. 10 <sup>2</sup> 10 <sup>1</sup> 10 <sup>0</sup> Error IV 0 10000 20000 30000 40000 50000 N ω Figure 6.9: Error and selected contribution as the number of Voronoi cells _Nω_ varies. Table 6.1: Date on blocks: _b_ is the block number, _Tb_ is the end time in ms and _|Ib|_ is the number of time intervals in block number _b_ . ∆ _t_ is the PDE time step. _Mn_ is the number of ODE time subintervals with max and mean values. _Nx_ is the number of elements that are predicted and actually used. _b_ _Tb_ (ms) _|Ib|_ ∆ _t ×_ 10 <sup>_−_</sup> <sup>3</sup> ( _µ_ s) _Mn_ _Nx_ min max mean max mean predicted used 1 1.9 352 2.27 25.0 5.41 8 2.02 77309 77554 2 2.3 182 1.63 3.58 2.21 6 2.07 79829 79899 3 2.6 173 1.61 1.93 1.74 5 2.13 94074 94158 4 2.8 120 1.51 1.89 1.68 6 2.18 87403 87508 5 159.5 1000 0.78 1000 157 6 2.04 45718 45935 6 266.4 1000 28.0 1000 107 2 2 45718 45935 7 293.7 1000 22.0 56.0 27.4 2 2 45718 45935 8 400 222 55.0 1000 481 2 2 45718 45935 22 1 .8 .6 .4 .2 0 100 200 300 400 t Figure 6.10: The time steps of the PDE. transfer information to the intermediate scale. We use a Monte Carlo method to deal with the very high dimension of the system of ODEs. We also allow the ODEs to be solved on a much finer scale than the PDE. We derive an adjoint-based a posteriori estimate that accounts for all of the key discretization components, and use the estimate to derive indicators of element contributions to the error both in space and time for the PDE and in time for the ODEs. The estimates take into account errors in the data passed between the PDE and the ODEs, as well as the fact that the ODEs are modeled on a much smaller scale than that of the PDE. The indicators are used to guide an algorithm for adaptive error control. Finally, we test the adaptive algorithm on a realistic problem. Future work could consider parallel blockwise adaptivity. Since the ODEs in this model do not interact inbetween spatial elements, this set of ODEs constitute an embarrassingly parallel problem and can simply be parallelized using a graphical processing unit, GPU. Developing adaptive algorithms designed for modern computer technologies with several memory hierarchies such as a GPU are indeed interesting, and the blockwise adaptivity could be one method for limiting the number of data transfers between hierarchies. Acknowledgements [J. H. Chaudhry’s work is supported in part by the Department of Energy (de-sc0005304, DE0000000SC9279).](http://arxiv.org/abs/de-sc/0005304) V. Carey’s work is supported in part by the Department of Energy (DOE-ASCR-1174449-5). D. Estep’s work is supported in part by the Defense Threat Reduction Agency (HDTRA1-09-1-0036), [Department of Energy (DE-FG02-04ER25620, DE-FG02-05ER25699, DE-FC02-07ER54909, de-sc0001724,](http://arxiv.org/abs/de-sc/0001724) [de-sc0005304,](http://arxiv.org/abs/de-sc/0005304) INL00120133, DE0000000SC9279), Dynamics Research Corporation PO672TO001, Idaho National Laboratory (00069249, 00115474), Lawrence Livermore National Laboratory (B573139, B584647, B590495), National Science Foundation (DMS-0107832, DMS-0715135, DGE-0221595003, MSPA-CSE0434354, ECCS-0700559, DMS-1065046, DMS-1016268, DMS-FRG-1065046, DMS-1228206), and the National Institutes of Health (#R01GM096192). V. Ginting’s work is supported in part by the National Science Foundation (DMS-1016283) and the [Department of Energy (de-sc0004982).](http://arxiv.org/abs/de-sc/0004982) M. Larson’s work is supported in part by the Swedish Foundation for Strategic Research Grant (AM130029) and the Swedish Research Council Grants (2013-4708,2010-5838). S. Tavener’s work is supported in part by the Department of Energy (DE-FG02-04ER25620, INL00120133) and National Science Foundation (DMS-1016268). 23 References [1] L. Tung, A bi-domain model for describing ischemic myocardial d-c potentials., Ph.D. thesis, Mas sachusetts Institute of Technology (1978). [2] J. Sundnes, G. T. Lines, X. Cai, B. F. Nielsen, K.-A. Mardal, A. Tveito, Computing the Electrial Activity in the Heart, Springer-Verlag, 2006. [3] P. Colli Franzone, P. Deuflhard, B. Erdmann, J. Lang and L. F. Pavarino, Adaptivity in space and time for reaction-diffusion systems in electrocardiology, SIAM J. Sci. Comput. 28 (2006) 942–962. [4] D. Noble, Modeling the heart - from genes to cells to the whole organ, Science (2002) 1678–1682. [5] D. Estep, Error estimation for multiscale operator decomposition for multiphysics problems, Ox ford University Press, 2010, Ch. 11, Bridging the Scales in Science and Engineering, Editor: Jacob Fish. [6] K. Eriksson, D. Estep, P. Hansbo, C. Johnson, Introduction to adaptive methods for differential equations, Acta Numerica 4 (1995) 105–158. [7] K. Eriksson, D. Estep, P. Hansbo, C. Johnson, Computational Differential Equations, Cambridge University Press, New York, 1996. [8] D. Estep, M. G. Larson, R. D. Williams, Estimating the error of numerical solutions of systems of reaction-diffusion equations, Memoirs A.M.S. 146 (2000) 1–109. [9] W. Bangerth, R. Rannacher, Adaptive Finite Element Methods for Differential Equations, Birkhauser Verlag, 2003. [10] M. B. Giles, E. Süli, Adjoint methods for pdes: a posteriori error analysis and postprocessing by duality, Acta Numerica 11. [11] D. Estep, V. Ginting, D. Ropp, J. N. Shadid, S. Tavener, An a posteriori-a priori analysis of multiscale operator splitting, SIAM J. Numer. Anal. 46 (2008) 1116–1146. [12] V. Carey, D. Estep, S. Tavener, A posteriori analysis and adaptive error control for multiscale op erator decomposition solution of elliptic systems i: Triangular systems, SIAM J. Numer. Anal. 47 (2009) 740–761. [13] A. Logg, Multi-Adaptive Galerkin Methods for ODEs I, SIAM J. Sci. Comput. 24 (2002) 1879–1902. [14] D. Estep, V. Ginting, S. Tavener, A posteriori analysis of multirate numerical method for ordinary differential equations„ Comput. Meth. Appl. Mech. Engin. 223 (2012) 10–27. [15] D. Estep, V. Ginting, J. Hameed, S. Tavener, A posteriori analysis of an iterative multi-discretization method for reaction–diffusion systems, Computer Methods in Applied Mechanics and Engineering 267 (0) (2013) 1 – 22. [16] V. Carey, D. Estep, S. Tavener, A posteriori analysis and adaptive error control for operator decom position solution of coupled semilinear elliptic systems, Inter. J. Numer. Meth. Engin. 94 (2013) 826–849. [17] V. Carey, D. Estep, A. Johansson, M. Larson, S. Tavener, Blockwise adaptivity for time dependent problems based on coarse scale adjoint solutions, SIAM Journal on Scientific Computing 32 (4) (2010) 2121–2145. 24 [18] F. Aurenhammer, Voronoi diagrams - a survey of a fundamental geometric data structure, ACM Comput. Surv. 23. [19] M. Ainsworth, B. Senior, Aspects of an adaptive hp-finite element method: Adaptive strategy, con forming approximation and efficient solvers, Computer Methods in Applied Mechanics and Engineering 150 (1997) 65 – 87. [20] S. F. Frisken, R. N. Perry, Simple and efficient traversal methods for quadtrees and octrees, Graphics tools: The JGT editors’ choice. [21] C. H. Rycroft, Voro++: A three-dimensional Voronoi cell library in C++, Chaos: An Interdisciplinary Journal of Nonlinear Science 19. [22] [S. Balay, et al., PETSc Web page, http://www.mcs.anl.gov/petsc (2014).](http://www.mcs.anl.gov/petsc) [URL http://www.mcs.anl.gov/petsc](http://www.mcs.anl.gov/petsc) [23] G. W. Beeler, H. Reuter, Reconstruction of the action potential of ventricular myocardial fibres, J Physiol. 268 (1) (1977) 177–210. [24] A. L. Hodgkin, A. F. Huxley, A Quantitative Description of Membrane Current and its Application to Conduction and Excitation in Nerve, Journal of Physiology 4 (1952) 500–544. 25

섹션 본문 119문단 · 42,793자

(제목 없음)

1We consider adaptive finite element methods for solving a multiscale system consisting of a macroscale model comprising a system of reaction-diffusion partial differential equations coupled to a microscale model comprising a system of nonlinear ordinary differential equations. A motivating example is modeling the electrical activity of the heart taking into account the chemistry inside cells in the heart. Such multiscale models pose extremely computationally challenging problems due to the multiple scales in time and space that are involved.We describe a mathematically consistent approach to couple the microscale and macroscale models based on introducing an intermediate "coupling scale". Since the ordinary differential equations are defined on a much finer spatial scale than the finite element discretization for the partial differential equation, we introduce a Monte Carlo approach to sampling the fine scale ordinary differential equations. We derive goal-oriented a posteriori error estimates for quantities of interest computed from the solution of the multiscale model using adjoint problems and computable residuals. We distinguish the errors in time and space for the partial differential equation and the ordinary differential equations separately and include errors due to the transfer of the solutions between the equations. The estimate also includes terms reflecting the sampling of the microscale model. Based on the accurate error estimates, we devise an adaptive solution method using a "blockwise" approach. The method and estimates are illustrated using a realistic problem.

Introduction

2Our interest in problems consisting of a macroscale time dependent partial differential equation (PDE) coupled to a miscroscale system of ordinary differential equations (ODEs) originates in the modeling of the electrical activity in the heart. The standard macroscale model of electrical phenomena in cardiac tissue is the bidomain model proposed by Tung [1], which consists of parabolic and elliptic PDEs modeling the macroscopic potential distribution. These PDEs are derived assuming a representation of the tissue as two anisotropic media, one intracellular, which is strongly anisotropic, and one extracellular, which is weakly anisotropic. If the two media are assumed to have proportional conductivity tensors, it is possible to reduce the model to the monodomain model, consisting of a single reaction-diffusion PDE with a load depending on the solution to the ODEs.

3On the cellular level, the electrical activity may be modeled by a set of ODEs that depends on a potential determined by the solution of the PDE. Many cellular models are available, both phenomenological models that try to mimic measurements, and physiological models which are based on measurements as well as physiological theory. The latter may be very complex, involving up to hundred variables. For a review on mathematical models describing the electrical activity in the heart, see Sundnes et. al. [2] and the references therein. A space-time adaptive method can be found in Colli Franzone and coworkers [3]. A survey of heart modeling can be found in Noble [4].

4Specialized numerical methods are required for high fidelity simulation of the heart, since the heart may consist of up to 10 10 cells [2], each modeled by a set of ODEs, and it is impossible to solve the PDE on the same spatial scale as the ODEs. Moreover, determining the actual physical geometry and location of cells is itself a difficult problem. Thus, including the cellular scale phenomena in the macroscale discretization requires some form of "upscaling" or "recovery" of the information provided by the microscale modeling. This is in fact necessary if the PDE model derived using homogenization as is the case for the bidomain equations.

5Unfortunately, this subtle mathematical issue is often ignored in computational electrocardiography, where it is common to simply evaluate the ODEs in the cells located at the quadrature points of a finite element method, for example. However, this is not mathematically consistent, since caused the model to change with the PDE discretization. One consequence, for example, is that it is impossible to perform a mesh convergence study, which is the crudest form of uncertainty quantification.

6As an alternative, we create an intermediate "coupling" or "mesoscale" representation of the cellular scale physics that is used to exchange information between the macroscale and microscale. To deal with the very large number of cells, we create the mesoscale representation by sampling cells at the microscale at random and taking averages over the mesoscale cells.

7Another potential issue in such coupled systems is significant differences in the temporal scales in the different components. For example, in a system where the ODEs model chemical reactions and the PDE models global behavior such as transport, it is likely that the dynamics of the chemical systems are much faster than that of the total system. Coupled PDE-ODE systems where the ODEs describe chemical reactions and the PDE describe transport occur in applications such as the study of pollution in groundwater, surface water and the atmosphere, control theory and semiconductor simulation. To deal with this, we allow the PDE and ODE systems to employ significantly different time steps.

8Numerical solutions of such multiscale systems are invariably affected by error arising from numerous discretization effects and present significant discretization challenges in terms of obtaining a desired accuracy [5]. It is therefore critically important to accurately estimate the numerical error in computed quantities of interest and devise efficient discretization parameter selection algorithms. In this paper, we derive goal-oriented a posteriori error estimates that distinguish the relative contributions of various discretization effects, and thus provide the capability of adjusting various discretization parameters to efficiently obtain a desired accuracy. The error analysis is based on a posteriori error estimates that employ computable residuals and adjoint equations, see [6,7,8,9,10] for general information. For applications to multiscale systems, see [5,11,12,13,14,15,16]. We base the adaptive strategy on the block adaptive approach described in [17].

9The content of this paper is organized as follows: In Section 2, we formulate the multiscale model. In Section 3, we describe the discretization methods. The a posteriori error analysis is presented in Section 4. In Section 5, we describe some implementation details and the adaptive algorithm. A numerical example is presented in Section 6. The paper ends with a conclusion in Section 7.

Model description

10The nominal model problem consists of a reaction-diffusion PDE that describes macroscale behavior over a domain Ω coupled to systems of ODEs that model processes taking place inside small "cells" C that comprise the heart domain. The coupling of the macro-and micro-scale processes taking place on vastly different scales in space and time raise serious challenges for analyzing the behavior and computing solutions of the model. We first describe the original coupled system, then we describe a new system that includes a coupling mechanism that provides an avenue to address these challenges.

The original model

11The region Ω = ∪

12We model the microscale behavior using a collection of ODEs:

13where p i is a vector of length N r and u is the solution of a PDE modeling the macroscopic behavior described below. In the context of (2.1), u has the role of a parameter. We have allowed the model for the microscale behavior g i to vary with each cell. For simplicity of notation, we have assumed the same number of equations in each cell model, however this is not necessary. In order to introduce the microscale solutions of the reactants into the macroscale model, we define the piecewise constant function p(x) for x ∈ Ω,

14The macroscale model problem reads: Find u(x, t ) ∈ C 1 ((0, T ); C 2 (Ω)) such that

15where = (x) ≥ 0 > 0 is a continuous function and f and u 0 are sufficiently smooth functions. In this equation, p now plays the role of a parameter, but one that varies in space on the microscale.

Multiscale coupling

16The coupled system (2.1)-(2.2) immediately raises several issues:

17• The solutions of the microscale ODEs (2.1) vary in space on the scale of the cells. This happens both because of varying cell model and because the ODE model (2.1) depend on experimentallydetermined parameters that vary stochastically. This microscale variation introduces extremely rapid variation in the coefficient f on the scale of the macroscale PDE (2.2) along with discontinuities across cell boundaries. We would therefore have to use a spatial discretization for (2.2) that is finer than the cells while being consistent with the cell boundaries in order to achieve full order accuracy in numerical solutions.

18• The ODE system (2.1) has an extremely large dimension N C × N r , with the consequence that the solution of many systems of nonlinear ODEs are required to advance the PDE solution if we solve the microscale model (2.1) in every cell. This raises another significant computational burden.

19• At the same time, we expect to see a macroscale pattern in variations in cell type and model, which implies it is inefficient to integrate the microscale ODEs in every cell.

20To deal with these issues, we introduce a coupling scale decomposition of Ω. We assume that Ω = ∪ N ω j =1 ω j is decomposed into a set of non-overlapping regions ω i . Each ω j is comprised of a collection of cells ω j = ∪ i ∈I j C i , where I j is a subset of the indices {1, . . . , N C }. We assume the collection {I j } is non-intersecting while their union equals {1, . . . , N C }. To smooth out the cell-scale variation in the reaction model (2.1), we average the reaction solutions over ω i . We introduce a "recovery" operator R :

21where |ω j | and |C i | denote the volume of the indicated region and cell respectively. Note that i ∈I j |C i | = |ω j |. The function Rp is piecewise constant, but now varies on the coupling scale rather than the cell scale.

22One reasonable criteria to choosing the intermediate scale cells is to assume that the same reaction model g i is used for each cell C i in each coupling region ω j . We now replace the original macroscale

23Next we note that in the original formulation, p i depends implicitly on the spatial variable x (which has the role of a parameter) inside each cell. To avoid this, we introduce a projection of u into a space of functions that are constant on each cell. We let P : L 2 (Ω) → R N C be a suitably chosen projection into functions that are piecewise constant on the cells and we replace (2.1) by

24When the exact spatial location of each cell is unavailable, as often is the case, we use a projection P into the space of functions that are constant on the coupling scale domains ω j , which also produces a function that is constant on each cell.

Multirate finite element methods

25In order to derive a variational a posteriori error estimate, we write the time discretization as a finite element method for a piecewise polynomial while using a common finite element method for spatial discretization. Combined with suitable quadrature formulas, the resulting approximations match standard finite difference schemes.

Variational formulation

26To this end, we let (·, ·) X denote the inner product on L 2 (X ) on a space X with corresponding norm · X and let a(v, w) denote the bilinear form a(v, w) X = ( ∇v, ∇w) X . The subscript X is dropped when X = Ω. Furthermore, we let 〈·, ·〉 C j denote the inner product on R N r on cell C j and let 〈·, ·〉 =

27The corresponding norm is denoted by · , which is the same notation as for the L 2 -norm, but it is obvious from the context which norm is intended. Furthermore, we write the right hand side functions f and g as functions of two variables, replacing ';' with ','.

A multirate finite element method

28We solve the coupled system (2.5)-(2.4) using a discretization that allows different time steps to be used for the ODEs and the PDE. The discretization yields a nonlinear coupled system of discrete equations for the approximate solution that must be solved iteratively in practice. It is common to fix the number of iterations used for such coupled systems, which can significantly affect the properties of the resulting numerical solution. In the extreme case with no iteration, this represents a so-called explicit-implicit scheme.

29For the temporal discretization for the PDE, the time interval [0, T ] is partitioned into N subintervals 0 = t 0 < t 1 < · · · < t N = T , and we denote each subinterval by I n = (t n−1 , t n ] with length by ∆t n = t n −t n−1 . For the temporal mesh for the ODEs, each interval I n may be divided into M n subintervals by t n−1 = s 0,n < s 1,n < · · · < s M n ,n = t n , where J m,n = (s m−1,n , s m,n ] and is of length ∆s m,n = s m,n − s m−1,n . This is illustrated in Fig. 3.1. We also allow for different time steps in different cells, but the notation becomes very cumbersome so we do not indicate this. Moreover, we note that it is possible to let the individual N r ODE components have different time stepping as in [13], but this is not considered here.

30The space of polynomials of order r is denoted P r , and we discretize all the N r ODE components in the space of polynomials of degree r p , Q For the PDE, we define a triangulation T h n of Ω on each interval I n that is inconsistent with the coupling scale decomposition Ω = ∪ N ω j =1 ω j : We let T h n be hexahedral elements and let the coupling scale partition be the Voronoi tessellation defined by N ω uniformly distributed random points in Ω, i.e. each ω j is a Voronoi cell [18]. An illustration of this tessellation can be seen in Fig. 3

.2.

31Let V h n ⊂ H 1 (Ω) be the space V h n = {v(x) ∈ C (Ω) : v| K ∈ P r (K ), K ∈ T h n }. To indicate the sizes of the elements in V h n , we introduce the mesh function h K = diam(K ) for K ∈ T h n and h = max h K . The

32The functions in W r u n and Q r p n are discontinuous at time nodes, and we denote the jump across a time nodes

33Finally in order to evaluate Galerkin orthogonality, we use the following projection operators into the discrete spaces:

34Note that π u n Π n = Π n π u n : L 2 (Ω × I n ) → W r u n . The multirate finite element method now reads: For all cells in C and for each time interval n = 1, . . . , N , find P ∈ Q r p m,n for m = 1, . . . , M n such that

35where U − 0 = Π 0 u 0 . Note that if we use r p = r u = 0 with a left-hand rectangle rule for time integrals and employ a standard "lumped-mass" quadrature rule in space (trapezoidal rule on elements), then we obtain a standard difference approximation consisting of the implicit Euler in time and 5 point stencil difference scheme in space [8].

Practical discretization considerations

36There are additional considerations for discretization that are used in practice.

Evaluation of the recovery operator

37The definition of the recovery operator R in (2.3) requires the solution of the cell reaction equations (2.5) on all N C cells. We expect N C to be very large, e.g. on the order of millions to billions. At the same time, we expect that the physical properties of cells vary over the macroscale rather than microscale, so it is inefficient to solve (2.5) on every cell. We approximate R by an average R computed using a Monte Carlo sampling approach with a (relatively small) sample of the problems (2.5). As a consequence, we replace the PDE equation

38where U − 0 = Π 0 u 0 . There are two ways to compute the samples. First, we can sample in the spatial variable x, so for x ∈ ω j ,

39k=1 is a set of K j points chosen at random in ω j , for each j = 1, . . . , N ω . In this approach, we solve the reaction model (2.5) only in cells located at {x j ,k } K j k=1 . This means that the average is affected by by physical size of the cells, since bigger cells contribute more samples with some probability. Alternatively, we can sample by choosing cell indices at random, so for x ∈ ω j ,

40where {i k } is a randomly selected subset of I j . In the second approach, the cell average is not affected by the size of the cell. Note that this Monte Carlo computation has the property that the computation is actually exact if sufficiently many samples are used, since there are only N C different values. However for very large N C and reasonably small numbers of samples, the convergence of the Monte Carlo approximations appears to behave according to the standard asymptotic results, so that the accuracy is roughly proportional to the variance of the integrand divided by the square root of the number of samples. Since we want to use relatively few samples, this indicates that the coupling regions ω j should be chosen so that the variance of the integrand defining R has small variance.

Iterative solution of the nonlinear discrete equations

41In general, (3.6)-(3.8) presents a nonlinear coupled discrete system that is solved iteratively in practice. We describe a simple fixed point iteration.

42We use the superscript to denote the iteration number and assume that we carry out L n total iterations on each time step. In practice, we may vary the number of iterations in each cell and for the PDE, but we suppress that notation. The fixed point -finite element method can be formulated on time interval I n as: Given P 0 = P (t n−1 ) and U 0 = U (x, t n−1 ), for each cell find P ∈ Q Then, given P on I n , find U ∈ W r u n such that

43given U 0 . We iterate (3.11) and (3.12) for = 1, . . . , L n , set P − n = P L n (t n ) and U − n = U L n (t n ) to form the data for the next interval.

44In this iterative formulation, we are "lagging" the values of the PDE model U in the cell reaction model, but treat the remaining nonlinear problems for P and U implicitly. This entails using an additional nonlinear solver for each model equation. However, we do not indicate this in the notation as these problems can typically be solved very accurately, e.g. using a standard Newton method.

An implicit-explicit method

45In practice, the iterative formulation (3.11)-(3.12) is often solved for only one iteration L n = 1, yielding an "implicit-explicit" method. This is: For n = 1, . . . , N , find P ∈ Q r p m,n for m = 1, . . . , M n such that

46where U − 0 = Π 0 u 0 . The scheme is said to be explicit-implicit due to the use of explicit use of U n−1 when solving for P on I n , while U n is solved implicitly.

A posteriori error analysis

47In this section, we derive adjoint-based error representation formulas for the methods above. Using these formulas, we derive indicators of local contributions to the global error that can serve as the basis for an adaptive method. Ignoring the effect of iteration in the solution of the discrete equations, there are three discretization parameters that affec the numerical accuracy, namely the spatial mesh size, the time steps for the PDE, and the time steps for the ODEs. In addition, there is a choice of the projection and recovery operators. We present error indicators that distinguish the relative contributions of these choices to the global error. For the iterative method, there is the additional parameter of number of iterations per time step.

48We begin by noting that since the right hand side of (3.13) involves the solution U n−1 from the previous time step and since the right hand side of (3.14) involves the approximation R, there is an error arising from operator decomposition [5] due the differences U and U n−1 as well as a modeling error due to the differences between R and R.

Preliminaries

49The adjoint to the function spaces presented is denoted by the superscript * . The same notation is used for the adjoint operators, as noted in the following identities (v, Rq) = 〈R * v, q〉, We define the residuals, the linearizations of the functions f and g and state the adjoint problems.

50The derivation of the theorems follow in the next Section. Definition 4.1. Let the residuals corresponding to (3.13) and (3.14) be denoted by R p (P ) ∈ Q r p * m,n and R u,K (U , P ) ∈ W r u * n . These are defined by

51The linearizations of f and g are defined as

Adjoint problems

52The definition of an appropriate adjoint problem for a multiscale model is a problematic issue [5]. First of all, there are a number of possible adjoint problems that can be associated with any nonlinear differential equation. In addition, it may be reasonable to account for the use of projections between scales and representations and the effects of a finite number of iterations in the definition. Another issue is the computational difficulty and cost required in the numerical solution of the adjoint.

53We consider two different adjoint problems that present a tradeoff between accuracy of the resulting estimates on one hand and the cost and practicality of implementation on the other. The first approach is closely related to the ideal adjoint of the coupled system (3.1)-(3.2) treated by an implicit discretization, a so-called "implicit adjoint". This choice leads to a robustly accurate error estimate, but the cost is that the linear adjoint problem is nearly as difficult to solve numerically as the original multiscale model. As an alternative, we define a second adjoint problem that uses the same decomposition and finite iterations as used in the forward model. This approach is much more computationally tractable, however the resulting error estimate includes terms that cannot be estimated. It is possible to show that these terms are relative small compared to the terms that can be estimated in the limit of refined discretization however.

Fully implicit adjoint problem and error representation formula

54The ideal fully implicit adjoint reads: For n = N , . . . , 1, find φ p (t ) ∈ [L 2 (I m,n )] N r on m = 1, . . . , M n and φ u (x, t ) ∈ L 2 (I n ; H 1 (Ω)) such that

55where ψ u ∈ L 2 (Ω) and ψ p ∈ [L 2 (Ω)] N r are given data that determine the quantity of interest to be computed. The initial conditions for the adjoint problem are φ u (x, T ) = 0 and φ p (T ) = 0. Next we derive the error representation formula corresponding to this fully implicit adjoint problem. where

56(4.14)

57(4.15)

58(4.17)

59The first term is the contribution from error in the initial data for the PDE. The second and the third terms quantify the contributions of the discretization of the PDE and the ODEs respectively. The fourth term quantifies the contribution of the recovery operator and the fifth term is the contribution of the explicit splitting scheme.

60Proof. Introducing the errors e u = u −U and e p = p − P , we use the chain rule identities to obtain, 〈g u P e u + g p e p , q〉 = 〈g(P u, p) − g(P U , P ), q〉, Now substituting e p for q in (4.9) and applying integration by parts we arrive at,

61Now we apply (4.21),

62(4.23)

63A similar computation for e u leads to,

64(4.24)

65Summing (4.23) over all m, combining it with (4.24) and using (4.18) and (4.19) leads to,

66(4.25)

67Now, using (2.4) and (2.5), and summing over all n, Addition and subtraction of I n ( f (U , RP ), φ u ) d t and I n 〈g(P U n−1 , P ), φ p 〉 d t , integration by parts on a(U , φ u ) and the use of Galerkin orthogonalities (3.13) and (3.14) to subtract the interpolants Π n π u n φ u and π p m,n φ p completes the proof.

The implicit-explicit adjoint problem and error representation formula

68Lemma 4.1 gives an error representation formula that requires numerical solution of the fully implicit adjoint problem. Alternatively, we consider an adjoint that employs the same discretization steps as used for the original model. The exact implicit-explicit adjoint corresponding to the implicit-explicit numerical scheme reads: For n = N , . . . , 1, find φ p (t ) ∈ [L 2 (I m,n )] N r on m = 1, . . . , M n such that

69(4.27)

70Note the use of φ u,n , which is known from the time interval I n+1 . Then find φ u (x, t ) ∈ L 2 (I n , H 1 (Ω)) such that

71(4.28)

72The corresponding iterative method follows.

73(4.36)

74The first five terms are similar to the error representation in Lemma 4.1. The last term is the contribution of the transfer error from the ODEs to the PDE through f , weighted by the effect of the splitting of the adjoint equations.

75Proof. The proof proceeds as in the case of Theorem 4.1. However we have to account for the implicitexplicit solve of the adjoint, which shows up in the analogue of (4.23) as,

76(4.37)

77The presence of the term involving φ u,n prevents use of the fact that p and u satisfy (2.4) and (2.5) . Thus, we add and subtract I m,n 〈f p Re p , φ u 〉 d t to (4.37). The rest of the proof follows as before.

78The addition and subtraction of the additional term leads to the sixth term in the error representation formula. where the subscripts indicate restriction. For these to be computable we replace φ u and φ p by the discrete approximations Φ u and Φ p respectively. This leads to additional terms in the representation that cannot be estimated but are relatively small in the limit of discretization refinement.

Furthermore, these indicators can be approximated by the computable indicators AE x , AE t and AE s as

79Proof. We have to account for the effect of replacing the exact adjoints φ u and φ p with the approximations Φ u ∈ W r u +1 n and Φ p ∈ Q r p +1 m,n obtained by finite element discretizations similar to (3.14) and (3.13), but with q ∈ Q r p m,n and v ∈ W r u n . The effect on E (U , P ) of replacing φ u with Φ u in (4.31) -(4.36) leads to additional terms with weights of the type φ u − Φ u . However, these additional terms are higher order. The same holds for replacing φ p with Φ p . Since these errors are negligible we do not indicate this change in the terms I -V I below.

80To have separate indicators for the spatial and the temporal contributions from discretization of the PDE and the contribution for the discretization of the ODEs, we decompose the error E (U , P ) into parts corresponding to these contributions. To distinguish the different contributions, we note that term I I (4.32) contributes both to errors in space as well as in time. To deal with this, we write

81which gives I I n = I I x n + I I t n , where

82(4.45)

83where R u,K is the algebraic equivalent to (4.4), since Π n Φ u ∈ V h n . Term I V n involve the exact quantity R, which is not computable. We compute an approximation of this term by sampling at a large number of points to form R and then choose only a subset of these samples to form R.

84Finally, the Term V I n involving e p , which arises from the choice of a computationally-tractable adjoint problem, is not directly computable. In some cases, such terms can be approximated at the cost of solving auxiliary adjoint problems [12]. Alternatively, a rigorous mathematical analysis showing such terms are small relative to the computable terms in the error estimate is carried out in [15]. Intuitively V I n is small in the limit of discretization refinement because involves a product of the errors e p and φ u − φ u,n . On the other hand, if V I n is large, we expect the other terms in the error estimate to be large as well. Hence, while the error estimate may not capture the true error accurately in this case, it is still be reliable in the sense of indicating a large error in the numerical solution.

Discretization details

85For discretization in space of the PDE, the partition T h n of Ω consists of hexahedral elements with trilinear basis functions for the primal PDE problem and triquadratic basis functions for its adjoint. The capability for spatial mesh adaptivity, including refinement and derefinement, is provided by the use of hanging nodes, where at most one hanging node per edge or face is allowed. Conformity of the basis at the hanging nodes is obtained by interpolation using the neighboring nodes, see [19]. Handling of such shape regular but non-uniform meshes is alleviated by an octree-based data structure [20].

86For the stochastic discretization of the microscale ODEs, the Voronoi cells ω j are generated by N ω uniformly distributed random points in Ω. Given these points, the corresponding Voronoi tessellation is generated by calling the Voro++ library [21]. Since this tessellation is generally not aligned with T h n (as can be seen in Fig. 3.2) a map from each quadrature point in each T h n to the corresponding Voronoi cell is constructed. This procedure requires searching the Voronoi diagram, but the library supplies efficient routines for doing this. Moreover, T h n only varies when the mesh is changed, which happens fairly infrequently in the block adaptivity approach that we use (described in the next section). We sample by using 10 random points in each ω j to compute RP in Term IV (cf. (4.34)) and sample using 1 point to compute (3.9) or (3.10).

87Computing the projection P is performed using the same data structures created for R: We sample 10 points in each ω j , and for each of these points, we find the corresponding element in T h n and compute the function value at that point. Then we average over these function values to get the projection over ω j .

88The temporal discretization of the primal and adjoint PDE problem is performed using a dG(0) and a cG(1) respectively. For the ODEs, a dG(1) method is used for the primal and a dG(2) method for its adjoint. The ODEs are initially solved on the same temporal discretization as the PDE. However, the ODEs are allowed to have individual time steps in each slab K × I n (see Section 3). To determine these time steps, as well as the discretization of the PDE, we use blockwise adaptivity [17], which is a more efficient procedure than a standard compute -estimate -mark -refine strategy. This is described in the following section. Finally, the adjoint time discretization is set to be equal to the temporal discretization for the forward problem.

89To be able to represent data on the different grids, the octree data structure facilitates the projection and interpolation routines that are necessary. To alleviate the matrix allocations, assembly of the matrices and vectors as well as solving the linear systems involved we take use of the PETSc library [22]. We use its conjugated gradient method with the incomplete LU factorization as preconditioner. A Newton method is used for performing the nonlinear iterations for the primal PDE and ODEs.

90Finally, despite the higher order method used for the adjoints, the costs can be compared with those for the forward problem due to the fact that they are linear.

Blockwise adaptive error control

91To determine spatial and temporal refinement, the adaptive algorithm called blockwise adaptivity is used. This procedure, introduced by Carey et. al. in [17], is built upon the creation of a sequence of blocks of meshes. The meshes that constitute the block are carefully created to guarantee that the numerical method is accurate in terms of the goal functional as well as being efficient in the sense that they are as coarse as possible.

92The blocks form the partition in time by 0 = T 0 < T 1 < · · · < T B = T . In each block, both the spatial and temporal meshes are fixed but possibly non-uniform. Given initial primal and adjoint solutions on a coarse discretization, the algorithm is based on an absolute tolerance ATOL for the total error, the Principle of Equidistribution and a strategy for computing blocks. The Principle of Equidistribution says that an optimal mesh for controlling ATOL is obtained when the element contributions are approximately equal, see e.g. Eriksson et. al. [6].

93The strategy may be based on a criteria, for example the maximum size of a mesh due to limitations in computer memory. This strategy, known as a memory-bound strategy, is employed in this paper. Other strategies include forming blocks by considering changes in the topology of the meshes. For the memory-bound strategy we place upper bounds on the number of degrees of freedom, such that there are • a maximum number of spatial elements xMAX,

94• a maximum number of PDE time intervals tMAX,

95• a maximum number of ODE time intervals sMAX.

96Each of this restrictions may define end time of blocks. For completeness we briefly present this method, but is thoroughly described in [17].

97Assuming that in a mesh there are N x space elements, N macro time intervals and M n subintervals in each macro interval, there is a total of N x N M n space-time subslabs in the initial discretization. The Principle of Equidistribution determines an approximate local error tolerance on each subslab of

98since there are three different contributions to the error which should be equal: The spatial and temporal part of the PDE and the ODE. The next step is to predict meshes such that each element contribution is approximately LATOL. For example, standard a priori analysis may show that the error E s | I m,n on a subinterval of size ∆s is of the order of (∆s) r for some r . Due to the Principle of Equidistribution, the desired error should be LATOL. If this requires a subinterval of size ∆s new we have by proportionality It should be noted that if the original discretization is finer than needed, then ∆s new > ∆s, which suggests coarsening. Moreover, ∆s new is in fact a computable quantity, since E s | I m,n ≈ AE s | I m,n (cf. equations (4.40) and (4.43)). For the space and discretizations of the PDE, the procedure is similar and uses the approximations AE x and AE t defined in (4.41) and (4.42).

99Using the memory bound strategy, we determine that the predicted number of elements that are of interest. Thus, besides (5.4) we also need to predict the number of elements in space and time for the PDE. The latter is done using a similar quotient as (5.4), but for the former, there is a scaling factor with the dimension d = 3 as

100where r is the order of convergence in space.

101Using the predicted number of spatial elements (5.5), one can create a block by starting at T 0 = 0, loop over time and add up the total number of predicted number of elements until the sum is about equal to xMAX or tMAX. Then this time defines T 1 . If the maximum predicted number of ODE steps over all spatial elements exceeds sMAX, that PDE time interval is to be refined, thus increasing the predicted number of PDE time intervals. The second block starts with T 1 and is formed analogously.

102Derefinement is restricted to the resolution of the initial coarse mesh, both is space and time. In addition to the three restriction criteria above, a sufficiently coarse predicted mesh may also define the end of a block. This can be determined by a parameter θ defined as θ = #elements in current block #elements predicted for the next block . (5.6) We coarsen the mesh when θ > 10. We note there can be significant contributions to the error if the meshes on adjacent blocks are sufficiently different [17]. We do not include expressions estimating these contributions in the a posteriori error estimate. Rather, we reduce the impact of such contributions by using the maximum error estimate in the final time interval of the previous block to determine the refinements of the first time interval on the next block.

103Below, we use one iteration of the block adaptive algorithm, so the PDE-ODE system is solved once on the initial coarse mesh. This initial mesh is then refined in space and time according to the strategy described above with ATOL ≈ 10% of the approximate total error estimate AE x + AE t + AE s for the initial mesh.

A numerical example

104We consider a problem from electrocardiography known as the monodomain model (cf. [3]), which is (2.4) where u is the transmembrane potential, i.e. the potential difference over the cell membrane and f is a current of charged ions. We assume Ω = [0, 1] 3 , T = 400 ms, and a constant conductivity = 0.1. The initial value u 0 is set such that there is an excited region close to the origin, which decreases to a resting value using smoothed Heaviside functions G δ as,

105where r = |x| − r 0 and,

106Three of the gating variables are fast and thus sensitive to changes in the potential, the other three are slower. See the seminal paper by Hodgkin and Huxley [24] for a thorough analysis of the modeling of the gating variables. Beeler and Reuter uses the following general expression for the rate functions

107exp(c 6 (u + c 3 )) + c 7 , (6.4) and the values for the constants c k , k = 1, . . . , 7, can be found in [23]. The seventh ODE variable models the concentration of calcium ions inside the cell, and is governed by the ODEṗ 7 = −a 0 j S (u, p) − b 0 (a 0 − p 7 ), (6.5) where a 0 and b 0 are constants and j S is a current depending on the potential u and the gating variables. The coupling to the PDE is through the ion current f = j i on which is sum of different currents, j i on (u, p) = −( j N a (P u, p) + j S (P u, p) + j X (P u, p) + j K (P u)). (6.6) Similar to j S , the currents j N a and j X depend on the potential u and the gating variables. The current j K depend only on the potential u.

108We are interested in controlling the average error in the PDE solution, so we set ψ u = 1 and ψ p = 0.

109For the initial temporal discretization of the PDE, a time step of ∆t = 0.1 is chosen up to t = 10, after which point we use ∆t = 1. The total initial total number of time steps is thus 490. The motivation for this initial non-uniform discretization is that it is known a priori that the dynamics is rapid in the beginning of the front. We use L n = 2 for all n.

110To form the initial spatial mesh, Ω is uniformly subdivided into 16 3 = 4096 elements. The adjoint PDE problem is solved on this mesh resolution for all times, even though the primal mesh is refined. Moreover we set N ω = 75000.

111The parameters for blockwise adaptivity are set to be xMAX = 75000 (i.e. equal to N ω ), tMAX = 1000 and sMAX = 20.

Results

112Fig. 6.1 illustrates U and Φ u at t = 0.5 ms on the refined mesh. It is clear how the adjoint is large at the front. For later times, after wave has passed over the domain, the solution have little variation in space as shown in Fig. 6.2. The adjoint also has little variation in space.

113The dynamics of the PDE and its adjoint are clearly visible in Fig. 6.3, which illustrates the solutions in the center of Ω, i.e. at (0.5, 0.5, 0.5). The left graph shows that there is a very steep gradient of U in the first 5 ms of the simulation after which the solution then decays fairly smoothly back to its initial and resting value after about 300 ms. The adjoint solution Φ u in the right plot of Fig. 6.3 has a large peak around 240 ms. This may seem surprising at first, but its explanation can be found by looking at the dynamics of the coupled ODEs in Figures 6.4, 6.5 and 6.6.

114Recalling that the six of the ODE variables are gating variables and one models the calcium ion concentration, we can identify two types of gating variables by looking at Figures 6.4, 6.5 and 6.6. Three rapid gating variables in Fig. 6.4, which has a fast change in state in the beginning and then returns to its original state after about 250-350 ms -thus slightly later than the large peak of Φ u . Moreover, the calcium concentration in Fig. 6.5 seem to be strongly related to Φ u at around 220 ms. Fig. 6.6 illustrates three slower gating variables, and similar to the calcium concentration, they are less influential for small t but rather have their significance when the system goes back to its resting state.

115To examine convergence properties, we evaluate the error terms after varying the number of iterations L n in the iterative multirate method, the spatial and temporal mesh sizes of the PDE as well as the time steps of the ODEs. These four parameters were changed uniformly to produce Figures 6.7 and 6.8. The default values in these experiments are 4096 elements, ∆t = ∆s = 0.1, L n = 1, N ω = 10000 and T = 20. As can be seen the errors in the various terms of (4.29) decrease as expected. The main observation is that the splitting error Term V dominates the total error, but can be controlled by increasing L n , cf. Fig. 6.8. In Fig. 6.9 we show the effect of varying the number of Voronoi cells, N ω , which also show expected behavior.

116The large dynamics in the system are naturally manifested in the number of blocks, and the spatial and temporal discretizations on these blocks. With the given tolerances and parameter values, 8 blocks are obtained and basic statistics about these blocks can be found in Table 6.1. As can be seen, the sizes of the first four blocks are limited by the xMAX criteria, with predicted number of elements being 77309, 79829, 94074 and 87403. Recalling that xMAX = 75000, we thus obtain significantly more elements. This can be understood by looking at the block creation procedure in detail. For example, considering block 3, the predicted number of elements for the first interval (2.3, 2.4] was 48987. Since this is less than xMAX, the procedure considers also the next interval (2.4, 2.5]. The predicted number of elements for the total interval (2.3, 2.5] results in 71870 elements. This is also less than xMAX, albeit close. The fact that this prediction is close to xMAX and knowing that the dynamics of the problem is rapid could suggest that the block should be ended. In the implementation here, the xMAX criterion is a strict inequality and the interval (2.5, 2.6] is considered. This results in a prediction of 94074 elements to guarantee error control. The true number of elements obtained are slightly larger, although less than 1 %, due to the constraint of having at most one hanging node per element edge.

117The blocks 5, 6, 7 and 8 have the same spatial discretization with 45718 elements. Recall that the reason for the spatial meshes not being coarsened is due to the parameter θ (5.6). As can be seen in Table 6.1, blocks 5, 6 and 7 are limited in time by the tMAX = 1000 criteria. Finally we note that the variation in time is great: the time step size for the PDE and the ODEs are in the range of 10 −3 to 1 ms and 10 −4 to 1 ms respectively. Fig. 6.10 illustrates the various time steps over time for the PDE.

Conclusion

118We consider a problem of a macroscale parabolic PDE which is coupled to a set of microscale ODEs. We introduce an intermediate scale to couple information between the scales, and use projections to transfer information to the intermediate scale. We use a Monte Carlo method to deal with the very high dimension of the system of ODEs. We also allow the ODEs to be solved on a much finer scale than the PDE. We derive an adjoint-based a posteriori estimate that accounts for all of the key discretization components, and use the estimate to derive indicators of element contributions to the error both in space and time for the PDE and in time for the ODEs. The estimates take into account errors in the data passed between the PDE and the ODEs, as well as the fact that the ODEs are modeled on a much smaller scale than that of the PDE. The indicators are used to guide an algorithm for adaptive error control.

119Finally, we test the adaptive algorithm on a realistic problem. Future work could consider parallel blockwise adaptivity. Since the ODEs in this model do not interact inbetween spatial elements, this set of ODEs constitute an embarrassingly parallel problem and can simply be parallelized using a graphical processing unit, GPU. Developing adaptive algorithms designed for modern computer technologies with several memory hierarchies such as a GPU are indeed interesting, and the blockwise adaptivity could be one method for limiting the number of data transfers between hierarchies.

참고문헌 24건

  1. A bi-domain model for describing ischemic myocardial d-c potentials. DSpace@MIT (Massachusetts Institute of Technology) · Massachusetts Institute of Technology · 1978
  2. Voro++: a three-dimensional Voronoi cell library in C++ 2009 10.2172/946741
  3. Computational differential equations Choice Reviews Online · Association of College and Research Libraries · 1997 10.5860/choice.34-5733
  4. Voronoi diagrams—a survey of a fundamental geometric data structure ACM Computing Surveys · Association for Computing Machinery · 1991 10.1145/116873.116880
  5. An A Posteriori–A Priori Analysis of Multiscale Operator Splitting SIAM Journal on Numerical Analysis · Society for Industrial and Applied Mathematics · 2008 10.1137/07068237x
  6. Reconstruction of the action potential of ventricular myocardial fibres The Journal of Physiology · Wiley · 1977 10.1113/jphysiol.1977.sp011853
  7. A quantitative description of membrane current and its application to conduction and excitation in nerve The Journal of Physiology · Wiley · 1952 10.1113/jphysiol.1952.sp004764
  8. Adaptivity in Space and Time for Reaction-Diffusion Systems in Electrocardiology SIAM Journal on Scientific Computing · Society for Industrial and Applied Mathematics · 2006 10.1137/050634785
  9. Simple and Efficient Traversal Methods for Quadtrees and Octrees Journal of Graphics Tools · Taylor & Francis · 2002 10.1080/10867651.2002.10487560
  10. Modeling the Heart--from Genes to Cells to the Whole Organ Science · American Association for the Advancement of Science · 2002 10.1126/science.1069881
  11. Adjoint methods for PDEs: <i>a posteriori</i> error analysis and postprocessing by duality Acta Numerica · Cambridge University Press · 2002 10.1017/s096249290200003x
  12. Blockwise Adaptivity for Time Dependent Problems Based on Coarse Scale Adjoint Solutions SIAM Journal on Scientific Computing · Society for Industrial and Applied Mathematics · 2010 10.1137/090753826
  13. A Posteriori analysis of a multirate numerical method for ordinary differential equations Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 2012 10.1016/j.cma.2012.02.021
  14. Multi-Adaptive Galerkin Methods for ODEs I SIAM Journal on Scientific Computing · Society for Industrial and Applied Mathematics · 2003 10.1137/s1064827501389722
  15. A Posteriori Analysis and Adaptive Error Control for Multiscale Operator Decomposition Solution of Elliptic Systems I: Triangular Systems SIAM Journal on Numerical Analysis · Society for Industrial and Applied Mathematics · 2009 10.1137/070689917
  16. <scp>VORO++</scp>: A three-dimensional Voronoi cell library in C++ Chaos An Interdisciplinary Journal of Nonlinear Science · American Institute of Physics · 2009 10.1063/1.3215722
  17. Aspects of an adaptive hp-finite element method: Adaptive strategy, conforming approximation and efficient solvers Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 1997 10.1016/s0045-7825(97)00101-1
  18. A posteriori analysis of an iterative multi-discretization method for reaction–diffusion systems Computer Methods in Applied Mechanics and Engineering · Elsevier BV · 2013 10.1016/j.cma.2013.08.007
  19. Estimating the error of numerical solutions of systems of reaction-diffusion equations Memoirs of the American Mathematical Society · American Mathematical Society · 2000 10.1090/memo/0696
  20. A posteriori analysis and adaptive error control for operator decomposition solution of coupled semilinear elliptic systems International Journal for Numerical Methods in Engineering · Wiley · 2013 10.1002/nme.4482
  21. Introduction to Adaptive Methods for Differential Equations Acta Numerica · Cambridge University Press · 1995 10.1017/s0962492900002531
  22. Adaptive Finite Element Methods for Differential Equations Birkhäuser Basel eBooks · Birkhäuser Basel · 2003 10.1007/978-3-0348-7605-6
  23. Simple and Efficient Traversal Methods for Quadtrees and Octrees A K Peters/CRC Press eBooks · Informa · 2005 10.1201/b10628-3
  24. A quantitative description of membrane current and its application to conduction and excitation in nerve Bulletin of Mathematical Biology · Springer Science+Business Media · 1990 10.1016/s0092-8240(05)80004-7