Example 1: 1D Linear BVP
\begin{cases} u''(x) = u(x), \\ u(0) = 0, \\ u(1) = 1. \end{cases} The exact solution is: u(x)=\frac{e^x-e^{-x}}{e^{1}-e^{-1}} Subdivide the domain into two subdomains, one from \left[0,\tfrac{1}{2}\right] and another from \left[\tfrac{1}{2},1\right]. In the left subdomain define the interpolating function v_1(x) and in the right define v_2 (x) . At the interface between these two subdomains the following interface conditions shall be imposed: \begin{align} v_1{\left(\frac{1}{2}\right)} &= v_2{\left(\frac{1}{2}\right)} \\ v_1'{\left(\frac{1}{2}\right)} &= v_2'{\left(\frac{1}{2}\right)} \end{align} Let the interpolating functions be defined as: \begin{align} v_1(x) &= \sum_{n=0}^{N} u_{n} T_n (y_1(x)) \\ v_2(x) &= \sum_{n=0}^{N} u_{n+N} T_n (y_2(x)) \\ y_1(x) &= 4x-1 \\ y_2(x) &= 4x-3 \end{align} Where T_n (y) is the nth cardinal function of the Chebyshev polynomials of the first kind with input argument y. If N=4 then the following approximation is obtained by this scheme: \begin{align} u_1 &= 0.06236, & u_2 &= 0.21495, \\ u_3 &= 0.37428, & u_4 &= 0.44341, \\ u_5 &= 0.51492, & u_6 &= 0.69972, \\ u_7 &= 0.90645. \end{align} This was obtained with the following MATLAB code. clear all N = 4; a1 = 0; b1 = 1/2; [T D1 D2 E1 E2 x xsub] = cheb(N,a1,b1); % the diff matrices on [0,1/2] are the same %as those on [1/2 1]. I = eye(N+1); H = D2-I; H1 = 1 zeros(1,N)]; H(2:end-1,:); [zeros(1,N) 1; H1 = [H1 [zeros(N,N+1); -[1 zeros(1,N)]; H2 = [D1(1,:); H(2:end-1,:); [zeros(1,N) 1; H2 = -D1(N+1,:); zeros(N,N+1)] H2]; K = [H1; H2]; F = [zeros(2*N+1,1); 1]; u = K\F; xx = -cos(pi*(0:N)'/N); x1 = 1/4*(xx+1); x2 = 1/4*(xx+3); x = [x1; x2]; uex = (exp(x)-exp(-x))./(exp(1)-exp(-1)); ==See also==
Related Books
• Barry Smith, Petter Bjørstad, and William Gropp: Domain Decomposition: Parallel Multilevel Methods for Elliptic Partial Differential Equations, Cambridge Univ. Press, ISBN 0-521-49589-X (1996). == External links ==