Content deleted Content added
m logo caption |
|||
Line 13:
Finite element simulations of moderate size models require solving linear systems with millions of unknowns. Several hours per time step is an average sequential run time, therefore, parallel computing is a necessity. Domain decomposition methods embody large potential for a parallelization of the finite element methods, and serve a basis for distributed, parallel computations.
==Example 1: 1D Linear BVP==
<math> u''(x)-u(x)=0 </math><br>
<math> u(0)=0, u(1)=1 </math><br>
The exact solution is:<br>
<math> u(x)=\frac{e^x-e^{-x}}{e^{1}-e^{-1}} </math><br>
Subdivide the ___domain into two subdomains, one from <math>[0,\frac{1}{2}]</math> and another from <math>[\frac{1}{2},1]</math>. In each of these two subdomains define interpolating functions <math> v_1(x) </math> and <math> v_2 (x) </math> At the interface between these two subdomains the following inferface conditions shall be imposed:<br>
<math> v_1\left(\frac{1}{2}\right)=v_2 \left(\frac{1}{2}\right) </math><br>
<math> v_1'\left(\frac{1}{2}\right)=v_2'\left(\frac{1}{2}\right)</math><br>
Let the interpolating functions be defined as:<br>
<math> v_1 (x) =\sum_{n=0}^{N} u_{n} C_n (y_1(x)) </math><br>
<math> v_2 (x) =\sum_{n=0}^{N} u_{n+N} C_n (y_2(x)) </math><br>
<math> y_1(x)=4x-1 </math><br>
<math> y_2(x)=4x-3 </math><br>
Where <math> T_n (y) </math> is the nth cardinal function of the chebyshev polynomials of the first kind with input argument y.<br>
If N=4 then the following approximation is obtained by this scheme:<br>
<math> u_1 =0.06236 </math><br>
<math> u_2 =0.21495 </math><br>
<math> u_3 =0.37428 </math><br>
<math> u_4 =0.44341 </math><br>
<math> u_5 =0.51492 </math><br>
<math> u_6 =0.69972 </math><br>
<math> u_7 =0.90645 </math><br>
This was obtained with the following MATLAB code. <br>
<source lang="matlab">
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));
</source><br>
==See also==
|