Purpose
This routine solves the following linear system of equations for
e
:
\[
A * e = r
\]
where the symmetric block tridiagonal matrix A
is defined by
\[
A =
\left( \begin{array}{ccccc}
b_1 & c_2^\R{T} & 0 & \cdots & 0 \\
c_2 & b_2 & c_3^\R{T} & & \vdots \\
\vdots & & \ddots & & \\
0 & \cdots & & b_N & c_N
\end{array} \right)
\]
The routines ckbs_tridiag_solve
and ckbs_tridiag_solve_b
solve the same problem, but only for one RHS. It is basically a wrapper
for Matlab's pcg routine.
b
The argument
b
is a three dimensional array,
for k = 1 , \ldots , N \[
b_k = b(:,:,k)
\]
and
b
has size n \times n \times N
.
c
The argument
c
is a three dimensional array,
for k = 2 , \ldots , N \[
c_k = c(:,:,k)
\]
and
c
has size n \times n \times N
.
iter
The result
iter
is a scalar equal to the
number of iterations that the cg method took to finish.
Example
The file tridiag_solve_pcg_ok.m
contains an example and test of
ckbs_tridiag_solve_cg.
It returns true if ckbs_tridiag_solve_pcg passes the test
and false otherwise.
Input File: src/ckbs_tridiag_solve_pcg.m