









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










Different from finite-difference solutions to IVPs, localtruncation errors in general do not accumulate
Dirichlet BC
Newmann BC
Special case: Laplace equation
Boundary-value problems yields systems of linearalgebraic equations (similarly for implicit methods fortime-dependent PDEs as we will discuss later)
Linear systems are in general
sparse
, with relatively few
nonzeros in matrix
For
n
x
n
matrix, direct solvers such as Gaussian
elimination and Cholesky factorization require requires O
n
2
) storage and
n
3
) computation [Covered in detail
in numerical linear algebra]
Sparsity must be exploited to use much less storage andcomputation
Sparse
direct
solvers which are more sophisticated and more
accurate
Sparse
iterative
solvers are simpler and often suffice for solving
differential equations (and therefore are our focus)
Split sparse matrix and then successively approximatesolution
For Laplace’s equation, each point is set to average ofits neighbors
Jacobi method: update each point using old values ofneighbor points
Gauss-Seidel method: modify Jacobi method to use newvalues as soon as available
Warning: these methods are very simple but may notconverge (or converge very slowly)
1,
1,
,^
1
,^
1
,
2
2
,^
1,^
1,
,^
1
,^
1
1
(^
4
)^
(^
,^
)
1
(
)^
(^
,^
)
4
4
i^
j^
i^
j^
i j
i j
i j
i^
j
i j
i^
j^
i^
j^
i j
i j
i^
j
u
u
u
u
u
f^
x
y
h
h
u
u
u
u
u
f^
x
y
+^
−^
+^
−
+^
−^
+^
−
−
=
⇒
=
−
for iter=0:maxiter
for j=2:(m+1)
for i=2:(m+1)
u(i,j) = 0.25*(u(i-1,j) + u(i+1,j) + u(i,j-1) + u(i,j+1) -
h^2 * f(i,j));
end end
end
,^
1,
1,
,^
1
,^
1
2
(^
(^
)^
(^
(^
)^
(^
1
(
)
(
,^
)
4
4
i j
i^
j^
i^
j^
i j
i j
k^
k^
k^
k^
k
i^
j
h
u
u
u
u
u
f^
x
y
+^
−^
+^
−
=
−
Jacobi and Gauss-Seidel are examples of matrix-splittingmethods: Matrix
is split into
Then equation
Au
f
can be written as
and further,
Matrix
is
iteration matrix
Method converges if absolute values of eigenvalues of
are <1, i.e., its spectral radius
ρ
In particular,
=
−
A
M
N
(^
(^
)
(^
1
(^
)^
1
,
(
)
k
k
k
k
−
−
=
=
Mu
Nu
f
u
M
N u
M
f
(^
)^
(0)
2
2
k^
k
e
e
ρ ≤
Successive over-relaxation (SOR)where
ω
1 is some scalar
If
ω
<1, then it is called under-relaxation
In matrix form
With a optimal choice of
ω
, spectral radius of
is
minimized to about 1-
π
h
, making it much more efficient
than Jacobi or G-S
However, determining optimal
ω
requires solving for
eigenvalues, which is too costly
,^
1,^
1,
,^
1
,^
1
,^
,^
,^
,
2
(^
)^
(^
(^
)^
(^
(^
(^
)^
(^
)
1
(
)
(
,^
)
4
4
(
)
i j
i^
j^
i^
j^
i j
i j
i j
i j
i j
i j
GS
k^
k^
k^
k
i^
j
k^
k^
GS
k
h
u
u
u
u
u
f^
x
y
u
u
u
u
ω +^
−^
+^
−
+^
=
−
=
−
1
(
)
,
ω
ω
− ω
=
−
=
−
M
D
L
N
D
U
Color nodes interleavingly into red and black
Update red nodes using black nodes in one iteration,and then update red nodes using black nodes next
If
is
n
x
n
symmetric positive definite matrix, then
quadratic functionattains minimum precisely when
Ax
b
Optimization methods have formwhere
α
is search parameter chosen to minimize
objective function
φ
x
k
α
s
k
) along
s
k
For quadratic problem, negative gradient is residualvector
Line search parameter can be determined analytically
1 2
( )
T
T
φ
=
−
x
x Ax
x b
1 k
k
k
α
=
x
x
s
( )= -
=
φ
∇
x
b Ax r
/
k
T
T
k
k
k
α
=
r s
s As
Conjugate Gradient Method Cont’d
More Advanced Topics forIterative Linear Solvers
Apply CG algorithm to
, where
is chosen so
that
is better conditioned and systems of form
Mz
y
are easily solved
Example of preconditioner including Jacobi, SSOR,incomplete factorization, etc