You do not have permission to edit this page, for the following reason:

You are not allowed to execute the action you have requested.


You can view and copy the source of this page.

x
 
1
<!-- metadata commented in wiki content
2
==General foundations of high-order immersed interface methods   to solve interface problems==
3
4
'''H. Escamilla Puc<sup>a</sup>, R. Itza Balam<sup>b,c</sup>, M. Uh Zapata<sup>b,c</sup>'''
5
6
{|
7
|-
8
|<sup>a</sup> Facultad de Matemáticas; Anillo Periférico Norte, Tablaje Cat. 13615, Colonia Chuburná Hidalgo Inn, Mérida, México
9
|}
10
11
{|
12
|-
13
|<sup>b</sup> Centro de Investigación en Matemáticas A. C., CIMAT Unidad Mérida, México
14
|}
15
16
{|
17
|-
18
|<sup>c</sup> Consejo Nacional de Humanidades, Ciencias y Tecnologías, CONAHCYT, México
19
|}
20
-->
21
22
==Abstract==
23
24
This work forms the foundation for addressing high-order immersed interface methods to solve interface problems and enables us to conduct in-depth examination of this theory. Here, we focus on the introduction a fourth-order finite-difference formulation to approximate the second-order derivative of discontinuous functions. The approach is based on the combination of a high-order implicit formulation and the immersed interface method. The idea is to modify the standard schemes by introducing additional contribution terms based on jump conditions. These contributions are calculated only at grid points where the stencil intersects with the interface. Here, we discuss the issues of implementing the one-dimensional Poisson equation and the heat conduction equation with discontinuous solutions as a three-point stencil for each grid point on the computational domain. In both cases, the resulting discretization approach yields a tridiagonal linear system with matrix coefficients identical to those employed for smooth solutions. We present several numerical experiments to verify the feasibility and accuracy of the method. Thus, this high-order method provides an attractive numerical framework that can efficiently lead to the solution to more complex problems.
25
26
'''keywords'''
27
28
Immersed interface method, implicit finite difference, fourth-order accuracy, Poisson equation, heat conduction equation
29
30
==1 Introduction==
31
32
High-order numerical solutions to differential equations arising from discontinuous solutions find extensive utility across various research domains <span id='citeF-1'></span><span id='citeF-2'></span><span id='citeF-3'></span><span id='citeF-4'></span><span id='citeF-5'></span><span id='citeF-6'></span>[[#cite-1|[1,2,3,4,5,6]]]. In the case of smooth solutions, the standard central finite-difference method requires a significant number of grid points to achieve a high level of accuracy in its numerical results. As a result, over the past few decades, several schemes have been developed to obtain fourth- and sixth-order finite-difference methods <span id='citeF-7'></span><span id='citeF-8'></span><span id='citeF-9'></span><span id='citeF-10'></span><span id='citeF-11'></span>[[#cite-7|[7,8,9,10,11]]], including those one based on the implicit finite-difference (IFD) formulation <span id='citeF-12'></span><span id='citeF-13'></span><span id='citeF-14'></span><span id='citeF-15'></span>[[#cite-12|[12,13,14,15]]].
33
34
On the other hand, although several methods have been proposed to address discontinuous problems <span id='citeF-2'></span><span id='citeF-16'></span><span id='citeF-17'></span><span id='citeF-18'></span><span id='citeF-19'></span><span id='citeF-20'></span><span id='citeF-21'></span>[[#cite-2|[2,16,17,18,19,20,21]]], the Immersed Interface Method (IIM) <span id='citeF-22'></span><span id='citeF-23'></span><span id='citeF-24'></span><span id='citeF-25'></span>[[#cite-22|[22,23,24,25]]] stands out as a highly accurate option that requires minimal adjustments to the standard finite-difference formulation. However, these methods typically achieve second-order accuracy. For instance, there are limited implementations of a few third-, fourth- and sixth-order IIMs available for solving Poisson equations with discontinuous solutions <span id='citeF-26'></span><span id='citeF-27'></span><span id='citeF-28'></span><span id='citeF-29'></span><span id='citeF-30'></span><span id='citeF-31'></span><span id='citeF-32'></span><span id='citeF-33'></span>[[#cite-26|[26,27,28,29,30,31,32,33]]].
35
36
This paper focuses on the basic ideas of combining the implicit finite-difference and immersed interface method (IFD-IIM) to achieve high-order approximations for second-order derivatives of both continuous and discontinuous real-valued functions. The IFD scheme offers a highly accurate numerical method <span id='citeF-34'></span><span id='citeF-35'></span>[[#cite-34|[34,35]]], while the IIM handles discontinuities through minimal adjustments made exclusively at grid points where the stencil intersects the interface <span id='citeF-36'></span><span id='citeF-37'></span>[[#cite-36|[36,37]]], yielding additional terms known as jump contributions.
37
38
We illustrate the implementation of the IFD-IIM approach with two examples: the one-dimensional Poisson equation for static cases and the heat conduction equation with a fixed interface for time-evolving scenarios. Our proposed method offers several advantages. Notably, the resulting tridiagonal matrix coefficient of the finite-difference scheme remains the same as those for smooth solutions, with the additional terms arising from the jumps located in the right-hand side vector. Consequently, our algorithm is straightforward to implement, employing the efficient Thomas' algorithm.
39
40
We have organized our study as follows. In Section 2, we introduce a fourth-order implicit finite-difference method capable of handling second-order derivatives, both in smooth and discontinuous scenarios. Section 3 demonstrates the application of this implicit scheme in approximating solutions to the one-dimensional Poisson equation. Section 4 shows the combination of the IFD-IIM with the Crank-Nicolson method to solve the heat conduction equation. Sections 5 and 6 provides a series of numerical examples to illustrate the algorithm's accuracy for both equations. Lastly, Section 7 offers our conclusions and outlines directions for future research.
41
42
==2 Implicit finite-difference formulation with discontinuities==
43
44
In this section, we outline the key attributes of the implicit finite difference formulation, demonstrating how the scheme can be adapted for addressing discontinuous problems through the utilization of the immersed interface method.
45
46
We approximate the numerical solution on the domain <math display="inline">[\mathfrak{a},\,\mathfrak{b}]</math> that is divided into <math display="inline">N</math> sub-intervals, as follows
47
48
<span id="eq-1"></span>
49
{| class="formulaSCP" style="width: 100%; text-align: left;" 
50
|-
51
| 
52
{| style="text-align: left; margin:auto;width: 100%;" 
53
|-
54
| style="text-align: center;" | <math>x_i = \mathfrak{a} + (i-1)h, \qquad i=1, 2, \dots , N,N+1,   </math>
55
|}
56
| style="width: 5px;text-align: right;white-space: nowrap;" | (1)
57
|}
58
59
where the grid size is given by <math display="inline">h=(\mathfrak{b}-\mathfrak{a})/N</math>. We employ <math display="inline">U_i</math> and <math display="inline">u_i = u(x_i)</math> to denote the approximate and exact solution at the <math display="inline">i</math>th-point of the grid, respectively. Here, the interface is at <math display="inline">x=x_\alpha </math> located between grid points <math display="inline">x_I</math> and <math display="inline">x_{I+1}</math> as <math display="inline">x_I\leq x_\alpha{<}x_{I+1}</math>, see Fig.&nbsp;[[#img-1|1]]. The distances of the closest grid points to the interface are defined as <math display="inline">h_{L} = x_{I}-x_\alpha </math> and <math display="inline">h_{R} = x_{I+1}-x_\alpha </math>. Note that <math display="inline">h_{R}</math> and <math display="inline">h_{L}</math> are positive and negative values, respectively.
60
61
<div id='img-1'></div>
62
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
63
|-
64
|[[Image:Draft_Uh Zapata_643844164-Fig_Scheme.png|594px|Example of a discontinuous function u with an interface located between the points x<sub>I</sub> and x<sub>I+1</sub>.]]
65
|- style="text-align: center; font-size: 75%;"
66
| colspan="1" | '''Figure 1:''' Example of a discontinuous function <math>u</math> with an interface located between the points <math>x_{I}</math> and <math>x_{I+1}</math>.
67
|}
68
69
On the other hand, the jump for <math display="inline">u</math> at <math display="inline">x_\alpha </math> is defined as
70
71
<span id="eq-2"></span>
72
{| class="formulaSCP" style="width: 100%; text-align: left;" 
73
|-
74
| 
75
{| style="text-align: left; margin:auto;width: 100%;" 
76
|-
77
| style="text-align: center;" | <math>\left[u \right]= u^{+} - u^{-}, \quad \mathrm{where} \quad u^{+} = u(x_\alpha ^{+} )= \lim _{x\to x_\alpha ^+}u(x),\quad \mathrm{and} \quad  u^{-} = u(x_\alpha ^{-}) = \lim _{x\to x_\alpha ^-}u(x).  </math>
78
|}
79
|}
80
81
We employ a similar definition for the jumps such as the ones of the right-hand side and the derivatives of <math display="inline">u</math>.
82
83
In this paper, we designate <math display="inline">x_I</math> and <math display="inline">x_{I+1}</math> as ''irregular points'', while considering the rest as ''regular points''. This classification holds significant importance as distinct schemes are applied to each category, as presented in the following theorems.
84
85
===2.1 Second-order derivative approximation for regular and irregular grid points===
86
87
The following two Theorems state the main results to approximate the second-order derivative using high-order schemes for regular and irregular points.
88
89
<span id='theorem-teo:regular'></span>Theorem 1:  '''Regular points''' <span id='citeF-34'></span><span id='citeF-35'></span>[[#cite-34|[34,35]]]. Let us consider a real-valued function <math display="inline">u</math> with an interface <math display="inline">x_\alpha </math> such that <math display="inline">x_I\leq x_\alpha{<}x_{I+1}</math>. Then <math display="inline">u_{xx}</math> can be approximated by the implicit finite-difference (IFD) scheme
90
91
<span id="eq-2"></span>
92
{| class="formulaSCP" style="width: 100%; text-align: left;" 
93
|-
94
| 
95
{| style="text-align: left; margin:auto;width: 100%;" 
96
|-
97
| style="text-align: center;" | <math>\left.\mathfrak{D}^2 u_{xx}\right|_i = \left.\delta ^2 u\right|_i + O(h^4), \quad i \neq I, I+1,    </math>
98
|}
99
| style="width: 5px;text-align: right;white-space: nowrap;" | (2)
100
|}
101
102
where
103
104
<span id="eq-3"></span>
105
{| class="formulaSCP" style="width: 100%; text-align: left;" 
106
|-
107
| 
108
{| style="text-align: left; margin:auto;width: 100%;" 
109
|-
110
| style="text-align: center;" | <math>\mathfrak{D}^2(\cdot )  :=  (\cdot )  + bh^2 (\cdot )_{xx},   </math>
111
|}
112
| style="width: 5px;text-align: right;white-space: nowrap;" | (3)
113
|}
114
115
<math display="inline">b=1/12</math>, and central finite-difference formula <math display="inline">\delta ^2</math> is given by
116
117
<span id="eq-4"></span>
118
{| class="formulaSCP" style="width: 100%; text-align: left;" 
119
|-
120
| 
121
{| style="text-align: left; margin:auto;width: 100%;" 
122
|-
123
| style="text-align: center;" | <math>\left.\delta ^2 u\right|_i := \frac{1}{h^2} \left\{u_{i-1}-2u_i+u_{i+1}\right\}.  </math>
124
|}
125
| style="width: 5px;text-align: right;white-space: nowrap;" | (4)
126
|}
127
128
From Taylor series expansions and under some simplifications, the second-order derivative at any regular point <math display="inline">x_i</math> can be written in terms of the centered finite-difference operator, as follows
129
130
<span id="eq-5"></span>
131
{| class="formulaSCP" style="width: 100%; text-align: left;" 
132
|-
133
| 
134
{| style="text-align: left; margin:auto;width: 100%;" 
135
|-
136
| style="text-align: center;" | <math>\left.u_{xx}\right|_i = \frac{1}{h^2} \left\{u_{i-1}-2u_i+u_{i+1}\right\}- \frac{1}{12}h^2\left.u_{xxxx}\right|_i +O(h^4),   </math>
137
|}
138
|}
139
140
Previous equation holds due to the solution is smooth on a neighborhood around <math display="inline">x_{i}</math>. Thus, we obtain a fourth-order IFD using a stencil of three nodes by moving the fourth-order term to the left-hand side. We get
141
142
{| class="formulaSCP" style="width: 100%; text-align: left;" 
143
|-
144
| 
145
{| style="text-align: left; margin:auto;width: 100%;" 
146
|-
147
| style="text-align: center;" | <math>\left.u_{xx}\right|_i +  \frac{1}{12}h^2 \left(\left.u_{xx} \right)_{xx}\right|_i = \frac{1}{h^2} \left\{u_{i-1}-2u_i+u_{i+1}\right\}+ O(h^4).  </math>
148
|}
149
|}
150
151
Finally, the proof is completed by using the definition of operator <math display="inline">\mathfrak{D}^2</math>, <math display="inline">\delta ^2</math>, and <math display="inline">b</math>.
152
153
It is important to remark that formula [[#eq-2|(2)]] is applicable exclusively for regular points. In order to address this limitation for the two irregular points near the interface, we introduce a modified implicit finite-difference scheme using the IIM, specifically tailored to handle discontinuous solutions. Furthermore, instead of having a fourth-order local truncation error for the irregular points, we proceed as other IIMs <span id='citeF-22'></span><span id='citeF-23'></span><span id='citeF-24'></span><span id='citeF-29'></span><span id='citeF-33'></span><span id='citeF-32'></span>[[#cite-22|[22,23,24,29,33,32]]] by taking one order lower at these points. We will numerically show that the global order of convergence can be still <math display="inline">O(h^4)</math> even if the local truncation error at <math display="inline">i=I</math> and <math display="inline">i=I+1</math> is <math display="inline">O(h^{3})</math>.
154
155
<span id='theorem-teo:irregular'></span>Theorem 2:  '''Irregular points''' <span id='citeF-14'></span>[[#cite-14|[14]]]. Let us consider the known jump conditions
156
157
<span id="eq-5"></span>
158
{| class="formulaSCP" style="width: 100%; text-align: left;" 
159
|-
160
| 
161
{| style="text-align: left; margin:auto;width: 100%;" 
162
|-
163
| style="text-align: center;" | <math>\left[u \right],\quad  \left[u_{x} \right],\quad  \left[u_{xx} \right],\quad  \left[u_{xxx} \right],\quad  \left[u_{xxxx} \right],\quad   </math>
164
|}
165
| style="width: 5px;text-align: right;white-space: nowrap;" | (5)
166
|}
167
168
at <math display="inline">x_\alpha </math> such that <math display="inline">x_I\leq x_\alpha{<}x_{I+1}</math>. Then <math display="inline">u_{xx}</math> can be approximated at <math display="inline">x_I</math> and <math display="inline">x_{I+1}</math> by the implicit finite-difference immersed interface method (IFD-IIM) given by
169
170
<span id="eq-6"></span>
171
{| class="formulaSCP" style="width: 100%; text-align: left;" 
172
|-
173
| 
174
{| style="text-align: left; margin:auto;width: 100%;" 
175
|-
176
| style="text-align: center;" | <math>\mathfrak{D}^2 u_{xx}\left.\right|_i = \left.\delta ^2 u\right|_i + C_i + O(h^3), \quad i= I, I+1,    </math>
177
|}
178
| style="width: 5px;text-align: right;white-space: nowrap;" | (6)
179
|}
180
181
where <math display="inline">\mathfrak{D}^2</math> and <math display="inline">\delta ^2</math> are defined in [[#eq-3|(3)]] and [[#eq-4|(4)]], respectively, and
182
183
<span id="eq-7"></span>
184
{| class="formulaSCP" style="width: 100%; text-align: left;" 
185
|-
186
| 
187
{| style="text-align: left; margin:auto;width: 100%;" 
188
|-
189
| style="text-align: center;" | <math>C_i =  \begin{cases}- \dfrac{1}{h^2}\left\{[u]+h_R\left[u_{x}\right]+\dfrac{h_R^2}{2}\left[u_{xx} \right]+b\left(2h_R^3\left[u_{xxx} \right]+\dfrac{h_R^4}{2}\left[u_{xxxx} \right]\right)\right\}, & i=I, \\[3mm]    \dfrac{1}{h^2}\left\{[u]+h_L\left[u_{x} \right]+\dfrac{h_L^2}{2}\left[u_{xx} \right]+ b \left(2h_L^3\left[u_{xxx} \right]+\dfrac{h_L^4}{2}\left[u_{xxxx} \right]\right)\right\}, & i=I+1, \end{cases}  </math>
190
|}
191
| style="width: 5px;text-align: right;white-space: nowrap;" | (7)
192
|}
193
194
and where <math display="inline">b=1/12</math>.
195
196
We obtain a third-order scheme for at <math display="inline">x_I</math> and <math display="inline">x_{I+1}</math> following similar ideas as the ones developed for the generalized Taylor expansion proposed by Xu & Wang <span id='citeF-36'></span>[[#cite-36|[36]]] and the IIM for elliptic interface problems with straight interfaces proposed by Feng & Li <span id='citeF-37'></span>[[#cite-37|[37]]]. The idea is to consider extended smooth solutions of <math display="inline">u</math> such that we can apply the standard central scheme to <math display="inline">x_I</math> and <math display="inline">x_{I+1}</math>. For instance, a function based on the original left solution is defined as
197
198
<span id="eq-8"></span>
199
{| class="formulaSCP" style="width: 100%; text-align: left;" 
200
|-
201
| 
202
{| style="text-align: left; margin:auto;width: 100%;" 
203
|-
204
| style="text-align: center;" | <math>u_\ell (x) = \begin{cases}u(x), & x\leq x_\alpha ,\\ \displaystyle u^-+h_R u_{x}^{-}+\frac{h_R^2}{2}u_{xx}^{-} +\dfrac{h_R^3}{6}u_{xxx}^{-}+\dfrac{h_R^4}{24}u_{xxxx}^{-} , & x_\alpha{<}x,\\ \end{cases}  </math>
205
|}
206
|}
207
208
Using Taylor series expansions of <math display="inline">u_{I+1}</math> around <math display="inline">x_\alpha </math>, the definition of jumps [[#eq-5|(5)]], and some simplification yield
209
210
{| class="formulaSCP" style="width: 100%; text-align: left;" 
211
|-
212
| 
213
{| style="text-align: left; margin:auto;width: 100%;" 
214
|-
215
| style="text-align: center;" | <math>\left.\delta ^2 u\right|_I = \left.\delta ^2 u_{\ell }\right|_I + \dfrac{1}{h^2}\left([u]+h_R\left[u_{x} \right]+\dfrac{h_R^2}{2}\left[u_{xx} \right]+\dfrac{h_R^3}{6}\left[u_{xxx} \right]+\dfrac{h_R^4}{24}\left[u_{xxxx} \right]\right)+O(h^3). </math>
216
|}
217
|}
218
219
Thus,
220
221
{| class="formulaSCP" style="width: 100%; text-align: left;" 
222
|-
223
| 
224
{| style="text-align: left; margin:auto;width: 100%;" 
225
|-
226
| style="text-align: center;" | <math>\left.\delta ^2 u\right|_I =  \left.(u_\ell )_{xx} \right|_I + bh^2 \left.(u_\ell )_{xxxx} \right|_I +\dfrac{1}{h^2}\left([u]+h_R\left[u_{x} \right]+\dfrac{h_R^2}{2}\left[u_{xx} \right]+\dfrac{h_R^3}{6}\left[u_{xxx} \right]+\dfrac{h_R^4}{24}\left[u_{xxxx} \right]\right)+O(h^3). </math>
227
|}
228
|}
229
230
Finally, we get [[#eq-6|(6)]] which complete the proof. The same procedure can be applied for the proof at <math display="inline">x_{I+1}</math>. We refer to the reader to the work of Itza Balam and Uh Zapata <span id='citeF-14'></span>[[#cite-14|[14]]] for more details.
231
232
<span id='theorem-EFD'></span>Remark 1: If <math display="inline">b=0</math>, then Theorem [[#theorem-teo:regular|1]] yields the standard second-order finite-difference method for regular points given by
233
234
{| class="formulaSCP" style="width: 100%; text-align: left;" 
235
|-
236
| 
237
{| style="text-align: left; margin:auto;width: 100%;" 
238
|-
239
| style="text-align: center;" | <math>\left.u_{xx}\right|_i = \left.\delta ^2 u\right|_i + O(h^2), \quad i \neq I, I+1,  </math>
240
|}
241
| style="width: 5px;text-align: right;white-space: nowrap;" | (8)
242
|}
243
244
and Theorem [[#theorem-teo:regular|1]] results in an IIM of first-order for irregular points <math display="inline"> i= I, I+1</math> as follows
245
246
<span id="eq-9"></span>
247
{| class="formulaSCP" style="width: 100%; text-align: left;" 
248
|-
249
| 
250
{| style="text-align: left; margin:auto;width: 100%;" 
251
|-
252
| style="text-align: center;" | <math>\left.u_{xx}\right|_i = \left.\delta ^2 u\right|_i + c_i+ O(h), \quad i=I,I+1,   </math>
253
|}
254
| style="width: 5px;text-align: right;white-space: nowrap;" | (9)
255
|}
256
257
where
258
259
<span id="eq-10"></span>
260
{| class="formulaSCP" style="width: 100%; text-align: left;" 
261
|-
262
| 
263
{| style="text-align: left; margin:auto;width: 100%;" 
264
|-
265
| style="text-align: center;" | <math>c_i =  \begin{cases}- \dfrac{1}{h^2}\left\{[u]+h_R\left[u_{x} \right]+\dfrac{h_R^2}{2}\left[u_{xx} \right]\right\}, & i=I, \\[3mm]    \dfrac{1}{h^2}\left\{[u]+h_L\left[u_{x} \right]+\dfrac{h_L^2}{2}\left[u_{xx} \right]\right\}, & i=I+1. \end{cases}  </math>
266
|}
267
| style="width: 5px;text-align: right;white-space: nowrap;" | (10)
268
|}
269
270
Note that, in this case, we only require to explicitly know jump conditions <math display="inline">[u]</math>, <math display="inline">\left[u_{x} \right]</math> and <math display="inline">\left[u_{xx} \right]</math>.
271
272
===2.2 Implicit approximation for a real-valued function===
273
274
Before to apply the previous results for approximations to differential equations, it would be useful to express with finite differences the operator <math display="inline">\left.\mathfrak{D}^2u\right|_i=u_i+\left.bh^2u_{xx}\right|_i</math> for a real-valued function <math display="inline">u</math> and not its second-order derivative <math display="inline">u_{xx}</math>. The finite-difference formula is obtained by approximating <math display="inline">\left.u_{xx}\right|_i</math> with the central finite differences, as presented in [[#theorem-EFD|(1)]]-[[#eq-10|(10)]] for regular and irregular points, respectively.
275
276
For regular points (<math display="inline">i\neq I,I+1</math>), it follows from equation [[#theorem-EFD|(1)]]:
277
278
{| class="formulaSCP" style="width: 100%; text-align: left;" 
279
|-
280
| 
281
{| style="text-align: left; margin:auto;width: 100%;" 
282
|-
283
| style="text-align: center;" | <math>\left.\mathfrak{D}^2u\right|_i    =   u_i+\left.bh^2 u_{xx}\right|_i    =   u_i + bh^2\left\{\left.\delta ^2 u \right|_i  + O(h^2)\right\}   =   b u_{i-1}+\,(1-2b) u_i+\,b u_{i+1}  + O(h^4). </math>
284
|}
285
|}
286
287
Thus, if we define as <math display="inline">\mathfrak{d}^2</math> the resulting finite-difference
288
289
<span id="eq-11"></span>
290
{| class="formulaSCP" style="width: 100%; text-align: left;" 
291
|-
292
| 
293
{| style="text-align: left; margin:auto;width: 100%;" 
294
|-
295
| style="text-align: center;" | <math>\left.\mathfrak{d}^2 u \right|_i  : =  b u_{i-1}+\,(1-2b) u_i+\,b u_{i+1},  </math>
296
|}
297
| style="width: 5px;text-align: right;white-space: nowrap;" | (11)
298
|}
299
300
then, we have that
301
302
<span id="eq-12"></span>
303
{| class="formulaSCP" style="width: 100%; text-align: left;" 
304
|-
305
| 
306
{| style="text-align: left; margin:auto;width: 100%;" 
307
|-
308
| style="text-align: center;" | <math>\left.\mathfrak{D}^2 u \right|_i = \left.\mathfrak{d}^2\phi \right|_i + O(h^4), \quad i\neq I,I+1.  </math>
309
|}
310
| style="width: 5px;text-align: right;white-space: nowrap;" | (12)
311
|}
312
313
However, we still have the same issue to overcome for a discontinuous function <math display="inline">u</math>. We remark that this second-order derivative of <math display="inline">u</math> is already multiplied for <math display="inline">h^2</math>. Consequently, we can use the IIM technique where the contribution term is only first-order accurate to <math display="inline">u</math>; thus, we still have a local <math display="inline">O(h^3)</math> to keep a global fourth-order accurate method. Then for irregular points, the IIM applied for this term follows
314
315
<span id="eq-13"></span>
316
{| class="formulaSCP" style="width: 100%; text-align: left;" 
317
|-
318
| 
319
{| style="text-align: left; margin:auto;width: 100%;" 
320
|-
321
| style="text-align: center;" | <math>\left.\mathfrak{D}^2 u \right|_i = \left.\mathfrak{d}^2 u \right|_i + (c_u)_i + O(h^3), \quad i=I,I+1,  </math>
322
|}
323
| style="width: 5px;text-align: right;white-space: nowrap;" | (13)
324
|}
325
326
where <math display="inline">\mathfrak{d}^2</math> is given by finite difference [[#eq-11|(11)]] and
327
328
<span id="eq-14"></span>
329
{| class="formulaSCP" style="width: 100%; text-align: left;" 
330
|-
331
| 
332
{| style="text-align: left; margin:auto;width: 100%;" 
333
|-
334
| style="text-align: center;" | <math>(c_u)_i  = \begin{cases}- b\left([u]+h_R\left[u_x\right]+\dfrac{h_R^2}{2}\left[u_{xx} \right]\right), & i=I, \\[3mm]    b\left([u]+h_L\left[u_x \right]+\dfrac{h_L^2}{2}\left[u_{xx} \right]\right), & i=I+1. \end{cases}  </math>
335
|}
336
| style="width: 5px;text-align: right;white-space: nowrap;" | (14)
337
|}
338
339
Finally, for regular and irregular points, we have high-order finite-difference approximations of the implicit operator <math display="inline">\mathfrak{D}^2</math> applied to a real-valued function <math display="inline">u</math> as in [[#eq-12|(12)]] and [[#eq-13|(13)]], and to its second-order derivative <math display="inline">u_{xx}</math> as in [[#eq-2|(2)]] and [[#eq-6|(6)]]. Now, we proceed to implement them to the solution of differential equations, as presented in the following two sections.
340
341
==3 Poisson equation==
342
343
In this section, we developed a fourth-order finite difference scheme for the Poisson equation. Let us consider <math display="inline">u</math> and <math display="inline">f</math> as the solution of the problem and known right-hand side function, respectively. Thus the interface problem is given by
344
345
<span id="eq-15"></span>
346
<span id="eq-15"></span>
347
<span id="eq-15"></span>
348
<span id="eq-15"></span>
349
{| class="formulaSCP" style="width: 100%; text-align: left;" 
350
|-
351
| 
352
{| style="text-align: left; margin:auto;width: 100%;" 
353
|-
354
| style="text-align: center;" | <math>\Delta u(\boldsymbol{x}) = f(\boldsymbol{x}), \quad \boldsymbol{x}\in \Omega \setminus \Gamma , \quad \Omega = \Omega ^{+} \cup \Omega ^{-} </math>
355
|-
356
| style="text-align: center;" | <math> u(\boldsymbol{x}) = g(\boldsymbol{x}),  \quad \boldsymbol{x}\in \partial \Omega , </math>
357
|-
358
| style="text-align: center;" | <math> \left[u\right]_\Gamma   = \mathfrak{p}(\boldsymbol{x}),  \quad \boldsymbol{x}\in \Gamma , </math>
359
|-
360
| style="text-align: center;" | <math> \left[u_{\boldsymbol{n}} \right]_\Gamma = \mathfrak{q}(\boldsymbol{x}) , \quad \boldsymbol{x}\in \Gamma{.}  </math>
361
|}
362
|}
363
364
We divide <math display="inline">\Omega </math> in two regions, <math display="inline">\Omega ^{+}</math> and <math display="inline">\Omega ^{-}</math>, separated by an immersed interface <math display="inline">\Gamma </math>. Dirichlet boundary conditions are defined on <math display="inline">\partial \Omega </math>. We assume that <math display="inline">u</math> and <math display="inline">f</math> may have discontinuities at the interface <math display="inline">\Gamma </math>. Thus, we require additional conditions known as jumps. Note that the principal jump conditions, <math display="inline">\left[u\right]_\Gamma </math> and <math display="inline">\left[u_{\boldsymbol{n}} \right]_\Gamma </math>, are known functions defined on <math display="inline">\Gamma </math>. Here, <math display="inline">u_{\boldsymbol{n}}</math> is the derivative in the normal direction.
365
366
In the context of the general problem, the computational domain can be considered into multiple dimensions. Nevertheless, since the primary objective of this paper is to illustrate the fundamental attributes of the proposed implicit high-order method, we concentrate on investigating the one-dimensional (1D) Poisson problem as defined by
367
368
<span id="eq-15"></span>
369
<span id="eq-16"></span>
370
<span id="eq-17"></span>
371
<span id="eq-18"></span>
372
{| class="formulaSCP" style="width: 100%; text-align: left;" 
373
|-
374
| 
375
{| style="text-align: left; margin:auto;width: 100%;" 
376
|-
377
| style="text-align: center;" | <math>u_{xx}(x) = f(x),\quad x\in (\mathfrak{a},x_\alpha ) \cup (x_\alpha , \mathfrak{b}), </math>
378
| style="width: 5px;text-align: right;white-space: nowrap;" | (15)
379
|-
380
| style="text-align: center;" | <math> u(x) = g(x),  \quad \boldsymbol{x}\in \{ \mathfrak{a},\mathfrak{b}\} , </math>
381
| style="width: 5px;text-align: right;white-space: nowrap;" | (16)
382
|-
383
| style="text-align: center;" | <math> \left[u\right] = \mathfrak{p}, </math>
384
| style="width: 5px;text-align: right;white-space: nowrap;" | (17)
385
|-
386
| style="text-align: center;" | <math> \left[u_{x}\right] = \mathfrak{q},  </math>
387
| style="width: 5px;text-align: right;white-space: nowrap;" | (18)
388
|}
389
|}
390
391
Here, <math display="inline">u</math> and <math display="inline">f</math> can be discontinuous functions at a given point <math display="inline">x=x_\alpha </math>, and principal jump conditions <math display="inline">\left[u\right]=\left[u\right]_{x_\alpha }</math> and <math display="inline">\left[u_{x}\right]=\left[u_{x}\right]_{x_\alpha }</math> are known values at <math display="inline">x_\alpha </math>.
392
393
===3.1 IFD-IIM for the 1D Poisson problem===
394
395
Let us consider that <math display="inline">x_\alpha </math> is located between the adjacent grid points <math display="inline">x_I</math> and <math display="inline">x_{I+1}</math> as <math display="inline">x_I \leq x_\alpha < x_{I+1}</math>. If we apply operator <math display="inline">\mathfrak{D}^2(\cdot ) = (\cdot ) +bh^2 (\cdot )_{xx}</math> at both sides of [[#eq-15|(15)]], then we get
396
397
<span id="eq-19"></span>
398
{| class="formulaSCP" style="width: 100%; text-align: left;" 
399
|-
400
| 
401
{| style="text-align: left; margin:auto;width: 100%;" 
402
|-
403
| style="text-align: center;" | <math>\left.\mathfrak{D}^2 u_{xx}\right|_{i} = \left.\mathfrak{D}^2 f\right|_{i}, \qquad i=2,\dots , N.  </math>
404
|}
405
| style="width: 5px;text-align: right;white-space: nowrap;" | (19)
406
|}
407
408
For <math display="inline">i=1</math> and <math display="inline">i=N+1</math>, the grid points are at the boundary, thus the Dirichlet boundary condition can be directly applied. Thus, using the IFD scheme [[#eq-2|(2)]] and approximation [[#eq-12|(12)]] in [[#eq-19|(19)]] at <math display="inline">x_i</math>, we have that the finite-difference scheme for regular points is given by
409
410
<span id="eq-20"></span>
411
{| class="formulaSCP" style="width: 100%; text-align: left;" 
412
|-
413
| 
414
{| style="text-align: left; margin:auto;width: 100%;" 
415
|-
416
| style="text-align: center;" | <math>\left.\delta ^2u\right|_{i} = \left.\mathfrak{d}^2f\right|_{i} + O(h^4), \qquad i\neq I,I+1.  </math>
417
|}
418
| style="width: 5px;text-align: right;white-space: nowrap;" | (20)
419
|}
420
421
Similarly, using formulas [[#eq-6|(6)]] and [[#eq-13|(13)]], the scheme for irregular points is given by
422
423
<span id="eq-21"></span>
424
{| class="formulaSCP" style="width: 100%; text-align: left;" 
425
|-
426
| 
427
{| style="text-align: left; margin:auto;width: 100%;" 
428
|-
429
| style="text-align: center;" | <math>\left.\delta ^2u\right|_{i} + C_i = \left.\mathfrak{d}^2f\right|_{i} + (c_f)_i + O(h^3), \qquad i=I,I+1,  </math>
430
|}
431
| style="width: 5px;text-align: right;white-space: nowrap;" | (21)
432
|}
433
434
where <math display="inline">C_i</math> and <math display="inline">(c_f)_i</math> are given by [[#eq-7|(7)]] and [[#eq-14|(14)]], respectively. Thus, combining the results for all grid points, the IFD-IIM for the 1D Poisson equation [[#eq-15|(15)]] at <math display="inline">x_i</math> is given by
435
436
<span id="eq-22"></span>
437
{| class="formulaSCP" style="width: 100%; text-align: left;" 
438
|-
439
| 
440
{| style="text-align: left; margin:auto;width: 100%;" 
441
|-
442
| style="text-align: center;" | <math>\frac{1}{h^2}U_{i-1}\,\,-\frac{2}{h^2}U_{i}\,+\,\frac{1}{h^2}U_{i+1}  =  bf_{i-1}+\,(1-2b)f_i+\,bf_{i+1} + \mathfrak{C}_i, \quad i=2, \dots , N,  </math>
443
|}
444
| style="width: 5px;text-align: right;white-space: nowrap;" | (22)
445
|}
446
447
where total contribution is <math display="inline">\mathfrak{C}_i = (c_f)_i - C_i</math> with
448
449
<span id="eq-23"></span>
450
{| class="formulaSCP" style="width: 100%; text-align: left;" 
451
|-
452
| 
453
{| style="text-align: left; margin:auto;width: 100%;" 
454
|-
455
| style="text-align: center;" | <math>C_i =  \begin{cases}- \dfrac{1}{h^2}\left([u]+h_R\left[u_{x}\right]+\dfrac{h_R^2}{2} + b \left(2 h_R^3\left[u_{xxx}\right]+\dfrac{h_R^4}{2}\left[u_{xxxx}\right]\right)\right), & i=I,\\[4mm]   \dfrac{1}{h^2} \left([u]+h_L\left[u_{x}\right]+\dfrac{h_L^2}{2} + b \left(2h_L^3\left[u_{xxx}\right]+\dfrac{h_L^4}{2}\left[u_{xxxx}\right]\right)\right), & i=I+1,\\[2mm]    0 & \textrm{else where,}  \end{cases}  </math>
456
|}
457
| style="width: 5px;text-align: right;white-space: nowrap;" | (23)
458
|}
459
460
and
461
462
<span id="eq-24"></span>
463
{| class="formulaSCP" style="width: 100%; text-align: left;" 
464
|-
465
| 
466
{| style="text-align: left; margin:auto;width: 100%;" 
467
|-
468
| style="text-align: center;" | <math>(c_f)_i  = \begin{cases}- b\left([f]+h_R\left[f_x\right]+\dfrac{h_R^2}{2}\left[f_{xx} \right]\right), & i=I, \\[3mm]    b\left([f]+h_L\left[f_x \right]+\dfrac{h_L^2}{2}\left[f_{xx} \right]\right), & i=I+1,\\[2mm]     0 & \textrm{else where.} \end{cases}  </math>
469
|}
470
| style="width: 5px;text-align: right;white-space: nowrap;" | (24)
471
|}
472
473
We remark that scheme [[#eq-22|(22)]]-[[#eq-24|(24)]] results in an approximation with local truncation error of fourth- and third-order for regular and irregular grid points, respectively. Thus, a global <math display="inline">O(h^4)</math> method is expected.
474
475
===3.2 IFD-IIM and principal jump conditions===
476
477
Note that <math display="inline">\left[u\right]</math>, <math display="inline">\left[u_{x}\right]</math>, <math display="inline">\left[u_{xx}\right]</math>, <math display="inline">\left[u_{xxx}\right]</math>, and <math display="inline">\left[u_{xxxx}\right]</math> must be known to apply the proposal fourth-order IFD-IIM. Thus, it seems that more jump conditions of <math display="inline">u</math> rather than the principal jump conditions [[#eq-17|(17)]] and [[#eq-18|(18)]] are required to have a fourth-order accurate method. However, we can use the Poisson equation [[#eq-15|(15)]] to obtain them as follows
478
479
{| class="formulaSCP" style="width: 100%; text-align: left;" 
480
|-
481
| 
482
{| style="text-align: left; margin:auto;width: 100%;" 
483
|-
484
| style="text-align: center;" | <math>\left[u_{xx}\right]=[f], \qquad  \left[u_{xxx}\right]=\left[f_{x}\right], \qquad  \left[u_{xxxx}\right]=\left[f_{xx}\right].  </math>
485
|}
486
| style="width: 5px;text-align: right;white-space: nowrap;" | (25)
487
|}
488
489
Thus, the total jump contribution for the one-dimensional Poisson problem is given by
490
491
<span id="eq-26"></span>
492
{| class="formulaSCP" style="width: 100%; text-align: left;" 
493
|-
494
| 
495
{| style="text-align: left; margin:auto;width: 100%;" 
496
|-
497
| style="text-align: center;" | <math>\mathfrak{C}_i =  \begin{cases}  \dfrac{1}{h^2}\left([u]+h_R\left[u_{x}\right]+\dfrac{h_R^2}{2} \right)- b \left\{[f] + h_R\left(- \dfrac{2h_R^2}{h^2}+1\right)\left[f_x\right]+\dfrac{h_R^2}{2} \left(-\dfrac{h_R^2}{h^2}+1\right)\left[f_{xx}\right]\right\}, & i=I, \\[2mm] - \dfrac{1}{h^2} \left([u]+h_L\left[u_{x}\right]+\dfrac{h_L^2}{2} \right)+ b \left\{[f] + h_L\left(- \dfrac{2h_L^2}{h^2} +1\right)\left[f_x\right]+ \dfrac{h_L^2}{2} \left(-\dfrac{h_L^2}{h^2}+1\right)\left[f_{xx}\right]\right\}, & i=I+1,\\[2mm] 0, & \textrm{else where}. \end{cases}  </math>
498
|}
499
| style="width: 5px;text-align: right;white-space: nowrap;" | (26)
500
|}
501
502
Thus contribution <math display="inline">\mathfrak{C}_i</math> depends only on the principal jump conditions, <math display="inline">[u]</math> and <math display="inline">[u_x]</math>, and right-hand side jumps: <math display="inline">[f]</math>, <math display="inline">\left[f_{x}\right]</math>, and <math display="inline">\left[f_{xx} \right]</math>. The additional jumps derivatives from the right-hand side can be approximated using the current values of <math display="inline">f</math>. In this paper, we will assume that we know them.
503
504
Remark 2: For the 1D Poisson problem, a global second-order IIM (<math display="inline">b=0</math>) only requires to know the principal jump conditions <math display="inline">[u]</math>, <math display="inline">\left[u_{x}\right]</math> and <math display="inline">\left[f\right]</math>.
505
506
Remark 3: If <math display="inline">h_R/h=1</math>, then <math display="inline">h_L=0</math> and both weight terms next to second-order derivative jump of <math display="inline">f</math> are equal to zero in [[#eq-26|(26)]]. Thus, we do not require to know jump condition <math display="inline">\left[f_{xx}\right]</math> to obtain a fourth-order method when the interface is located at a grid point.
507
508
==4 Heat equation with a fixed interface==
509
510
For the second differential equation, we consider the heat conduction equation with initial, boundary, and principal jump conditions, as follows
511
512
<span id="eq-27"></span>
513
<span id="eq-27"></span>
514
<span id="eq-27"></span>
515
<span id="eq-27"></span>
516
{| class="formulaSCP" style="width: 100%; text-align: left;" 
517
|-
518
| 
519
{| style="text-align: left; margin:auto;width: 100%;" 
520
|-
521
| style="text-align: center;" | <math>u_t(\boldsymbol{x},t) = \Delta u(\boldsymbol{x},t)- f(\boldsymbol{x},t), \quad \boldsymbol{x}\in \Omega \setminus \Gamma \times [0,T], \quad \Omega = \Omega ^{+} \cup \Omega ^{-} </math>
522
|-
523
| style="text-align: center;" | <math> u(\boldsymbol{x},0) = u_0(\boldsymbol{x}),  \quad \boldsymbol{x} \in \Omega ,</math>
524
|-
525
| style="text-align: center;" | <math> u(\boldsymbol{x},t) = g(\boldsymbol{x},t),  \quad (\boldsymbol{x},t) \in \partial \Omega{.} </math>
526
|-
527
| style="text-align: center;" | <math> \left[u\right]_\Gamma   = \mathfrak{p}(\boldsymbol{x},t),  \quad \boldsymbol{x}\in \Gamma \times [0,T], </math>
528
|-
529
| style="text-align: center;" | <math> \left[u_{\boldsymbol{n}} \right]_\Gamma = \mathfrak{q}(\boldsymbol{x},t) , \quad \boldsymbol{x}\in \Gamma \times [0,T].  </math>
530
|}
531
|}
532
533
Here, the source <math display="inline">f</math> and initial value <math display="inline">u_0</math> may be discontinuous or singular across a fixed interface <math display="inline">\Gamma </math>. The interface <math display="inline">\Gamma </math> is immersed in the domain <math display="inline">\Omega </math> and divides into two parts, <math display="inline">\Omega ^{+}</math> and <math display="inline">\Omega ^{-}</math>. As the Poisson equation, this paper only focuses on the one-dimensional problem given by
534
535
<span id="eq-27"></span>
536
<span id="eq-28"></span>
537
<span id="eq-29"></span>
538
<span id="eq-30"></span>
539
<span id="eq-31"></span>
540
{| class="formulaSCP" style="width: 100%; text-align: left;" 
541
|-
542
| 
543
{| style="text-align: left; margin:auto;width: 100%;" 
544
|-
545
| style="text-align: center;" | <math>u_t = u_{xx}-f, \quad (x,t) \in (\mathfrak{a},x_\alpha ) \cup (x_\alpha , \mathfrak{b}) \times (0,T],  </math>
546
| style="width: 5px;text-align: right;white-space: nowrap;" | (27)
547
|-
548
| style="text-align: center;" | <math> u(x,0) = u_0(x), \quad x \in (\mathfrak{a},\mathfrak{b}), </math>
549
| style="width: 5px;text-align: right;white-space: nowrap;" | (28)
550
|-
551
| style="text-align: center;" | <math> u(x,t) = g(x,t),  \quad (x,t) \in \{ \mathfrak{a},\mathfrak{b}\} \times (0,T], </math>
552
| style="width: 5px;text-align: right;white-space: nowrap;" | (29)
553
|-
554
| style="text-align: center;" | <math> \left[u\right] =  \mathfrak{p}(t),\quad t\in [0,T] </math>
555
| style="width: 5px;text-align: right;white-space: nowrap;" | (30)
556
|-
557
| style="text-align: center;" | <math> \left[u_{x}\right] = \mathfrak{q}(t), \quad t\in [0,T].  </math>
558
| style="width: 5px;text-align: right;white-space: nowrap;" | (31)
559
|}
560
|}
561
562
where the source <math display="inline">f</math> and initial value <math display="inline">u_0</math> may be discontinuous or singular across a fixed interface located at <math display="inline">x_\alpha </math>.
563
564
===4.1 IFD-IIM for the 1D heat conduction problem===
565
566
Since the interface is fixed and all the quantities are continuous with time, we can approximate the time derivative using the Crank-Nicolson method, as follows
567
568
<span id="eq-32"></span>
569
{| class="formulaSCP" style="width: 100%; text-align: left;" 
570
|-
571
| 
572
{| style="text-align: left; margin:auto;width: 100%;" 
573
|-
574
| style="text-align: center;" | <math>u^{n+1} = u^{n} + \dfrac{\Delta t}{2} \left\{\left(u_{xx}-f\right)^{n+1} + \left(u_{xx}-f\right)^{n}\right\}+ O(\Delta t^2).  </math>
575
|}
576
| style="width: 5px;text-align: right;white-space: nowrap;" | (32)
577
|}
578
579
Applying the fourth-order operator [[#eq-3|(3)]] to equation [[#eq-32|(32)]] yields
580
581
<span id="eq-33"></span>
582
{| class="formulaSCP" style="width: 100%; text-align: left;" 
583
|-
584
| 
585
{| style="text-align: left; margin:auto;width: 100%;" 
586
|-
587
| style="text-align: center;" | <math>\left.\mathfrak{D}^2u\right|_{i}^{n+1}  = \left.\mathfrak{D}^2u\right|_{i}^{n}   + \dfrac{\Delta t}{2}\left\{ \left.\mathfrak{D}^2u_{xx}\right|_{i}^{n+1}  +\left.\mathfrak{D}^2u_{xx}\right|_{i}^{n} -\left.\mathfrak{D}^2f\right|_{i}^{n+1}  -\left.\mathfrak{D}^2f\right|_{i}^{n} \right\} + O(\Delta t^2), \quad i=2, \dots , N.  </math>
588
|}
589
| style="width: 5px;text-align: right;white-space: nowrap;" | (33)
590
|}
591
592
For regular points, using the IFD method [[#eq-2|(2)]] and approximation [[#eq-12|(12)]], equation [[#eq-33|(33)]] can be approximated as follows
593
594
<span id="eq-34"></span>
595
{| class="formulaSCP" style="width: 100%; text-align: left;" 
596
|-
597
| 
598
{| style="text-align: left; margin:auto;width: 100%;" 
599
|-
600
| style="text-align: center;" | <math>\left.\mathfrak{d}^2u\right|_{i}^{n+1}  = \left.\mathfrak{d}^2u\right|_{i}^{n}   + \dfrac{\Delta t}{2}\left\{ \left.\delta ^2u\right|_{i}^{n+1}  +\left.\delta ^2u\right|_{i}^{n} -\left.\mathfrak{d}^2f\right|_{i}^{n+1}  -\left.\mathfrak{d}^2f\right|_{i}^{n} \right\} +  O(\Delta t^2) + O(h^4), \quad i\neq I,I+1.   </math>
601
|}
602
| style="width: 5px;text-align: right;white-space: nowrap;" | (34)
603
|}
604
605
For irregular points, using the IFD-IIM [[#eq-6|(6)]] and approximation [[#eq-13|(13)]], the implicit scheme is given by
606
607
<span id="eq-35"></span>
608
{| class="formulaSCP" style="width: 100%; text-align: left;" 
609
|-
610
| 
611
{| style="text-align: left; margin:auto;width: 100%;" 
612
|-
613
| style="text-align: center;" | <math>\left.\mathfrak{d}^2u\right|_{i}^{n+1}  = \left.\mathfrak{d}^2u\right|_{i}^{n}  + \dfrac{\Delta t}{2}\left\{ \left.\delta ^2u\right|_{i}^{n+1} +\left.\delta ^2u\right|_{i}^{n} -\left.\mathfrak{d}^2f\right|_{i}^{n+1} -\left.\mathfrak{d}^2f\right|_{i}^{n} \right\}+ \mathfrak{C}_i   +  O(\Delta t^2) + O(h^3), \quad i= I,I+1,  </math>
614
|}
615
| style="width: 5px;text-align: right;white-space: nowrap;" | (35)
616
|}
617
618
where
619
620
<span id="eq-36"></span>
621
{| class="formulaSCP" style="width: 100%; text-align: left;" 
622
|-
623
| 
624
{| style="text-align: left; margin:auto;width: 100%;" 
625
|-
626
| style="text-align: center;" | <math>\mathfrak{C}_i = - (c_u)_{i}^{n+1} + (c_u)_{i}^{n} + \dfrac{\Delta t}{2}\left\{ C_{i}^{n+1} + C_{i}^{n} - (c_f)_{i}^{n+1} - (c_f)_{i}^{n} \right\}.  </math>
627
|}
628
| style="width: 5px;text-align: right;white-space: nowrap;" | (36)
629
|}
630
631
Here, <math display="inline">(c_u)_i</math> and <math display="inline">(c_f)_i</math> are defined as [[#eq-14|(14)]], and <math display="inline">C_i</math> is given by [[#eq-7|(7)]]. Thus, for 1D heat conduction equation [[#eq-27|(27)]], the IFD-IIM reads
632
633
<span id="eq-37"></span>
634
{| class="formulaSCP" style="width: 100%; text-align: left;" 
635
|-
636
| 
637
{| style="text-align: left; margin:auto;width: 100%;" 
638
|-
639
| style="text-align: center;" | <math>(b-r)U_{i-1}^{n+1}+(1-2b+2r)U_i^{n+1}+(b-r)U_{i+1}^{n+1}  = (b+r)U_{i-1}^{n}+(1-2b-2r)U_i^{n}+(b+r)U_{i+1}^{n} </math>
640
|-
641
| style="text-align: center;" | <math>  - \dfrac{\Delta t}{2}\left\{bf_{i-1}^{n+1}+(1-2b)f_i^{n+1}+bf_{i+1}^{n+1} \right\} </math>
642
| style="width: 5px;text-align: right;white-space: nowrap;" | (37)
643
|-
644
| style="text-align: center;" | <math>  - \dfrac{\Delta t}{2}\left\{bf_{i-1}^{n}+(1-2b)f_i^{n}+bf_{i+1}^{n} \right\}+ \mathfrak{C}_i, </math>
645
|}
646
|}
647
648
where <math display="inline">r=\frac{1}{2}\Delta t/h^2</math> and <math display="inline">\mathfrak{C}_i</math> is given by [[#eq-36|(36)]]. Here, we have that <math display="inline">\mathfrak{C}_i=0</math>  for regular points.
649
650
Remark 4: The IFD-IIM [[#eq-37|(37)]] is unconditionally stable and the local truncation error is of <math display="inline">O(\Delta t^2 + h^4)</math> and <math display="inline">O(\Delta t^2 + h^3)</math> for regular and irregular grid points, respectively. Thus a global fourth-order method is expected by taking <math display="inline">\Delta t = O(h^2)</math>.
651
652
Remark 5: As the Crank-Nicolson method is implicit in time, the IFD-IIM solves a linear system at each time step. To address this efficiently, we employed Thomas' algorithm, given that the resulting matrix is tridiagonal. Furthermore, the implicit method in space preserves the original structure of this system of equations, thus yielding a higher-order method without compromising the efficiency of the standard scheme.
653
654
Remark 6: In addition to accounting for the contributions of the source term <math display="inline">f</math> and its derivatives, the finite-difference scheme presented in equation [[#eq-37|(37)]] requires additional knowledge of the jump conditions for the solution given by <math display="inline">\left[u_{xx}\right]</math>, <math display="inline">\left[u_{xxx}\right]</math>, and <math display="inline">\left[u_{xxxx}\right]</math>. It is worth noting that, although not presented here, there are techniques available for deriving all the necessary jump conditions from the principal jump conditions <span id='citeF-14'></span>[[#cite-14|[14]]].
655
656
==5 Numerical results for the Poisson equation==
657
658
In this section, we test the IFD-IIM for different examples of the Poisson equation. In the following simulations, we numerically solve the equation for a given right-hand side function and compare it with its analytic solution. In all cases the resulting linear system is solved using the Thomas' algorithm.
659
660
The numerical method is tested using three different examples. Example 1 considers a smooth solution to verify the fourth-order implicit method for smooth solutions. Example 2 studies a Poisson equation with a discontinuous solution in a single interface point. The Matlab code for this example can be found in Appendix A. Finally, Example 3 presents a discontinuous problem with multiple interface points.
661
662
For the all these examples, the computational domain is the interval <math display="inline">[0,1]</math>, and the grid spacing is <math display="inline">h=1/N</math> for different <math display="inline">N</math> sub-intervals. The errors are reported using the <math display="inline">L_\infty </math>-norm and the discrete <math display="inline">L_2</math>-norm calculated as
663
664
<span id="eq-38"></span>
665
{| class="formulaSCP" style="width: 100%; text-align: left;" 
666
|-
667
| 
668
{| style="text-align: left; margin:auto;width: 100%;" 
669
|-
670
| style="text-align: center;" | <math>\left\|e \right\|_\infty = \max _{i,j} \left|u_{i}-U_{i} \right|,   \quad \mathrm{and} \quad  \left\|e\right\|_2 = \left(\sum _{i=1}^{N_x} (u_{i}-U_{i})^2\Delta x\right)^{1/2}, </math>
671
|}
672
| style="width: 5px;text-align: right;white-space: nowrap;" | (38)
673
|}
674
675
respectively, where <math display="inline">U_{i}</math> and <math display="inline">u_{i}</math> corresponds to the numerical and exact solution at <math display="inline">x_i</math>, respectively. The estimated order of accuracy is computed as
676
677
<span id="eq-39"></span>
678
{| class="formulaSCP" style="width: 100%; text-align: left;" 
679
|-
680
| 
681
{| style="text-align: left; margin:auto;width: 100%;" 
682
|-
683
| style="text-align: center;" | <math>\textrm{Order} := \dfrac{\log \left(\left\|e \right\|_{N_1}/ \left\|e \right\|_{N_2}\right)}{\log \left(N_1/N_2 \right)}, </math>
684
|}
685
| style="width: 5px;text-align: right;white-space: nowrap;" | (39)
686
|}
687
688
where <math display="inline">N_1</math> and <math display="inline">N_2</math> indicates the different number of sub-intervals.
689
690
===5.1 Example 1. Poison equation with smooth solution===
691
692
Example 1 considers an infinitely smooth and differentiable exact solution of the one-dimensional Poisson problem [[#eq-15|(15)]] given by the following expression
693
694
<span id="eq-40"></span>
695
{| class="formulaSCP" style="width: 100%; text-align: left;" 
696
|-
697
| 
698
{| style="text-align: left; margin:auto;width: 100%;" 
699
|-
700
| style="text-align: center;" | <math>u(x) = e^{-4\pi (x-1/4)^2}.  </math>
701
|}
702
| style="width: 5px;text-align: right;white-space: nowrap;" | (40)
703
|}
704
705
The right-hand side function, <math display="inline">f</math>, is obtained directly from [[#eq-40|(40)]]. We impose Dirichlet boundary conditions according to the function <math display="inline">u</math>.  Due to the regularity of the solution, the jump contributions <math display="inline">\mathcal{C}_I</math> and <math display="inline">\mathcal{C}_{I+1}</math> in equation [[#eq-26|(26)]] are equal to zero.
706
707
Table [[#table-1|1]] presents the convergence analysis of Example 1 for different grid resolutions. If <math display="inline">b = 0</math>, then we recover the standard central finite-difference method of second-order accuracy. On the other hand, the fourth-order implicit scheme is recovered when <math display="inline">b=1/12</math>. Last row of table [[#table-1|1]] shows the numerical order calculated by the regression-line slope based on a least squares method (LSM) of the <math display="inline">L_{\infty }</math>- and <math display="inline">L_2</math>-norm error. A complete analysis of the IFD method for smooth solutions can be found in <span id='citeF-12'></span>[[#cite-12|[12]]].
708
709
710
{|  class="floating_tableSCP" style="text-align: left; margin: 1em auto;border-top: 2px solid;border-bottom: 2px solid;min-width:50%;"
711
|+ style="font-size: 75%;" |<span id='table-1'></span>'''Table. 1''' Convergence analysis of Example 1 testing a Poisson equation with smooth solution.
712
|-  
713
| style="text-align: right;" |      
714
|    
715
|-<math display="inline"> N </math>      
716
| <math display="inline"> L_\infty </math>-norm     
717
|  Order     
718
| <math display="inline"> L_2</math>-norm     
719
|  Order    
720
| <math display="inline"> L_\infty </math>-norm     
721
|  Order     
722
| <math display="inline"> L_2</math>-norm     
723
|  Order    
724
|-
725
|  10 
726
|  7.52e-02 
727
|  ---   
728
|  2.84e-02 
729
|  ---  
730
|  9.30e-03 
731
|  ---   
732
|  3.56e-03 
733
|  ---   
734
|-
735
|  20 
736
|  1.70e-02 
737
|  2.15  
738
|  6.52e-03 
739
|  2.12 
740
|  5.05e-04 
741
|  4.20  
742
|  1.93e-04 
743
|  4.21  
744
|-
745
|  40 
746
|  4.15e-03 
747
|  2.03  
748
|  1.60e-03 
749
|  2.03 
750
|  3.06e-05 
751
|  4.04  
752
|  1.17e-05 
753
|  4.04  
754
|-
755
|  80 
756
|  1.03e-03 
757
|  2.01  
758
|  3.98e-04 
759
|  2.01 
760
|  1.90e-06 
761
|  4.01  
762
|  7.27e-07 
763
|  4.01  
764
|-
765
| 160 
766
|  2.57e-04 
767
|  2.00  
768
|  9.95e-05 
769
|  2.00 
770
|  1.18e-07 
771
|  4.00  
772
|  4.54e-08 
773
|  4.00  
774
|-
775
| LSM 
776
|    
777
|  '''2.04''' 
778
| 
779
|  '''2.04''' 
780
| 
781
|  '''4.06''' 
782
| 
783
|  '''4.06'''
784
|-
785
|
786
|}
787
788
===5.2 Example 2. Poison equation with a single interface===
789
790
For Example 2, we show the method's capability by solving a single interface problem located at <math display="inline">x = x_\alpha </math>. The exact solution is given by the function
791
792
<span id="eq-41"></span>
793
{| class="formulaSCP" style="width: 100%; text-align: left;" 
794
|-
795
| 
796
{| style="text-align: left; margin:auto;width: 100%;" 
797
|-
798
| style="text-align: center;" | <math>u(x) = \begin{cases}\sin (\pi x)& x\leq x_\alpha ,\\ \cos (\pi x)& x   > x_\alpha{.} \end{cases}  </math>
799
|}
800
| style="width: 5px;text-align: right;white-space: nowrap;" | (41)
801
|}
802
803
The right-hand side, <math display="inline">f</math>, is obtained directly from equation [[#eq-41|(41)]]. We test two different points: <math display="inline">x_\alpha=0.40</math> and <math display="inline">x_\alpha=0.63</math>.  For the first case, we always have <math display="inline">h_R/h=1</math> for <math display="inline">N=10\times{2}^{n}</math> (<math display="inline">n=0,1,2,\dots </math>); thus the interface is always located at one grid point of that resolution. In general, for <math display="inline">x_\alpha=0.63</math>, we have different <math display="inline">h_R/h</math> values for different <math display="inline">N</math> numbers. Figure [[#img-2|2]] shows the numerical and exact solution when the interface is located at these two values using <math display="inline">N = 40</math>. As expected, the exact solution is accurately recovered for both cases.
804
805
<div id='img-2'></div>
806
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
807
|-
808
|[[Image:Draft_Uh Zapata_643844164-Fig_Poisson_Ex2_Sol.png|594px|Numerical and exact solution of Example 2 using N = 40 using (a) x_α= 0.4, and (b) x_α= 0.63.]]
809
|- style="text-align: center; font-size: 75%;"
810
| colspan="1" | '''Figure 2:''' Numerical and exact solution of Example 2 using <math>N = 40</math> using (a) <math>x_\alpha = 0.4</math>, and (b) <math>x_\alpha = 0.63</math>.
811
|}
812
Table [[#table-2|2]] shows the convergence analysis for Example 2 for the two <math display="inline">x_\alpha </math> values. Observe that a second-order method is recovered for <math display="inline">b = 0</math> and a fourth-order method for <math display="inline">b=1/12</math>. As expected, the IFD-IIM numerical order does not depend on the location of the interface. However, the magnitude of the error may present minor variations due to the interface position. Figure [[#img-3|3]] shows the error analysis corresponding to interface locations <math display="inline">x_\alpha = 0.40</math> and <math display="inline">x_\alpha = 0.63</math> for <math display="inline">N = 10,11,12, \dots ,320</math>.
813
814
815
{|  class="floating_tableSCP" style="text-align: left; margin: 1em auto;border-top: 2px solid;border-bottom: 2px solid;min-width:50%;"
816
|+ style="font-size: 75%;" |<span id='table-2'></span>'''Table. 2''' Convergence analysis of Example 2 using the IFD-IIM.
817
|-
818
|     0.95 @c cccc cccc   
819
| style="text-align: right;" |      
820
|    
821
|-
822
| (rrrr)2-5  (rrrr)6-9  
823
|      
824
|      
825
|      
826
|   
827
|-
828
| (rr)2-3  (rr)4-5 (rr)6-7 (rr)8-9 <math display="inline">N</math>  
829
| <math display="inline">L_\infty </math>-norm 
830
|  Order 
831
| <math display="inline">L_\infty </math>-norm 
832
|  Order
833
| <math display="inline">L_\infty </math>-norm 
834
|  Order 
835
| <math display="inline">L_\infty </math>-norm 
836
|  Order
837
|-
838
| 10 
839
|  1.69e-02 
840
|  &#8211;-  
841
|  5.19e-03 
842
|  &#8211;-  
843
|  5.75e-05 
844
|  &#8211;-  
845
|  3.42e-05 
846
|  &#8211;-  
847
|-
848
| 20 
849
|  4.21e-03 
850
|  2.00 
851
|  1.18e-03 
852
|  2.13 
853
|  3.58e-06 
854
|  4.00 
855
|  1.97e-06 
856
|  4.12 
857
|-
858
| 40 
859
|  1.05e-03 
860
|  2.00 
861
|  3.07e-04 
862
|  1.95 
863
|  2.24e-07 
864
|  4.00 
865
|  1.39e-07 
866
|  3.82 
867
|-
868
| 80 
869
|  2.63e-04 
870
|  2.00 
871
|  7.53e-05 
872
|  2.03 
873
|  1.40e-08 
874
|  4.00 
875
|  7.75e-09 
876
|  4.16 
877
|-
878
| 160 
879
|  6.57e-05 
880
|  2.00 
881
|  1.86e-05 
882
|  2.01 
883
|  8.74e-10 
884
|  4.00 
885
|  5.37e-10 
886
|  3.85 
887
|-
888
| LSM  
889
| 
890
| '''2.04''' 
891
| 
892
|  '''2.02''' 
893
| 
894
|  '''4.00''' 
895
| 
896
|  '''3.99'''
897
|-
898
|
899
|}
900
<div id='img-3'></div>
901
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
902
|-
903
|[[Image:Draft_Uh Zapata_643844164-Fig_Poisson_Ex2_OrderDispersion.png|594px|Convergence analysis of Example 2 for N = 10,\dots ,320 using (a) x_α= 0.40, and (b) x_α= 0.63.]]
904
|- style="text-align: center; font-size: 75%;"
905
| colspan="1" | '''Figure 3:''' Convergence analysis of Example 2 for <math>N = 10,\dots ,320</math> using (a) <math>x_\alpha = 0.40</math>, and (b) <math>x_\alpha = 0.63</math>.
906
|}
907
The contribution formula includes jumps <math display="inline">[u]</math>, <math display="inline">[u_x]</math>, <math display="inline">[u_{xx}]</math>, <math display="inline">[u_{xxx}]</math>, and <math display="inline">[u_{xxxx}]</math> to obtain a fourth-order accurate method. Fig.&nbsp;[[#img-4|4]] shows that if we add additional jumps of high-order derivatives to <math display="inline">\mathcal{C}</math>, such as <math display="inline">[u_{xxxxx}]=[f_{xxx}]</math>, we observe that the error oscillation decreases in comparison with Fig.&nbsp;[[#img-3|3]] results. It is expected because the method is <math display="inline">O(h^4)</math> for the whole computational domain, including the irregular points. Thus, we can mitigate error oscillations due to interface position by adding high-order jumps.
908
909
<div id='img-4'></div>
910
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
911
|-
912
|[[Image:Draft_Uh Zapata_643844164-Fig_Poisson_Ex2_OrderCloud5th.png|594px|Convergence analysis of Example 2 for N = 10,\dots ,320 using (a) α= 0.40, and (b) α= 0.63. The contribution term includes jumps up to fifth-order ([uₓₓₓₓₓ]=[fₓₓₓ]).]]
913
|- style="text-align: center; font-size: 75%;"
914
| colspan="1" | '''Figure 4:''' Convergence analysis of Example 2 for <math>N = 10,\dots ,320</math> using (a) <math>\alpha = 0.40</math>, and (b) <math>\alpha = 0.63</math>. The contribution term includes jumps up to fifth-order (<math>[u_{xxxxx}]=[f_{xxx}]</math>).
915
|}
916
Now we study the effect of removing jumps in <math display="inline">\mathcal{C}</math>. Let us consider a contribution term up to the third derivative jump by dropping <math display="inline">[u_{xxxx}]=[f_{xx}]</math>. Thus, the numerical approximation is only third-order accurate, as shown in Fig.&nbsp;[[#img-5|5]] for different interface values.  Note that error oscillations may have a clear pattern or a random distribution depending on the interface location. In general, the error magnitude perturbations are related to the variations coming from <math display="inline">h_R/h</math> and <math display="inline">h_L/h</math> values in the <math display="inline">\mathcal{C}</math> formula [[#eq-26|(26)]].
917
918
<div id='img-5'></div>
919
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
920
|-
921
|[[Image:Draft_Uh Zapata_643844164-Fig_Poisson_Ex2_OrderCloud3rd.png|594px|Convergence analysis of Example 2 for N = 10,\dots ,320 using (a) α= 0.40, and (b) α= 0.63. The contribution term includes jumps up to third-order ([uₓₓₓ]=[fₓ]).]]
922
|- style="text-align: center; font-size: 75%;"
923
| colspan="1" | '''Figure 5:''' Convergence analysis of Example 2 for <math>N = 10,\dots ,320</math> using (a) <math>\alpha = 0.40</math>, and (b) <math>\alpha = 0.63</math>. The contribution term includes jumps up to third-order (<math>[u_{xxx}]=[f_{x}]</math>).
924
|}
925
Note that there are some points in Fig.&nbsp;[[#img-5|5]], marked with circles, that are close to the fourth-order line. Those circled markers correspond to the values with <math display="inline">h_R/h=1</math>: <math display="inline">N = 5,10,15,\dots ,315</math> for <math display="inline">x_\alpha=0.40</math>, and <math display="inline">N = 100, 200, 300</math> for <math display="inline">x_\alpha=0.63</math>.  Both set of points satisfy that the interface <math display="inline">x_\alpha </math> is located at a grid point <math display="inline">x_I</math>. In the case of <math display="inline">x_\alpha=0.4</math>, we observe that the global order (black points) is close to <math display="inline">3.21</math>; meanwhile, the circled points order is four. Similar behavior is obtained for <math display="inline">x_\alpha=0.63</math>. Thus, for a given mesh resolution <math display="inline">N</math>, the IFD-IIM is still fourth-order accurate for <math display="inline">h_R/h = 1</math>, as  proven theoretically in Section [[#3.2 IFD-IIM and principal jump conditions|3.2]].
926
927
===5.3 Example 3. Poison equation with multiple interface points===
928
929
Example 3 investigates the numerical scheme capability to solve a multiple interface problem. We only focus on two interface points located at <math display="inline">x = x_{\alpha _1}</math> and <math display="inline">x = x_{\alpha _2}</math>. However, the methodology could be applied for multiple interfaces by doing minor modifications in the implementation. For this problem, the exact solution of the Poisson problem is given by
930
931
<span id="eq-42"></span>
932
{| class="formulaSCP" style="width: 100%; text-align: left;" 
933
|-
934
| 
935
{| style="text-align: left; margin:auto;width: 100%;" 
936
|-
937
| style="text-align: center;" | <math>u(x) = \begin{cases}\sin (2\pi x)& x\leq x_{\alpha _1},\\ \cos (2\pi x)& x_{\alpha _1}<x \leq x_{\alpha _2}, \\ \sin (2\pi x)& x_{\alpha _2} < x. \end{cases}  </math>
938
|}
939
| style="width: 5px;text-align: right;white-space: nowrap;" | (42)
940
|}
941
942
The right-hand function is obtained directly from the exact solution [[#eq-42|(42)]].  We consider the same computational domain and grid resolution as previous 1D examples. Fig.&nbsp;[[#img-6|6]] presents the analytical and numerical solution when the interface is located at <math display="inline">x_{\alpha _1}= 0.3</math> and <math display="inline">x_{\alpha _2} = 0.7</math> using <math display="inline">N=40</math>. This figure also shows the error analysis. As expected, the IFD-IIM is a fourth-order accurate method.
943
944
<div id='img-6'></div>
945
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
946
|-
947
|[[Image:Draft_Uh Zapata_643844164-Fig_Poisson_Ex3.png|594px|(a) Numerical and exact solution of Example 3 with multiple interfaces using N = 40, and (b) convergence error analysis using different grid resolutions.]]
948
|- style="text-align: center; font-size: 75%;"
949
| colspan="1" | '''Figure 6:''' (a) Numerical and exact solution of Example 3 with multiple interfaces using <math>N = 40</math>, and (b) convergence error analysis using different grid resolutions.
950
|}
951
952
==6 Numerical results for the Heat equation==
953
954
This section tests the IFD-IIM for the Heat conduction equation in different scenarios. Example 4 verifies the fourth-order implicit method for smooth solutions. Example 5 studies a Heat equation with a discontinuous solution in a single interface point and no source term. Finally, Example 6 presents a general discontinuous problem. For the all these examples, the computational domain is the same interval <math display="inline">[0,1]</math> and space step, <math display="inline">h</math>, used for the Poisson examples. Here, the final time is at <math display="inline">T=0.5</math> and the time step is <math display="inline">\Delta t = \frac{1}{4}h^2</math>. The error and estimated order of accuracy are reported using  [[#eq-38|(38)]] and [[#eq-39|(39)]], respectively, at the final step.
955
956
===6.1 Example 4. Heat equation with smooth solution===
957
958
This example is constructed so that the exact solution is
959
960
<span id="eq-43"></span>
961
{| class="formulaSCP" style="width: 100%; text-align: left;" 
962
|-
963
| 
964
{| style="text-align: left; margin:auto;width: 100%;" 
965
|-
966
| style="text-align: center;" | <math>u(x,t) = \sin \left(\frac{3}{2}\pi x\right)\exp (-t),  </math>
967
|}
968
| style="width: 5px;text-align: right;white-space: nowrap;" | (43)
969
|}
970
971
where the source term <math display="inline">f</math> is derived from [[#eq-27|(27)]] and [[#eq-43|(43)]]. The initial and boundary conditions are also obtained from the exact solution. The convergence analysis of this example is presented in Table [[#table-3|3]] with the final time being <math display="inline">T = 0.5</math>. As expected, the high-order methods reach their corresponding order of accuracy.
972
973
974
{|  class="floating_tableSCP" style="text-align: left; margin: 1em auto;border-top: 2px solid;border-bottom: 2px solid;min-width:50%;"
975
|+ style="font-size: 75%;" |<span id='table-3'></span>'''Table. 3''' Convergence analysis of Example 4 testing a heat equation with smooth solution.
976
|-
977
|      0.95 @c cccc cccc   
978
| style="text-align: right;" |      
979
|    
980
|-
981
| (rr)2-5  (rr)6-9 <math display="inline">N</math>  
982
| <math display="inline">L_\infty </math>-norm 
983
|  Order 
984
| <math display="inline">L_2</math>-norm 
985
|  Order
986
| <math display="inline">L_\infty </math>-norm 
987
|  Order 
988
| <math display="inline">L_2</math>-norm 
989
|  Order
990
|-
991
| 10 
992
|  1.66e-02 
993
|  &#8211;-   
994
|   1.07e-02 
995
|  &#8211;-  
996
|  1.84e-04 
997
|  &#8211;-   
998
|  1.18e-04 
999
|  &#8211;-   
1000
|-
1001
| 20 
1002
|  4.12e-03 
1003
|  2.01  
1004
|   2.65e-03 
1005
|  2.01 
1006
|  1.14e-05 
1007
|  4.01  
1008
|  7.34e-06 
1009
|  4.01  
1010
|-
1011
| 40 
1012
|  1.03e-03 
1013
|  2.00  
1014
|   6.60e-04 
1015
|  2.00 
1016
|  7.15e-07 
1017
|  4.00  
1018
|  4.58e-07 
1019
|  4.00  
1020
|-
1021
| 80 
1022
|  2.58e-04 
1023
|  2.00  
1024
|   1.65e-04 
1025
|  2.00 
1026
|  4.47e-08 
1027
|  4.00  
1028
|  2.86e-08 
1029
|  4.00  
1030
|-
1031
| 160 
1032
|  6.44e-05 
1033
|  2.00  
1034
|   4.12e-05 
1035
|  2.00 
1036
|  2.79e-09 
1037
|  4.00  
1038
|  1.79e-09 
1039
|  4.00  
1040
|-
1041
| LSM 
1042
|    
1043
| '''2.00''' 
1044
| 
1045
|  '''2.00''' 
1046
| 
1047
|  '''4.00''' 
1048
| 
1049
|  '''4.00'''
1050
|-
1051
|
1052
|}
1053
1054
===6.2 Example 5. Heat equation with discontinuous solution===
1055
1056
In this example, the exact solution <math display="inline">u</math> is defined as
1057
1058
<span id="eq-44"></span>
1059
{| class="formulaSCP" style="width: 100%; text-align: left;" 
1060
|-
1061
| 
1062
{| style="text-align: left; margin:auto;width: 100%;" 
1063
|-
1064
| style="text-align: center;" | <math>u(x) = \begin{cases}\sin (x)\exp (-t) & x\leq x_\alpha ,\\ \cos (x)\exp (-t) & x   > x_\alpha{.} \end{cases}  </math>
1065
|}
1066
| style="width: 5px;text-align: right;white-space: nowrap;" | (44)
1067
|}
1068
1069
The source term <math display="inline">f</math> of this problem is <math display="inline">f\equiv 0</math>. In this example, both the function <math display="inline">u</math> and their derivatives have jumps, and these jumps vary in time. The boundary condition, initial condition, and all jumps are specified by <math display="inline">u</math>.
1070
1071
The figure of numerical solution and absolute error plot using <math display="inline">N=40</math> for different time stages are shown in Fig.&nbsp;[[#img-7|7]]. On the other hand, the one-dimensional results at <math display="inline">t=0.5</math> are presented in Figs.&nbsp;[[#img-8|8]] and [[#img-9|9]]. More details of the grid refinement analysis at <math display="inline">t=0.5</math> is presented in Table [[#table-4|4]] for two different interface point locations. As expected, a fourth-order method is obtained for both interfaces. We remark that the variation of the errors using <math display="inline">x_\alpha=0.63</math> is because the different <math display="inline">h_R/h</math> values resulting from the discretization.
1072
1073
<div id='img-7'></div>
1074
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
1075
|-
1076
|[[Image:Draft_Uh Zapata_643844164-Fig_Heat_Ex5_3D.png|594px|Numerical solution and absolute error of Example 5 using N = 40, x_α=0.4 for tퟄ[0,0.5].]]
1077
|- style="text-align: center; font-size: 75%;"
1078
| colspan="1" | '''Figure 7:''' Numerical solution and absolute error of Example 5 using <math>N = 40</math>, <math>x_\alpha=0.4</math> for <math>t\in [0,0.5]</math>.
1079
|}
1080
<div id='img-8'></div>
1081
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
1082
|-
1083
|[[Image:Draft_Uh Zapata_643844164-Fig_Heat_SolEx5_0p40.png|594px|Numerical results at final time simulation T=0.5 and x_α=0.4 of Example 5.]]
1084
|- style="text-align: center; font-size: 75%;"
1085
| colspan="1" | '''Figure 8:''' Numerical results at final time simulation <math>T=0.5</math> and <math>x_\alpha=0.4</math> of Example 5.
1086
|}
1087
<div id='img-9'></div>
1088
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
1089
|-
1090
|[[Image:Draft_Uh Zapata_643844164-Fig_Heat_SolEx5_0p63.png|594px|Numerical results at final time simulation T=0.5 and x_α=0.63 of Example 5.]]
1091
|- style="text-align: center; font-size: 75%;"
1092
| colspan="1" | '''Figure 9:''' Numerical results at final time simulation <math>T=0.5</math> and <math>x_\alpha=0.63</math> of Example 5.
1093
|}
1094
1095
{|  class="floating_tableSCP" style="text-align: left; margin: 1em auto;border-top: 2px solid;border-bottom: 2px solid;min-width:50%;"
1096
|+ style="font-size: 75%;" |<span id='table-4'></span>'''Table. 4''' Convergence analysis of Example 5 using the IFD-IIM for the heat equation with a discontinuous solution.
1097
|-
1098
|     0.95 @c cccc cccc   
1099
| style="text-align: right;" |      
1100
|    
1101
|-
1102
| (rr)2-5  (rr)6-9 <math display="inline">N</math>  
1103
| <math display="inline">L_\infty </math>-norm 
1104
|  Order 
1105
| <math display="inline">L_2</math>-norm 
1106
|  Order
1107
| <math display="inline">L_\infty </math>-norm 
1108
|  Order 
1109
| <math display="inline">L_2</math>-norm 
1110
|  Order
1111
|-
1112
| 10 
1113
|  1.11e-07 
1114
|  &#8211;-   
1115
|   6.52e-08 
1116
|  &#8211;-  
1117
|  7.57e-08 
1118
|  &#8211;-   
1119
|  4.49e-08 
1120
|  &#8211;-   
1121
|-
1122
| 20 
1123
|  6.90e-09 
1124
|  4.01  
1125
|   4.01e-09 
1126
|  4.02 
1127
|  3.75e-09 
1128
|  4.34  
1129
|  2.25e-09 
1130
|  4.32  
1131
|-
1132
| 40 
1133
|  4.29e-10 
1134
|  4.00  
1135
|   2.49e-10 
1136
|  4.01 
1137
|  3.58e-10 
1138
|  3.39  
1139
|  2.09e-10 
1140
|  4.43  
1141
|-
1142
| 80 
1143
|  2.68e-11 
1144
|  4.00  
1145
|   1.55e-11 
1146
|  4.00 
1147
|  1.53e-11 
1148
|  4.55  
1149
|  8.93e-12 
1150
|  4.55  
1151
|-
1152
| 160 
1153
|  1.63e-12 
1154
|  4.03  
1155
|   9.39e-13 
1156
|  4.04 
1157
|  1.35e-12 
1158
|  3.50  
1159
|  7.82e-13 
1160
|  3.51  
1161
|-
1162
| LSM 
1163
|    
1164
| '''4.01''' 
1165
| 
1166
|  '''4.02''' 
1167
| 
1168
|  '''3.95''' 
1169
| 
1170
|  '''3.96'''
1171
|-
1172
|
1173
|}
1174
From Table&nbsp;[[#table-5|5]], we can find the results when the time step is chosen as <math display="inline">\Delta t = h</math>. As expected, the proposed IFD-IIM is stable and has two-order convergence either we take a second- or fourth-order approximation in space. We remark that this is a property of the selected time integration method. For instance, similar findings as Table&nbsp;[[#table-5|5]] can be obtained for smooth solutions.
1175
1176
1177
{|  class="floating_tableSCP" style="text-align: left; margin: 1em auto;border-top: 2px solid;border-bottom: 2px solid;min-width:50%;"
1178
|+ style="font-size: 75%;" |<span id='table-5'></span>'''Table. 5''' Convergence analysis of Example 5 testing the heat equation with <math>\Delta t=h</math>.
1179
|-
1180
|      0.95 @c cccc cccc   
1181
|      
1182
|    
1183
|-
1184
| (rr)2-5  (rr)6-9 <math display="inline">N</math>  
1185
| <math display="inline">L_\infty </math>-norm 
1186
|  Order 
1187
| <math display="inline">L_2</math>-norm 
1188
|  Order
1189
| <math display="inline">L_\infty </math>-norm 
1190
|  Order 
1191
| <math display="inline">L_2</math>-norm 
1192
|  Order
1193
|-
1194
| 10 
1195
|  2.94e-04 
1196
|  &#8211;-   
1197
|   1.87e-04 
1198
|  &#8211;-  
1199
|  3.78e-05 
1200
|  &#8211;-   
1201
|   2.67e-05 
1202
|  &#8211;-   
1203
|-
1204
| 20 
1205
|  8.53e-05 
1206
|  1.78  
1207
|   4.85e-05 
1208
|  1.95 
1209
|  1.03e-05 
1210
|  1.87  
1211
|   7.22e-06 
1212
|  1.89  
1213
|-
1214
| 40 
1215
|  2.11e-05 
1216
|  2.01  
1217
|   1.26e-05 
1218
|  1.94 
1219
|  2.74e-06 
1220
|  1.91  
1221
|   1.92e-06 
1222
|  1.91  
1223
|-
1224
| 80 
1225
|  5.31e-06 
1226
|  1.99  
1227
|   3.15e-06 
1228
|  2.00 
1229
|  6.91e-07 
1230
|  1.99  
1231
|   4.83e-07 
1232
|  1.99  
1233
|-
1234
| 160 
1235
|  1.34e-06 
1236
|  1.99  
1237
|   7.83e-07 
1238
|  2.00 
1239
|  1.72e-07 
1240
|  2.00  
1241
|   1.21e-07 
1242
|  2.00  
1243
|-
1244
| LSM 
1245
|    
1246
| '''1.96''' 
1247
| 
1248
|  '''1.97''' 
1249
| 
1250
|  '''1.95''' 
1251
| 
1252
|  '''1.95'''
1253
|-
1254
|
1255
|}
1256
1257
===6.3 Example 6. Heat equation with a general discontinuous solution===
1258
1259
Finally, Example 6 investigates the capability to solve a heat interface problem with a general discontinuous solution. For this problem, we slightly modified the previous example such that the exact solution of the heat conduction problem is given by
1260
1261
<span id="eq-45"></span>
1262
{| class="formulaSCP" style="width: 100%; text-align: left;" 
1263
|-
1264
| 
1265
{| style="text-align: left; margin:auto;width: 100%;" 
1266
|-
1267
| style="text-align: center;" | <math>u(x) = \begin{cases}\sin (2\pi x)\exp (-t) & x\leq x_{\alpha },\\ \cos (2\pi x)\exp (-t) & x > x_{\alpha }. \end{cases}  </math>
1268
|}
1269
| style="width: 5px;text-align: right;white-space: nowrap;" | (45)
1270
|}
1271
1272
Here, the source term <math display="inline">f</math> is a general function that varies both in time and space. It is directly derived from equation [[#eq-27|(27)]] as well as the exact solution [[#eq-45|(45)]]. Furthermore, the exact solution is utilized to specify the boundary condition, initial condition, and all jumps contributions.
1273
1274
In Fig.&nbsp;[[#img-10|10]], we depict the temporal evolution of the numerical solution and absolute errors using parameters <math display="inline">N=40</math> and <math display="inline">x_\alpha=0.4</math>. It is noteworthy that the behavior of the solution differs from the previous example. More in-depth analysis of the results at <math display="inline">T = 0.5</math> are illustrated in Figs.&nbsp;[[#img-11|11]] and [[#img-12|12]], corresponding to values of <math display="inline">x_\alpha=0.4</math> and <math display="inline">x_\alpha=0.63</math>, respectively. Grid refinement analyses are also provided in these figures. As anticipated, the IFD-IIM method demonstrates fourth-order accuracy, a validation that is further detailed in Table [[#table-6|6]].
1275
1276
<div id='img-10'></div>
1277
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
1278
|-
1279
|[[Image:Draft_Uh Zapata_643844164-Fig_Heat_Ex6_3D.png|594px|Numerical solution and absolute error of Example 6 using N = 40, x_α=0.4 for tퟄ[0,0.5].]]
1280
|- style="text-align: center; font-size: 75%;"
1281
| colspan="1" | '''Figure 10:''' Numerical solution and absolute error of Example 6 using <math>N = 40</math>, <math>x_\alpha=0.4</math> for <math>t\in [0,0.5]</math>.
1282
|}
1283
<div id='img-11'></div>
1284
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
1285
|-
1286
|[[Image:Draft_Uh Zapata_643844164-Fig_Heat_SolEx6_0p40.png|594px|Numerical results at final time simulation T=0.5 and x_α=0.4 of Example 6. ]]
1287
|- style="text-align: center; font-size: 75%;"
1288
| colspan="1" | '''Figure 11:''' Numerical results at final time simulation <math>T=0.5</math> and <math>x_\alpha=0.4</math> of Example 6. 
1289
|}
1290
<div id='img-12'></div>
1291
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
1292
|-
1293
|[[Image:Draft_Uh Zapata_643844164-Fig_Heat_SolEx6_0p63.png|594px|Numerical results at final time simulation T=0.5 and x_α=0.63 of Example 6.]]
1294
|- style="text-align: center; font-size: 75%;"
1295
| colspan="1" | '''Figure 12:''' Numerical results at final time simulation <math>T=0.5</math> and <math>x_\alpha=0.63</math> of Example 6.
1296
|}
1297
1298
{|  class="floating_tableSCP" style="text-align: left; margin: 1em auto;border-top: 2px solid;border-bottom: 2px solid;min-width:50%;"
1299
|+ style="font-size: 75%;" |<span id='table-6'></span>'''Table. 6''' Convergence analysis of Example 6 using the IFD-IIM for the heat equation with a general discontinuous solution.
1300
|-
1301
|     0.95 @c cccc cccc   
1302
| style="text-align: right;" |      
1303
|    
1304
|-
1305
| (rr)2-5  (rr)6-9 <math display="inline">N</math>  
1306
| <math display="inline">L_\infty </math>-norm 
1307
|  Order 
1308
| <math display="inline">L_2</math>-norm 
1309
|  Order
1310
| <math display="inline">L_\infty </math>-norm 
1311
|  Order 
1312
| <math display="inline">L_2</math>-norm 
1313
|  Order
1314
|-
1315
| 10 
1316
|  3.91e-04 
1317
|  &#8211;-   
1318
|   2.18e-04 
1319
|  &#8211;-  
1320
|  4.32e-04 
1321
|  &#8211;-   
1322
|  2.43e-04 
1323
|  &#8211;-   
1324
|-
1325
| 20 
1326
|  2.50e-05 
1327
|  3.97  
1328
|   1.34e-05 
1329
|  4.02 
1330
|  2.48e-05 
1331
|  4.12  
1332
|  1.45e-05 
1333
|  4.07  
1334
|-
1335
| 40 
1336
|  1.56e-06 
1337
|  4.00  
1338
|   8.37e-07 
1339
|  4.01 
1340
|  2.38e-06 
1341
|  3.38  
1342
|  1.12e-06 
1343
|  3.69  
1344
|-
1345
| 80 
1346
|  9.72e-08 
1347
|  4.00  
1348
|   5.22e-08 
1349
|  4.00 
1350
|  9.48e-08 
1351
|  4.65  
1352
|  5.56e-08 
1353
|  4.34  
1354
|-
1355
| 160 
1356
|  6.08e-09 
1357
|  4.03  
1358
|   3.26e-09 
1359
|  4.00 
1360
|  9.29e-09 
1361
|  3.35  
1362
|  4.37e-09 
1363
|  3.69  
1364
|-
1365
| LSM 
1366
|    
1367
| '''4.00''' 
1368
| 
1369
|  '''4.01''' 
1370
| 
1371
|  '''3.90''' 
1372
| 
1373
|  '''3.95'''
1374
|-
1375
|
1376
|}
1377
1378
==7 Conclusions==
1379
1380
This work serves as the general foundation for addressing high-order IIMs to solve interface problems, facilitating comprehensive investigations into this theoretical framework. Here, we present a fourth-order finite-difference scheme for approximating the second-order derivative of real-valued continuous and discontinuous functions. This method combines an implicit formulation with the immersed interface method. Our proposed scheme employs a three-point stencil, achieving different accuracy at regular and irregular points. To illustrate the effectiveness of the proposed IFD-IIM approach, we applied it to solve the one-dimensional Poisson equation and the heat conduction equation. The global accuracy of the fourth order was demonstrated using several numerical examples for both equations. Hence, this study establishes a general strategy for high-order immersed interface methods, enabling their application to elliptic and time-evolving problems in several dimensions. Additionally, the implicit procedure lends itself to developing of higher-order numerical schemes based on the IIM, including sixth-order methods.
1381
1382
==Acknowledgments==
1383
1384
This work was partially supported by CONAHCYT under the program ''Investigadoras e Investigadores por México''.
1385
1386
==Appendix A: Matlab code to solve the 1D Poisson equation==
1387
1388
This Appendix is focused on the Matlab code to solve Example 2, corresponding to a one-dimensional Poison equation with Dirichlet boundary conditions. For better exposition, the code was divided in four sections. In the first part, we provide the computational domain, the location of the interface, and a vector of different sub-divisions <code>Mvec</code>. Next, we present the main loop corresponding to the IFD-IIM implementation. The third part complement this loop solving the the linear system by the Thomas' Algorithm and the estimation of the order of accuracy using the exact solution. In the fourth section, we display the norm errors and order of accuracy. Finally, the program plots the solution for the last entree of <code>Mvec</code>. This program can be also download at https://github.com/CIMATMerida/IFD-IIM.
1389
1390
{| class="floating_imageSCP" style="text-align: center; border: 1px solid #BBB; margin: 1em auto; width: 100%;max-width: 100%;"
1391
|-
1392
1393
<pre>
1394
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1395
%                                                                         %
1396
%                  HIGH-ORDER IMMERSED INTERFACE METHOD                   %
1397
%            H. EScamilla Puc,  R. Itza Balam & M. Uh Zapata              %
1398
%                                Sept 2023                                %
1399
%  It solves the one-dimensional Poisson equation:                        %
1400
%                           u_xx  = f                                     %
1401
%  knowing jump conditions: [u], [u_x], [f], [fx], and [fxx] at the       %
1402
%  interface and Dirichlet boundary conditions.                           %
1403
%                                                                         %
1404
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1405
1406
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1407
% PROBLEM PARAMETERS & FUNCTIONS
1408
clear
1409
%&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;
1410
% Discretization
1411
xI   = 0.0;               % Initial of the domain: (xI,xF)
1412
xF   = 1.0;               % Final   of the domain: (xI,xF)
1413
alf  = 0.4;               % Location of the interface
1414
Mvec = [10,20,40,80,160]; % Number of sub-divitions (vector) 
1415
%&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;
1416
% Method
1417
b = 1/12;                 % b=1/12 (4th-order), b=0 (2nd-order)
1418
%&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;
1419
% Functions
1420
fun_uL    = @(x)         sin(pi*x);
1421
fun_uxL   = @(x)      pi*cos(pi*x);
1422
fun_fL    = @(x) -(pi^2)*sin(pi*x);
1423
fun_fxL   = @(x) -(pi^3)*cos(pi*x);
1424
fun_fxxL  = @(x)  (pi^4)*sin(pi*x);
1425
1426
fun_uR    = @(x)         cos(pi*x);
1427
fun_uxR   = @(x)     -pi*sin(pi*x);
1428
fun_fR    = @(x) -(pi^2)*cos(pi*x);
1429
fun_fxR   = @(x)  (pi^3)*sin(pi*x);
1430
fun_fxxR  = @(x)  (pi^4)*cos(pi*x);
1431
1432
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1433
% WORKSPACE
1434
1435
M = length(Mvec);
1436
hvec     = zeros(M,1);
1437
NormE1   = zeros(M,1);
1438
NormE2   = zeros(M,1);
1439
OrderOr1 = zeros(M,1);
1440
OrderOr2 = zeros(M,1);
1441
1442
for s=1:M
1443
   %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;
1444
   % DISCRETIZATION
1445
   n = Mvec(s);
1446
   %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;-
1447
   % Points and step size
1448
   x  = linspace(xI,xF,n+1)';
1449
   h  = x(2)-x(1); 
1450
   h2 = h*h;
1451
   %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;-
1452
   % Find I: the interval where alpha is
1453
   for i=1:n
1454
      if  (x(i)<=alf) && (alf<x(i+1))
1455
         I = i;
1456
         break;
1457
      end
1458
   end 
1459
   %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;
1460
   % MATRIX & RIGHT-HAND SIDE
1461
   A1 = zeros(n,1);
1462
   A2 = zeros(n+1,1);
1463
   A3 = zeros(n,1);
1464
   rhs= zeros(n+1,1);
1465
   %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;-
1466
   f(1:I)     = fun_fL(x(1:I));
1467
   f(I+1:n+1) = fun_fR(x(I+1:n+1));    
1468
   %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;-
1469
   % Boundary
1470
   A2(1)    = 1/h2;
1471
   rhs(1)   = fun_uL(x(1))/h2; 
1472
   A2(n+1)  = 1/h2;
1473
   rhs(n+1) = fun_uR(x(n+1))/h2;
1474
   %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;-
1475
   % Regular points: Equation (22) in Escamilla et al. 2023
1476
   A1(1:n-1) =  1/h2;
1477
   A3(2:n)   =  1/h2;
1478
   A2(2:n)   = -2/h2;
1479
   rhs(2:n)  =  b*f(3:n+1)+(1-2*b)*f(2:n)+b*f(1:n-1);
1480
   %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;-
1481
   % Irregular points: Equation (26) in Escamilla et al. 2023
1482
   hL   = x(I)   - alf;
1483
   hR   = x(I+1) - alf;
1484
   %&#8211;&#8211;-  
1485
   uJ   = fun_uR(alf)   - fun_uL(alf);    % [u]
1486
   uxJ  = fun_uxR(alf)  - fun_uxL(alf);   % [ux]
1487
   fJ   = fun_fR(alf)   - fun_fL(alf);    % [f]
1488
   fxJ  = fun_fxR(alf)  - fun_fxL(alf);   % [fx]
1489
   fxxJ = fun_fxxR(alf) - fun_fxxL(alf);  % [fxx]
1490
   %&#8211;&#8211;-
1491
   CI   =  (1/h2)*(uJ + hR*uxJ + 0.5*(hR^2)*fJ) ...
1492
          - b*(fJ + hR*(1-2*hR^2/h2)*fxJ + 0.5*hR^2*(1-hR^2/h2)*fxxJ);
1493
   CIp1 = -(1/h2)*(uJ + hL*uxJ + 0.5*(hL^2)*fJ) ...
1494
          + b*(fJ + hL*(1-2*hL^2/h2)*fxJ + 0.5*hL^2*(1-hL^2/h2)*fxxJ);
1495
   %&#8211;&#8211;-    
1496
   rhs(I)   = rhs(I)   + CI;
1497
   rhs(I+1) = rhs(I+1) + CIp1;
1498
    %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;
1499
    % LINEAR SYSTEM SOLUTION BY THOMAS
1500
    U = zeros(n+1,1);
1501
    for i=1:n
1502
       A2(i+1)=A2(i+1)-A3(i)*A1(i)/A2(i);
1503
       rhs(i+1)=rhs(i+1)-rhs(i)*A1(i)/A2(i);
1504
    end
1505
    U(n+1)=rhs(n+1)/A2(n+1);
1506
    for i=n:-1:1
1507
       U(i)=(rhs(i)-U(i+1)*A3(i))/A2(i);
1508
    end       
1509
   %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;
1510
    % ERRORS & ORDER
1511
    %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;-
1512
    % Exact solution
1513
    Uexact(1:I)     = fun_uL(x(1:I));
1514
    Uexact(I+1:n+1) = fun_uR(x(I+1:n+1));
1515
    %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;-
1516
    % Norm errors
1517
    Err       = abs(Uexact'-U);
1518
    NormE1(s) = norm(Err,inf);
1519
    NormE2(s) = sqrt(h*sum(Err.^2));
1520
    %&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;-
1521
    % Estimated order
1522
    hvec(s) = h;
1523
    if s&nbsp;=1
1524
       div = log((hvec(s-1))/(hvec(s)));
1525
       OrderOr1(s) = log(NormE1(s-1)/NormE1(s))/div;
1526
       OrderOr2(s) = log(NormE2(s-1)/NormE2(s))/div;
1527
    end
1528
end
1529
1530
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1531
% DISPLAY & PLOT
1532
1533
disp('   N   — Max-norm Order — L2-norm  Order')
1534
disp('&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;&#8211;')
1535
fprintf(' %5i — %.2e  &#8211;&#8211; — %.2e  &#8211;&#8211; \n',...
1536
Mvec(1),NormE1(1),NormE2(1))
1537
for i=2:M
1538
   fprintf(' %5i — %.2e  %.2f — %.2e  %.2f \n', ...
1539
   Mvec(i),NormE1(i),OrderOr1(i),NormE2(i),OrderOr2(i))
1540
end
1541
1542
figure
1543
hold on
1544
plot(x,U,'o')
1545
plot([x(1:I);alf],[Uexact(1:I)';fun_uL(alf)],'-k','LineWidth',2)
1546
plot([alf;x(I+1:end)],[fun_uR(alf);Uexact(I+1:end)'],'-k','LineWidth',2)
1547
plot([alf,alf],[min(U),max(U)],'&#8211;r')
1548
legend('Numerical','Analytical')
1549
xlabel('x')
1550
ylabel('u')
1551
title(sprintf('Solution (N=%d)',n))
1552
1553
figure
1554
hold on
1555
plot(x,Err,'-k','LineWidth',2)
1556
plot([alf,alf],[min(Err),max(Err)],'&#8211;r')
1557
xlabel('x')
1558
ylabel('—U-u—')
1559
title(sprintf('Absolute error (N=%d)',n))
1560
1561
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
1562
</pre>
1563
1564
1565
|}
1566
1567
===BIBLIOGRAPHY===
1568
1569
<div id="cite-1"></div>
1570
'''[[#citeF-1|[1]]]'''    H. J. Diersch, Fletcher, C.A.J. (1988). Computational Techniques for Fluid Dynamics. Vol. I: Fundamental and General Techniques. Vol. II: Specific Techniques for Different Flow Categories. Springer-Verlag. <div id="cite-2"></div>
1571
'''[[#citeF-2|[2]]]'''   Sethian, J. A. (1999). Level Set Methods and Fast Marching Methods: Evolving Interfaces in Geometry, Fluid Mechanics, Computer Vision, and Materials Sciences, Cambridge University Press. <div id="cite-3"></div>
1572
'''[[#citeF-3|[3]]]'''   Li, Z. & Ito, K. (2006). The Immersed Interface Method: Numerical Solutions of PDEs Involving Interfaces and Irregular Domains, SIAM: Frontiers in Applied Mathematics. <div id="cite-4"></div>
1573
'''[[#citeF-4|[4]]]'''  Javierre E., Vuik C., Vermolen, F. J. & Van der Zwaag, S. (2006). A comparison of numerical models for one-dimensional Stefan problems. Journal of Computational and Applied Mathematics, 192(2), 445&#8211;459. <div id="cite-5"></div>
1574
'''[[#citeF-5|[5]]]'''    Shi, Y. E., Ray, R. K., & Nguyen, K. D. (2013). A projection method-based model with the exact C-property for shallow-water flows over dry and irregular bottom using unstructured finite-volume technique. Computers & Fluids, 76, 178&#8211;195. <div id="cite-6"></div>
1575
'''[[#citeF-6|[6]]]'''   Uh, M. & Xu, S. (2014). The immersed interface method for simulating two-fluid flows, Numerical Mathematics: Theory, Methods and Applications, 7(4), 447&#8211;472. <div id="cite-7"></div>
1576
'''[[#citeF-7|[7]]]'''    Li M., Fornberg B. & Tang T. (1995). A compact fourth order finite difference scheme for the steady incompressible Navier-Stokes equations, Int. J. Numer. Methods Fluids 20, 1137&#8211;1151. <div id="cite-8"></div>
1577
'''[[#citeF-8|[8]]]'''      Zhang, J. (2002). Multigrid method and fourth-order compact scheme for 2D Poisson equation with unequal mesh-size discretization. J. Comput. Phys. 179(1), 170&#8211;179. <div id="cite-9"></div>
1578
'''[[#citeF-9|[9]]]'''    Nabavi, M., Siddiqui, M.H.K., & Dargahi J. (2007). A new 9-point sixth-order accurate compact finite difference method for the Helmholtz equation, J. Sound Vib. 307, 972&#8211;982. <div id="cite-10"></div>
1579
'''[[#citeF-10|[10]]]'''    Wang Y., &  Zhang J. (2009). Sixth order compact scheme combined with multigrid method and extrapolation technique for 2D poisson equation, J. Comput. Phys. 228, 137&#8211;146. <div id="cite-11"></div>
1580
'''[[#citeF-11|[11]]]'''      Zhai, S., Feng, X., & He, Y. (2014). A new method to deduce high-order compact difference schemes for two-dimensional Poisson equation. Applied Mathematics and Computation, 230, 9&#8211;26. <div id="cite-12"></div>
1581
'''[[#citeF-12|[12]]]'''  Uh Zapata, M. , & Itzá Balam, R. (2017). High-order implicit finite difference schemes for the two-dimensional Poisson equation. Applied Mathematics and Computation, 309, 222&#8211;244. <div id="cite-13"></div>
1582
'''[[#citeF-13|[13]]]'''  Itzá Balam, R., & Uh Zapata, M (2020). A new eighth-order implicit finite difference method to solve the three-dimensional Helmholtz equation. Computers & Mathematics with Applications, 80(5), 1176&#8211;1200. <div id="cite-14"></div>
1583
'''[[#citeF-14|[14]]]'''  Itza Balam, R., & UhZapata, M. (2022). A fourth-order compact implicit immersed interface method for 2D Poisson interface problems. Computers & Mathematics with Applications, 119, 257&#8211;277. <div id="cite-15"></div>
1584
'''[[#citeF-15|[15]]]'''  Uh Zapata, M., Itza Balam, R., & Montalvo-Urquizo, J. (2023). A compact sixth-order implicit immersed interface method to solve 2D Poisson equations with discontinuities. Mathematics and Computers in Simulation, 210, 384&#8211;407. <div id="cite-16"></div>
1585
'''[[#citeF-16|[16]]]'''   Peskin, C. S. (2002). The immersed boundary method, Acta Numer. 11, 479&#8211;517. <div id="cite-17"></div>
1586
'''[[#citeF-17|[17]]]'''  Liu, X. D., & Soderis, T. C. (2003). Convergence of the ghost fluid method for elliptic equations with interfaces, J. Math. Comp. 72, 1731&#8211;1746. <div id="cite-18"></div>
1587
'''[[#citeF-18|[18]]]'''  Hu, H., Pan, K., & Tan, Y. (2010). An interpolation matched interface and boundary method for elliptic interface problems, J. Comput. Appl. Math. 234, 73&#8211;94. <div id="cite-19"></div>
1588
'''[[#citeF-19|[19]]]'''   Mu, L., Wang, J., Ye, X., & Zhao, S. (2016). A new weak Galerkin finite element method for elliptic interface problems, J. Comput. Phys., 325, 157&#8211;173. <div id="cite-20"></div>
1589
'''[[#citeF-20|[20]]]'''  Cho, H., Han, H., Lee, B., Ha, Y.,  & Kang, M. (2019). A second-order boundary condition capturing method for solving the elliptic interface problems on irregular domains, Journal of Scientific Computing, 81(3), 217&#8211;251. <div id="cite-21"></div>
1590
'''[[#citeF-21|[21]]]'''  Itzá Balam, R. , Hernandez-Lopez, F., Trejo-Sánchez, J., & Uh Zapata, M (2020). An immersed boundary neural network for solving elliptic equations with singular forces on arbitrary domains. Mathematical Biosciences and Engineering: MBE, 18(1), 22&#8211;56. <div id="cite-22"></div>
1591
'''[[#citeF-22|[22]]]'''   Leveque R.J., & Li Z.  (1994). The immersed interface method for elliptic equations with discontinuous coefficients and singular sources, SIAM J. Numer. Anal. 31 (4), 1019-1044. <div id="cite-23"></div>
1592
'''[[#citeF-23|[23]]]'''   Wiegmann A., &  Bube K.P. (2000) The explicit-jump immersed interface method: finite difference methods for PDEs with piecewise smooth solutions, SIAM J. Numer. Anal. 37 (3), 827&#8211;862. <div id="cite-24"></div>
1593
'''[[#citeF-24|[24]]]'''   Berthelsen, P. A. (2004). A decomposed immersed interface method for variable coefficient elliptic equations with non-smooth and discontinuous solutions. J. Comput. Phys. 197(1), 364&#8211;386. <div id="cite-25"></div>
1594
'''[[#citeF-25|[25]]]'''   Seo, J. H. & Mittal, R. (2011). A high-order immersed boundary method for acoustic wave scattering and low-Mach number flow-induced sound in complex geometries, J. Comput. Phys., 230, 1000&#8211;1019. <div id="cite-26"></div>
1595
'''[[#citeF-26|[26]]]'''    Ito, K., Li, Z., & Kyei, Y. (2005). Higher-order, Cartesian grid based finite difference schemes for elliptic equations on irregular domains. SIAM Journal on Scientific Computing, 27(1), 346-367. <div id="cite-27"></div>
1596
'''[[#citeF-27|[27]]]'''   Gibou, F., & Fedkiw, R. (2005). A fourth order accurate discretization for the Laplace and heat equations on arbitrary domains, with applications to the Stefan problem. J. Comput. Phys., 202(2), 577-601. <div id="cite-28"></div>
1597
'''[[#citeF-28|[28]]]'''   Linnick, M. N., & Fasel, H. F. (2005). A high-order immersed interface method for simulating unsteady incompressible flows on irregular domains. J. Comput. Phys., 204(1), 157-192. <div id="cite-29"></div>
1598
'''[[#citeF-29|[29]]]'''    Zhou, Y. C., Zhao, S., Feig, M., & Wei, G. W. (2006). High order matched interface and boundary method for elliptic equations with discontinuous coefficients and singular sources. J. Comput. Phys., 213(1), 1&#8211;30.  <div id="cite-30"></div>
1599
'''[[#citeF-30|[30]]]'''   Zhong, X. (2007). A new high-order immersed interface method for solving elliptic equations with imbedded interface of discontinuity. J. Comput. Phys., 225(1), 1066-1099. <div id="cite-31"></div>
1600
'''[[#citeF-31|[31]]]'''   Feng, X., Li, Z., & Qiao, Z. (2011). High order compact finite difference schemes for the Helmholtz equation with discontinuous coefficients. J. of Comput. Math., 324&#8211;340. <div id="cite-32"></div>
1601
'''[[#citeF-32|[32]]]'''    Pan, K., He, D., & Li, Z. (2021). A high order compact FD framework for elliptic BVPs involving singular sources, interfaces, and irregular domains. J. Sci. Comput. 88(3), 1&#8211;25. <div id="cite-33"></div>
1602
'''[[#citeF-33|[33]]]'''    Colnago, M., Casaca, W., & de Souza, L. F. (2020). A high-order immersed interface method free of derivative jump conditions for Poisson equations on irregular domains. J. Comput. Phys. 423, 109791. <div id="cite-34"></div>
1603
'''[[#citeF-34|[34]]]'''           Claerbout, J.F. The craft of wave-field extrapolation, in Imaging the Earth's Interior, Blackwell Scientific Publications, Oxford (1985), 260-265. <div id="cite-35"></div>
1604
'''[[#citeF-35|[35]]]'''    Liu, Y., & Sen, M. K. (2009). A practical implicit finite-difference method: examples from seismic modeling. Journal of Geophysics and Engineering, 6(3),  231. <div id="cite-36"></div>
1605
'''[[#citeF-36|[36]]]'''   Xu S., & Wang Z.J.,  (2006). Systematic Derivation of Jump Conditions for the Immersed Interface Method in Three-Dimensional Flow Simulation, J. Sci. Comput., 27(6), 1948-1980. <div id="cite-37"></div>
1606
'''[[#citeF-37|[37]]]'''  Feng, X., & Li, Z. (2012). Simplified immersed interface methods for elliptic interface problems with straight interfaces. Num. Meth. for Par. Diff. Eqs. 28(1), 188&#8211;203.
1607

Return to Puc et al 2023a.

Back to Top