solve_spd_banded Function
- Seyed Ali Ghasemi
- BSD 3-Clause
- 75 statements
public pure function solve_spd_banded(A_band, B) result(X)
Solve a symmetric positive-definite band system by banded Cholesky factorization.
A_band(0,j) is , and A_band(i-j,j) stores the lower entry
for 0<=i-j<=kd; entries outside that symmetric band are
assumed zero. Factorization costs , and triangular solves
cost . Internal factor and solution storage is
, avoiding a dense matrix.
Before factorization, the valid stored entries and right-hand sides are
scaled by the exact radix power
, where is the model exponent of
the largest stored magnitude. The resulting factorization
has the same solution because it solves
. A normalized Cholesky pivot not greater than
, or a nonfinite pivot, returns
X(0,0). Consequently, positive uniform rescaling cannot change the
numerical-definiteness decision. The routine does not estimate a
condition number. Right-hand-side entries must be finite.
Reference implementation: LAPACK DPBTRF factors symmetric
positive-definite band matrices and reports a failed positive-definite
leading principal minor:
Netlib LAPACK.
Arguments
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=rk), | intent(in), | contiguous | :: | A_band(0:,:) |
Lower symmetric band storage, lower bound zero in dimension 1. |
|
| real(kind=rk), | intent(in), | contiguous | :: | B(:,:) |
Right-hand sides, shape |