3.2.3.2. BandSPD System
This command is used to construct a BandSPD linear system of equation object. As the name implies, this class is used for symmetric positive definite matrix systems which have a banded profile. The matrix is stored as shown below in a 1 dimensional array of size equal to the (bandwidth/2) times the number of unknowns. When a solution is required, the Lapack routines DPBSV and DPBTRS are used. The following command is used to construct such a system:
- system BandSPD
An n×n matrix is a symmetric positive definite banded matrix if:
\(A_{i,j}=0 \quad\mbox{if}\quad j<i-k \quad\mbox{ or }\quad j>i+k; \quad k \ge 0.\)
\(A_{i,j} = A_{j,i}\)
\(y^T A y != 0\) for all non-zero vectors y with real entries (\(y \in \mathbb{R}^n\)),
The bandwidth of the matrix is k + k + 1.
For example, a symmetric 6-by-6 matrix with a right bandwidth of 2:
is stored as follows:
Example
The following example shows how to construct a BandSPD system
Tcl Code
system BandSPD
Python Code
system('BandSPD')
Code developed by: fmk