This interface overloads the solve
interface from stdlib_linalg
for solving a linear system where is a
Tridiagonal
matrix. It also enables to solve a linear system with
multiple right-hand sides.
x = solve(A, b [, refine])
A
: Matrix of Tridiagonal
type.
It is an intent(in)
argument.
b
: Rank-1 or rank-2 array defining the right-hand side(s).
It is an intent(in)
argument.
refine
(optional) : Logical switch to enable solution refinement.
It is an intent(in)
argument.
x
: Solution of the linear system.
It has the same type and shape as b
.
Solve the linear system where is of type
Tridiagonal
and B
a standard rank-2 array. The solution
matrix X
has the same dimensions and kind as B
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Tridiagonal), | intent(in) | :: | A |
Coefficient matrix. |
||
real(kind=dp), | intent(in) | :: | b(:,:) |
Right-hand side vectors. |
||
logical(kind=lk), | intent(in), | optional | :: | refine |
Whether iterative refined is used or not. |
Solution vectors.
Solve the linear system where is of type
Tridiagonal
and b
a standard rank-1 array. The solution
vector x
has the same dimension and kind as b
.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(Tridiagonal), | intent(in) | :: | A |
Coefficient matrix. |
||
real(kind=dp), | intent(in), | target | :: | b(:) |
Right-hand side vector. |
|
logical(kind=lk), | intent(in), | optional | :: | refine |
Whether iterative refinement is used or not. |
Solution vector.