Chapter 6 Part 1
Chapter 6 Part 1
chapter 6
Objectives
Chapter 5 showed the equivalence behA:'een a certain class of PDEs and minimiza-
tion problems. As a consequence solvmg the PDE also solves the minimization
problem and vice versa. Cha~ters 3, ~ were devoted to solving the PDE directly
by finite differences or, after mtegrahon over a volume, by finite volumes. In
this chapter we shall solve the corresponding minimization problem numerically.
Hence the PDE is solved in an indirect way.
The numerical technique that will be applied is the classical Ritz's method based on
expressing the solution as a linear combination of previously chosen functions: the
basis functions. These are in general not related to the problem, but chosen before-
hand. This method itself is not very practical, but combined with a clever choice
of basis functions we arrive at the finite element method (FEM). The FEM is well
suited for unstructured grids and has a strict local character. All information in
one element is used, without considering neighbors. This makes the method very
attractive for computer implementation. For certain types of PDEs, for example
those arising from elasticity and plasticity problems, the FEM is the most popular
method at this moment.
Another way of looking at the FEM, is to consider it as an automatic tool to derive
finite difference formula for unstructured grids. An important advantage of the
FEM is that the treatment of boundary conditions is almost always very natural
and therefore simpler than in classical difference methods.
Where the minimum must be found over a class of functions in the target space I::
111111.........
Numerical methods in scientific co
Illputing
98
that the solution of this problem is not .
demons trated • sun l
Chapter 5 alrea d Y . minimization problem with one unknown ( ) Pe.
Actually we transformed it to ~uations. € 'thus
deriving the ~ule_r-Lagra;f;;, (6.1.2) is in general only possible if we have a . .
Direct minimization of ( · · finite
ber of unknowns.
num oximating the solution by a linear combinati
This can be achieved ~y app~ x)· on of a
finite fixed set of functions q,, ( .
11
t fl
._ aj
dcp; dcpj
-;[; dx dx=
fl f(x)q,i(x)dx, i=l,2, ... ,n. (6.1.7)
}- 1 0
0
>
6. The numerical solution of minimization problems 99
Proof
Substitution of (6.1.5) in (6.1.6), (6.1.5) gives
!_ j{1
! (d .Eaj<pj(x))
J=l
2
n
aai 2 dx - f(x)([aj<pj(x))}dx=O . (6.1.8)
0 j=l
d2u
- dx2 = f (x)' (6.1.9)
Sa= f, (6.1.11)
1
with San (n x n) matrix with elements sij = f 1x if dx,
0
There are many possible choices for the basis functions cp;(x), but we shall restrict
ourselves to 2 specific ones.
Theorem 6.1.2 Let the basis functions (f)i(x) be given by
(6.1.13)
□
The basis functions 'Pk(x) are elements of r., since they are analytical functions
and satisfy <t>k(O) = 0. Note that none of them satisfies the natural boundary condi-
tion. Using the orthogonality relations of the cosine we see that the basis functions
<'Pk(x) produce a diagonal matrix S, with diagonal elements (6.1.13)
>
Numerical methods in scientifi
100 CColllputin
h t E uation (6.1.14) is the result of substituting th g
Exercise 6.1.3 Prove t a q e basis Ju
tions (6.1.12) into (6.1.7) ne-
t the set ak defined by (6.1.14) form the coefficients th CJ
Exercise 6.1.4 Show th ~ t' u(x) using functions sin(krrx) . of e Fourie
expansion of the exact ~o u ion r
Hint: substitute 6.1.3 mto 6.1· 9·
· (x) be given by CJ
Theorem 6.1.3 Let the basis junctions <p;
<pk(x) = i
(6,l.15)
. . by
then the matrix Sin (6.1.11) zs gzven
1 1 1 1 1
4 6 8 10
1 g 6
~ -f2
1
S= 1 i f2 f6...,,. (6,1.16)
6
1 6
fo
0
Exercise 6.1.5 Derive Equation (6.1.16) . 0
s
Matrix in (6.1.16) is a Hilbert matrix. _N?t only ~s this matrix ~ll, it is also very
badly conditioned. Although the matnx 1s non-smgular, numenc~Uy it is not in-
vertible for relatively small values of n (order 10 to 20), on a 16 digits computer.
From these two specific choices for the basis functions we can draw some conclu-
sions with respect to requirements for the basis functions .
- Even though the basis functions themselves do not satisfy the natural bound-
ary condition, in the limit the linear combination does in some way, if there
is convergence to the exact solution. In practice ¥x- (x) will be small in some
sense, for n large enough.
- We have seen that with the specific choice (6.1.12) of the basis functions,
the coefficient matrix is diagonal, and therefore the solution of the syStem
of equations is trivial.
This is not a coincidence: these functions form the eigenfunctions of the con-
tinuous eigenvalue problem
d2u (6.1.17)
- dxz =Au; u(O) = 0, u(l) = 0.
These eigenfunctions are orthogonal with respect to the inner product
1
dcp; dcpj
J
0
dxdx dx,
6_The numerical solution of minimization problems 101
which implies that these inner products vanish if i -f. j. Also for more general
problems one can define such an inner p~oduct and again the eigenfunctions
have the sam~ property. ~nfortunately m practice it is almost impossible to
find an analytical expression for the eigenfunctions. Numerical computation
of the eigenfunctions is in general a harder task than solving the system of
equations (6.1.11).
_ On the other hand choosing an arbitrary set of basis functions leads to a full
matrix. Unless the number of basis functions is very small, solution of such
a system is very expensive.
In finite differenc_e meth?ds and finite volume methods we always arrived at
systems of equations with a sparse structure. If we want a sparse matrix in
Ritz's method, it is necessary that most of the integrals
1
d<p; d<pj
J
0
--dx
dx dx
vanish. So the majority of the basis functions must be orthogonal with re-
spect to the inner product defined by these integrals. We shall call such a set
"nearly orthogonal".
- It is obvious that in the limit, the set of basis functions must span the com-
plete space r., otherwise there are elements in r. that can not be represented
as linear combination of basis functions. Besides that, it would be nice if arbi-
trary functions in r. could be approximated accurately with a small number
of basis functions. The basis functions <f'k(x) in (6.1.12) do not satisfy this
property.
Combining all this we come to the following requirements for our set of basis func-
tions:
At first sight it seems very difficult to satisfy all these demands. However, in Sec-
tion 6.2 we shall show how to construct such basis functions by the finite element
method.
We have treated lightly over the convergence of Ritz's method for a good reason:
this is very hard to prove in general. For a specific case of practical importance we
provide a proof: strongly elliptic operators (see Section 5.8.2).
Definition 6.1.1 A family {<p«} E r. is called a basis for the Hilbert space r., if the
following two properties are satisfied.
Numerical methods in scientific
co.rnputin
102 g
1. Linear independence
f ~;<p; == o implies ~; == 0, i = 1, .. , N .
i=l
Theorem 6.1.4 The Ritz equations with approximate solution (6.1.3) to solve the mini-
mization problem (5.9.9):
1
minl[u], with J[u] = -2 llulli - (u,f), (6.1.18)
11Er.
are given by
n
[aj(</Ji,Cf'j)L = (f,<p;) i = 1, .. .,n. (6.1.19)
j= l
The system of linear equations (6.1.19) has a unique solution if and only if the
coefficient matrix S defined by
(<pi, <p1)L (<p2, <p1)L (q>n,<p1)L
( <pi, <pz)L ( <p2, <p2) L ( <pn, <p2)L
S= (6.1.20)
is non-singular.
S is a Gramm matrix for the set of functions q,1, q,2, .. ., <pn in the space r.. In the
following we assume that {<p;} is a basis for L
Theorem 6.1.5 S defined by (6.1.20) is not singular.
Proof
Suppose there is a non-zero vector« = (a: 1, a: 2, ... , a:n) such that S« = 0.
Then(«, S«) = 0 so
L l)ia:j (<p;, </Jj) L = 0 .
i j
Since the inner product is bilinear this implies
(~a:;<p;, L:>j'Pj)L = 0 or
I j
~y t~e linear indepe~dence of the basis functions, this implies a:; = 0. So S« :::: O
unphes « = 0 and S 1s non-singular. 0
~
umerical solution of minimization problems 103
6. Then
,n 6.1.6 If {<p;} is a basis for E, then approximation (6 .1.3) converges to the solu-
~heore ,f the minimization problem (6.1.18),.
ttOlt UO O;
where Uo E r. minimizes / [u] over r.. This is a continuous function of the energy
norm (why?), that is
\/£ > 0 :3 i5 > 0 such that
llu - uollL < i5 ⇒ IJ[u] - /[uo]I < £. (6.1.22)
Let u EE"= Span {<pj}?=l minimize /[u] over 1:11 , then
0
/[uo] :S /[uo] :S /[u"], Vu" EE". (6.1.23)
We choose u" using completeness:
:3N 2'. 1, ll'.1, ... , ll'.N such that
"
lluo - u11 IIL < b, with u" = L ll'.jfPj, \/n 2'. N. (6.1.24)
j=l
Continuity of /[u] gives 1/[u"] - /[uo] I < £. Note that£ > 0 is arbitrary, for which
b > Oand N ~ 1 exist, and hence /[u"] ➔ J[uo] as n ➔ oo.
The Squeeze Theorem is applied to (6.1 .23) to conclude that
J[u0] ➔ J[uo] as n ➔ oo. (6.1 .25)
Equation {6.1.21) finally implies llua - uoll ➔ 0 as n ➔ 00, □
du(l) =0.
dx
Numerical methods in scientific
104 cornputing
Exercise 6.2.1 Show that the solution of (6.2.V satisfies the m inimization problem
J{½(::)2 -
1
mml[u]; J[u] = u(x)f(x)} dx .
(6.2..2.)
uEE O
r. : {u sufficient! y smooth ; u ( 0) = 0}
0
.. irement implies that the integral in (6.2.2) makes sen
The smoo thness reql,..U.A se.
The s stem of Ritz equations is given by (6.1 .7). . . .
y tru t the basis functions we subd1v1de the mterval [O l] into b·
In ord er to cons c . . ' su in
elements as shown m Figure 6 .1. -
terva ls ek = Xk - 1, k
[ X ] the '
ek en
e1 )( )( )( )(
)( )(
>< Xn
Xk-1 Xk
Xo XJ
X =l
x=O
Figure 6.1 : Subdivision of the interval (0, 1] in elements.
"1
"n- 1
.\'.
Xo xn-1 n
Exercise 6.2.2 Let a be a piecewise linear approximation of u. Then a does not belong to
C1 (0, 1). Let f(x) be a continuous function.
Show that the integral in (6.2.2) remains finite when u is replaced by a. D
Exercise 6.2.3 Show that Formula (6.2.3) is indeed the linear interpolation polynomial.
□
Formally spea~g it is not correct to use u(xk) since u(x) is unknown. It wo~d
be ~tter ~o use u ( xk) • However, as long as there is no confusion possible, we will
orrut the tilde.
6_The numerical solution of minimization problems
-
105
(6.2.4)
Exercise 6.2.4 Sketch the basis functions <po (x) and <pn (x). □
Note that <p;(x) is only non-zero in the elements that contain the node x;.
It is immediately clear that q,;(x) is defined by the following rules:
The basis function cpo(x) will be used for non-homogeneous boundary conditions
(see Section 6.2.4).
106
N1111wrk11l 111~/hods 111 sc1t,, ti ,
1
~
co,,, Pt111,
Irr ,
(6.2.12)
0 - 1 2 - :I
11,,
-1 1 J,,
1
· II Jir =
Wlf J/(r)11>·(l·)
· Tl . cl.r.
0
trapezoid rule:
Xt-1
(6.2.14)
Simpson's rule:
(6.2.15)
All these rules can be written in the general form:
Xk
Exercise 6.2.7 Give r, wk and vkfor the midpoint rule, the trapezoid rule and Simpson's
~ □
th
Anoth er class of integration rules of the shape (6.2.16) are the Gaussian rules. These
me ods are characterized by the fact that integration points and weights are cho-
th
sen such at the highest order of accuracy is reached with a particular number of
-
6.
'[he nwnerical solution of minimization problems 107
f
Q
J(x)cp;(x) dx = f f (x)<pi(x)
X j- 1
dx + f f (x)cp;(x)
X;
dx. (6.2.17)
The integrand g(x) in (6.2.17) is defined by /(x)<p;(x). We could use every possible
integration rule of type (6.2.16) to compute (6.2.17).
We consider integration over the element [xk- 1, xkl• In the Finite Element Method,
one represents the numerical solution in terms of a linear combination of basis
functions. For the case of linear basis functions, one approximates the function
g(x) by linear interpolation, that is
g(x) ~ g(xk-1)'Pk- 1(x) + g(xk)cpk(x), (6.2.18)
over the interval {xk- 1, xkl- Subsequently, integration over {xk-l, xd gives
Xk- 1 Xk - 1
xk - 1 xk - 1
Using linearity of the basis functions and the relation <p;(xj) = Oij, we get
f
Xk - 1
Similar rules are derived for higher order basis functions with more quadrature
points. Imagine that one integrates over interval {xk- 1, Xk+ml, l, m 2:: 0, l · m i=- 0.
Let this interval contain nodes xk- 1, xk- 1+1, ... , xk+m, then using the basis func-
tions <f)k- 1, <f)k- 1+1' ... , <f)k+m one can write the following interpolating approxima-
tion for g( x)
k+m
g(x) ~ [, g(xp)<pp(x). (6.2.22)
p=k-1
This interpolation is substituted into the integral over g(x)
Xk + m k+m Xk+m
This type of quadrature based on interpolation on the FEM basis functions is called
Newton-Cotes rule.
Theorem 6.2.2 The Newton-Cotes rule applied to (6.2.12), the right-hand side vector can
be written as
h (6.2.24)
108 Numerical methods in sc·
ientific co .....
"'Putin g
Exercise 6.2.8 Prove Theorem 6.2.2.
~ga~ we use the linear Lagrangian polynomials £i(x) as basis functions, so (fli(x)
1s defined by (6.2.10). Now it is clear that u 0 = a (why?).
If we use the approximation (6.2.27), the Ritz equations corresponding to (6.2.26)
are equal to
~uj J
1 d
(/Ji d<pj
dxdxdx=
J
1
d ·d
1
fq,idx-uoj d<p1 d<po dx+bq,i(l) (6.2.28)
J-1 O X X
0 0
i = 1, 2, .. ., n.
~ •
_The numerical solution of minimization problems 109
6
1 -1 Uo /o/2
-1 2 -1 U1
-1 2 -1 Ii
U2
1
=h
h
h
-1 2 -1 Un-1 fn - 1
-1 1 Un fn/2 + b/h
Exercise 6.2.10
a. Derive (6.2 .28).
b. Why is i = 0 not part of (6.2.28)?
c. Which of the functions cp;(x) is non-zero in x = 1?
From Formula 6.2.28 it will be clear that the non-homogeneous essential boundary
condition gives a contribution to the right-hand side. To compute this contribution
we first build the matrix and right-hand side as if there are no essential bound-
ary conditions (see Figure 6.4). Following Exercise 6.2.10 row 1 (corresponding to
<p; = cpo), must be removed. Since the matrix must be square also column 1 must
be removed. This is done by multiplying this column by the given value uo and
subtracting it from the right-hand side as sketched in Figure 6.5.
*-!, Uo
··.)- -:,._._) .·· ..·· ..·· .. ·· ..·· ..·· ..·· . .· .- -· Y-0· .· . .. ·· .· .. . ·· .fo/2· .. ·· ..··..· .·· 't:~olh
·-r:-i'~ 2 -1 u1 Ji -uo / h
1 . 1 2 -1 U2 /2 0
Ti .. =h
-1 2 -1 Un-1 fn-1
-1 1 Un fn/2 + b/h 0
Figure 6.5: Remove row 1. Multiply column 1 by uo and put it into the right-hand
side.
The result of this operation is in Figure 6.6. The inhomogeneous natural boundary
2 -1 Ut ft -1
-1 2 -1 u2 h 0
1 UQ
=h h
h
-1 2 -1 Un-1 fn-1
-1 1 Un fn/2+ b/h 0
1 1 d<p; d<pj dx
dx dx
= tJ
k=l
dcp; dcpj dx .
dx dx (6.2.29)
0 ek
So instead of computing the left-hand side for all i and j, one might first compute
all integrals d d
J 'Pj dx ,
(f) i
dx dx (6.2.30)
for all i and j and add these integrals afterwards to get (6.2.29) . This seems ave
complicated way to compute the integrals. However at most~ of the integrals~
(6.2.30) are different from zero (Why?). We store these four integrals in a small
matrix, the element matrix:
J d"akx- 1 ~
]
dpk -1 dpk - 1 dx dx
5ek _
J
ek
dx dx
ek
dx
(6.2.31)
- [ J ~d'Pk-1
ax dx dx J ax
~~ dx
dx
.
ek ek
(6.2.32)
Once all element matrices and vectors are computed, it is a matter of addition to
compute the large matrix Sand the large right-hand side F. The main advantage
of this approach is that all information of the minimization problem, the type of
approximation in the element as well as the numerical integration rule applied, is
stored locally.
To create the large matrix it is sufficient to know which unknowns are present in
the element and to which entries the entries of the element matrix must be added.
This is called the topology of the problem. The same holds for the large vector on
the right-hand side.
~ is .a_ ~ig adv~tage of the FEM. Once the region is subdivided into e_lemen:i~
it IS sufficient to give a generic algorithm for the contributions of an arbitrary
. E ·ally for
ement. . Ther~ IS no need to worry about neighboring elements. speci
more-dimensional unstructured grids, this is very attractive.
)( )( e.3 )(
Xo
Figure 6.7: Subdivision of [0, 1] into 4 elements, and corresponding numbering of
nodes and elements.
to 4. The unknowns have in this special case exactly the same numbering, where
we know that uo = 0, so that the real unknowns are numbered from 1 to 4. In first
instance the large matrix has size (5 x 5) and the large vector (5 x 1). The actual
essential boundary condition is eliminated afterwards. The problem topology of
this case is very simple; each element contains two unknowns.
e1: (0,1),
e2: (1,2),
(6.2.33)
e3: (2,3),
e4: (3,4) .
In the first step the large matrix and vector are cleared:
1 2 3 4 5
-i -i -i -i -i
0 0 0 0 0 t- 1 0
0 0 0 0 0 t- 2 0 (6.2.34)
50 = 0 0 0 0 0 t- 3 fl = 0
0 0 0 0 0 t- 4 0
0 0 0 0 0 t- 5 0
5ek = 1
Xk - Xk - l
[ 1 -1
-l l
l. (6.2.35)
1 -1 0 0 0 f (xo)
-1 1 0 0 0 h f(x1)
51 = ! 0 0 0 0 0 f =
1
z 0 (6.2.37)
h O O 000 0
0 0 0 0 0 O
1 -1 0 0 0 f(xo)
-1 2 -1 0 0 2f(x1)
h (6.2.38)
O -1 1 0 0 ¥=-2 J(x2)
O O O O 0 0
O O O O 0 0
Numerical methods in scientifi'
econ..
112 ·•IJ)ii~
g
d ·ves·
. g this process for e3 an e4 gI .
Repea tin
1 -1 0 0 0
-1 2 -1 0 0
1 0 -1 2 -1 0 f =f
4
= -2h
S == 54 == h O O -l 2 -1 . (6,2.39)
0 0 0 -1 1
xpression as (6.2.12) and (6.2.24).
This is of co_ur~e ~e sa~e e == 0 as described in Figure 6.6 the matnx S
' , and th
_ j,
After the ehrrunatton o uo
This construction seems very long-winded, especially for such a simple one di
mensional problem. However, it is very well s_u~t~d f~r computer implementation~
All one needs is a topology formed by a subd1v1s10n m elements, as well as a
cedure to compute an element matrix and element vector for an arbitrary elernpro-
. 1· d h
The rest is a matter of book keeping. H?~ comp icate t e mesh may be, the as-
ent.
sembly process is always the same. All finite element codes work according to this
principle.
The integral in the first of these terms is already present in the element matrix of
element e1:
sei =[ £~ ~ dx £Wi dx ]
(6.2.42)
f i-~dx JWWdx ·
~y::::s~~:s::;::
fir~t term in (6_2~~1).
e1 e1
Exercise 6.2.11 Show that the element matrix and element vector for the boundary con-
dition du I
- -b
dx (x=1) -
aregiven by:
(6.2.43)
The elimination of the essential boundary conditions can be described in the fol-
lowing formulae.
Suppose we renumber the unknowns such that we have first all non-prescribed un-
}<nowns (u;) (also called degrees of freedom) and subsequently all unknowns given
by the essential boundary conditions (ub).
The system of equations can be written as:
[~:; t~ l[:; l l = [ ::
(6.2.44)
(6.2.45)
and this is the actual system to be solved.
The last set of equations in (6.2.44) contains also some useful information. Suppose
that ub is not given, but that the flux (natural boundary condition) is prescribed.
In that case the last equation would be:
1 2
rninJ[u] =
uEE
j{ !2 (du)
dx
- f(x)u(x)} dx, (6.2.49)
0
r.: {u I usufficientlysmooth; u(O) = u(l)}.
Exercise 6.2.12 Prove Theorem 6.2.3. □
Numerical methods in scientifi
114 C COJl1pllfin
g
. . da® = ~x is a natural boundary conditin.-.
t the boundary condition x
Note tha v 11 for
...... ;nimization problem. t
this u=• Ri ethod we se
In order to apply the tz m
n
u" (x) = L a;cp;(x)'
j=O (6.2.SQ)
U = g1 ( X) , XE f 1
au
an = g2 (X) , XE f 2 (6.3.2)
au
a:u + an = g3(x), x E f3 (a: ~ 0) .
minf[u] (6.3.3)
uE!:
with
have u" (x) r.. The set of Ritz equations to approximate the
;;::Znweproblem E
(6.3.3) by (6.3.6) is given by:
..
InJ.ni.
(6.3.8) defines the basis functions implicitly. In order to compute the integral
in (6.3.7), it is necessary to have an explicit expression per element. Consider the
triangle in Figure 6.10).
A linear polynomia 1is defined by
q>;(x) =IX;+ ~;X + 1 ;y. (6.3.9)
(6.3 .8) defines 3 equations for each i to compute the parameters ixi , ~i, 1 ;. Substitu-
tion of (6.3.8) in (6.3.9) leads to the following system of linear equations:
~
[ 1 :X3~ ~~ ] [ ;,1: ;:,2
Y3
;~ ] = [
13
~0 ~0 ~1 ] . (6.3.10)
118 . of I6.3.10) .
is the solutwn ""8
3 131
. e 3.5 S/1olV t/1nt _( 6· or a, ~1 and , 1 and subtract the first e
.f i .0
fxerc1s 6 ·
. . r r,, ,latc t1,c eqaat1ons 'f-' h k
t this process Jor the ot er un nowns. quat, n fro., lh
11
H111 1• r /lird one. Repea '
0
second and I . ts to evaluate the integrals in formula (6 3 (J
NoW we t,ave all . ingre 6 2d5ienwe only need to compu t e the element mat· ·.7) . As w
. s,cuon . . ' rix •nd e
hav• seen ,11 ele-
n1ent vector. Jl sider the case that a, gz and g3 are all equal to z
,e sha con .h L t h 11 ero s
first o a " . te rals ill (6.3.7) varus . a er on we s a pay attention;0 o that
f U
.1 ll boundary 111 g . . _,10rnogeneous boundary problems. these
~ ~~: ~~~
boun ary iJ1tegra 1.s U1f uuthe linear triangle correspon d'mg to (6.3.7) is gi
d
T1'• e\enient n,atnx or S'• [ ~: ] ' ven by
6 14
S31 S32 S33 ( .3· l
S;j ===
,~1
T(~i~ j + ,i'Yj) .
(6.3.15)
The element vector for the Jinear triangle corresponding to (6.3. 7) is given by:
(6.3.16)
(6.3.17)
with
f; === j J(x)(f);(x) dO.
ek
□
Exercise 6.3.7 Verify (6.3.16) and (6.3.1?).
~~
egration
impson's
exact Y· Besides that lo th 1e, Yintegrating polynomials of a certalll degt ee
b . .
Gaussianl integratio~ ru'i tnangles and tetrahedrons it is possible to conSlfllcl
ous text books. (See for es. eights and integration points can be found in ntUJler·
example [501).
Definition 6•3·1 A Slmplex
. in JR" 15· the convex hull of n + 1 points in R".
A simplex in R1 . . 0
zs an interval' in ]R.2 a triangle
. and in JR3 a tetrahedron.
~
. fhe numerical solution of minimization problems 119
6
11
ext theorems gives a general formula for integration of powers of linear basis
fhe . ns over simplices. It is very useful.
ft,1J1C 0 0
2
theorem 6.3.1 Let S be a triangle in R and let I),, be the determinant defined by
1 X1 Y1
I),,= 1 X2 Y2 , (6.3.18)
1 X3 Y3
!s A; = ~
6'
(6.3.20)
D
This theorem can be extended to n dimensions:
1
1
X1,1
X1,2
X2,1
X2,2
/j,
Xn,1
Xn,2
Xn+l,n
I
be the determinant defined by
,
(6.3.21)
1 Xn+l,1 Xn+l,2
with x1, x2, · · · , Xn + l the vertices of S, and Xi,j the /h component of x;.
Let A; (x) be the linear basis functions over S defined by
Js ,\ m1 ,\ m2 ... ,\mn+l
1 2 n+l
dO = m1 !m2! ... mn+l ! \[j,I '
([:m;+n)!
i
Exercise 6.3.14 Show that if the Newton-Cotes rule is applied to (6.3.16), (6.3.1i), tlrt•
element vector is given by
f'• = I~\ [ j(::\ I. (6,126)
l 1(x 1 3
)
0
JtXq>;q>; df I
(6.3.27)
f3
(6.3,28)
Jg2cp; df,
f2
(6.3,29)
Jg3cp; df.
f3
►
e umerical solution of minimizatio n ~bl
6. Th 11 e~
121
;.,ce we use linear triangles we actually ap .·
5J,J• • 7 proxtmate th b
lines. In Section 8. we shall return to the conse e .oundary by straight
quences of this approximation.
for the moment we assume that the bounda . .
undary lines of the subdivision. Of course 1-t~ is ex~ctly given by the straight
bo is possible t O dd th
the integrals (6.3.27)-(6.3.29) to all element m tri a e contribution
of . a ces and v t h
to boundary triangles that have a side in comm "th ec ors t at correspond
. thi . on wi r 2 or r F
·onal point of view sis not so desirable be hi 3· rom a computa-
ti cause t s mean th .
have the same type of element matrix and ele t s at not ~ll triangles
cussion in JR 1 it is natural to introduce extra linme; vecto~. So following our dis-
the integrals in (6.3.27)-(6.3.29) These lin ele ements JUS t for the computation
of . . . . · e e ements (also c U d b d
rnents) are implicitly defined by the boundary a d th b .. ~ e . o1:11' ary ele-
for example Figure 6.12. n e SU division m triangles, see
Only two base functions differ from zero on this element (why?), so the element
matrix must have size (2 x 2) and the element vector (2 x 1). The element matrix
for the boundary elements along r3 is given by
with
Sij = JIX(f)i<f}j df . (6.3.30)
ek
f'• =[ j~ 1, f; = Ig3tp; df
e
D
Exercise 6.3.15 Give the line element matrices and vectors along f 2·