3.2.3.1. BandGeneral System
This command is used to construct a BandGeneral linear system of equation object. As the name implies, this class is used for matrix systems which have a banded profile. The matrix is stored as shown below in a 1dimensional array of size equal to the bandwidth times the number of unknowns. When a solution is required, the Lapack routines DGBSV and SGBTRS are used. The following command is used to construct such a system:
- system BandGeneral
An n×n matrix A=(ai,j) is a band matrix if all matrix elements are zero outside a diagonally bordered band whose range is determined by constants k1 and k2:
\(a_{i,j}=0 \quad\mbox{if}\quad j<i-k_1 \quad\mbox{ or }\quad j>i+k_2; \quad k_1, k_2 \ge 0.\ \) The quantities k1 and k2 are the left and right half-bandwidth, respectively. The bandwidth of the matrix is \(k1 + k2 + 1\) and only the entries in the band are stored; the rest being implicitly zero.
For example, 6-by-6 a matrix with bandwidth 3:
is stored as the 6-by-3 matrix
Example
The following example shows how to construct a ProfileSPD system
Tcl Code
system BandGeneral
Python Code
system('BandGeneral')
Code Developed by: fmk