582
Appendix
C.
Solutions
to
odd-numbered
exercises
where
G is any
function
satisfying
the
condition
G(x)
=
p(x)
for x €
dQ,
and
Substituting
u — G +
w,
where
w
G
V,
into
the
weak
form
yields
In
the
Galerkin method,
we
replace
V by a finite-dimensional
subspace
V
n
and
solve
When using piecewise linear
finite
elements,
we can
satisfy
the
boundary con-
ditions approximately
by
taking
G to be a
continuous piecewise linear
function
whose
values
at the
boundary nodes agree with
the
given boundary
function
g. For
simplicity,
we
take
G to be
zero
at the
interior nodes.
The
resulting
load vector
is
then given
by
Since
G is
zero
on
interior nodes,
the
quantity
a(G,
&)
is
nonzero only
if
(free)
node
i
belongs
to a
triangle adjacent
to the
boundary.
(b)
The
regular triangulation
of the
unit square having
18
triangles
has
only
four
interior
(free)
nodes,
and
each
one
belongs
to
triangles adjacent
to the
bound-
ary.
This
means
that
every entry
in the
load vector
is
modified
(which
is not
the
typical
case).
Since
/ = 0, the
load vector
f is
defined
by
The
load vector
is
while
the
solution
to Ku = f is
7.
(a)
Consider
the BVP
Multiplying
the PDE by a
test
function
v € V =
C
2
(O)
and
applying Green's
first
identity yields
582
Appendix
C.
Solutions
to
odd-numbered exercises
where G is any function satisfying
the
condition G(x) = g(x) for x E
an,
and
G + V = {G + v : v E
V}
.
Substituting
u = G + w, where w E V,
into
the
weak form yields
wE
V,
a(w,v)
=
(f,
v) - a(G,v) for all v E
V.
In
the
Galerkin
method,
we replace V by a finite-dimensional subspace
Vn
and
solve
wE
V
n
,
a(w,v)
=
(f,v)
-a(G,v)
for all v E V
n
.
When
using piecewise linear finite elements, we
can
satisfy
the
boundary
con-
ditions approximately
by
taking
G
to
be
a continuous piecewise linear function
whose values
at
the
boundary
nodes agree
with
the
given
boundary
function
g. For simplicity, we
take
G
to
be
zero
at
the
interior nodes.
The
resulting
load vector is
then
given by
Ii
=
(f,
CPi)
- a(G,
cp;),
i =
1,2,3,
...
, n.
Since G is zero on interior nodes,
the
quantity
a(G,
CPi)
is nonzero only if (free)
node
i belongs
to
a triangle adjacent
to
the
boundary.
(b)
The
regular triangulation
of
the
unit
square having 18 triangles has only four
interior (free) nodes,
and
each one belongs
to
triangles adjacent
to
the
bound-
ary. This means
that
every
entry
in
the
load vector is modified (which is not
the
typical case). Since I =
0,
the
load vector f is defined
by
f; = -a(G,CPi), i =
1,2,3,4.
The
load vector is
[
0.22222222222222]
f
==
1.55555555555556
0.22222222222222 '
1.55555555555556
while
the
solution
to
Ku
= f is
[
0.27777777777778]
...:...
0.61111111111111
u - 0.27777777777778 .
0.61111111111111
7.
(a) Consider
the
BVP
-V·
(k(x)Vu)
=
I(x),
in
0"
au
an
(x) =
h(x),
x
Eon.
(C.5)
Multiplying
the
PDE
by
a
test
function v E V = C
2
(TI)
and
applying Green's
first identity yields
1
kVu
.
Vv
= r
Iv
+ r
kvh
for all v E
V.
n
in
ion