求解线性系统用于未知向量来自方阵. (规范)
使用 LU 分解求解线性系统的子程序接口。
此接口提供使用子程序计算线性矩阵系统解的方法。支持的数据类型包括real
和complex
。对矩阵结构不做任何假设。用户提供解向量x
的预分配空间,并可能为枢轴索引数组pivot
提供空间。如果提供了所有预分配的工作空间,则使用此接口时不会发生内部内存分配。
该函数可以同时求解一个(来自一维右侧向量b(:)
)或多个(来自二维右侧向量b(:,:)
)系统。
注意
该解决方案基于 LAPACK 的通用 LU 分解求解器*GESV
。
类型 | 意图 | 可选 | 属性 | 名称 | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
输入矩阵 a[n,n] |
|
complex(kind=sp), | intent(in) | :: | b(:,:) |
右侧向量或数组,b[n] 或 b[n,nrhs] |
||
complex(kind=sp), | intent(inout), | contiguous, target | :: | x(:,:) |
结果数组/矩阵 x[n] 或 x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[可选] 对角线枢轴索引的存储数组 |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[可选] 可以覆盖和销毁 A 数据吗? |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[可选] 状态返回值。如果未请求,则在出错时代码将停止 |
类型 | 意图 | 可选 | 属性 | 名称 | ||
---|---|---|---|---|---|---|
complex(kind=sp), | intent(inout), | target | :: | a(:,:) |
输入矩阵 a[n,n] |
|
complex(kind=sp), | intent(in) | :: | b(:) |
右侧向量或数组,b[n] 或 b[n,nrhs] |
||
complex(kind=sp), | intent(inout), | contiguous, target | :: | x(:) |
结果数组/矩阵 x[n] 或 x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[可选] 对角线枢轴索引的存储数组 |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[可选] 可以覆盖和销毁 A 数据吗? |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[可选] 状态返回值。如果未请求,则在出错时代码将停止 |
类型 | 意图 | 可选 | 属性 | 名称 | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout), | target | :: | a(:,:) |
输入矩阵 a[n,n] |
|
real(kind=dp), | intent(in) | :: | b(:,:) |
右侧向量或数组,b[n] 或 b[n,nrhs] |
||
real(kind=dp), | intent(inout), | contiguous, target | :: | x(:,:) |
结果数组/矩阵 x[n] 或 x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[可选] 对角线枢轴索引的存储数组 |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[可选] 可以覆盖和销毁 A 数据吗? |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[可选] 状态返回值。如果未请求,则在出错时代码将停止 |
类型 | 意图 | 可选 | 属性 | 名称 | ||
---|---|---|---|---|---|---|
real(kind=dp), | intent(inout), | target | :: | a(:,:) |
输入矩阵 a[n,n] |
|
real(kind=dp), | intent(in) | :: | b(:) |
右侧向量或数组,b[n] 或 b[n,nrhs] |
||
real(kind=dp), | intent(inout), | contiguous, target | :: | x(:) |
结果数组/矩阵 x[n] 或 x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[可选] 对角线枢轴索引的存储数组 |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[可选] 可以覆盖和销毁 A 数据吗? |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[可选] 状态返回值。如果未请求,则在出错时代码将停止 |
类型 | 意图 | 可选 | 属性 | 名称 | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout), | target | :: | a(:,:) |
输入矩阵 a[n,n] |
|
real(kind=sp), | intent(in) | :: | b(:,:) |
右侧向量或数组,b[n] 或 b[n,nrhs] |
||
real(kind=sp), | intent(inout), | contiguous, target | :: | x(:,:) |
结果数组/矩阵 x[n] 或 x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[可选] 对角线枢轴索引的存储数组 |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[可选] 可以覆盖和销毁 A 数据吗? |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[可选] 状态返回值。如果未请求,则在出错时代码将停止 |
类型 | 意图 | 可选 | 属性 | 名称 | ||
---|---|---|---|---|---|---|
real(kind=sp), | intent(inout), | target | :: | a(:,:) |
输入矩阵 a[n,n] |
|
real(kind=sp), | intent(in) | :: | b(:) |
右侧向量或数组,b[n] 或 b[n,nrhs] |
||
real(kind=sp), | intent(inout), | contiguous, target | :: | x(:) |
结果数组/矩阵 x[n] 或 x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[可选] 对角线枢轴索引的存储数组 |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[可选] 可以覆盖和销毁 A 数据吗? |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[可选] 状态返回值。如果未请求,则在出错时代码将停止 |
类型 | 意图 | 可选 | 属性 | 名称 | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
输入矩阵 a[n,n] |
|
complex(kind=dp), | intent(in) | :: | b(:,:) |
右侧向量或数组,b[n] 或 b[n,nrhs] |
||
complex(kind=dp), | intent(inout), | contiguous, target | :: | x(:,:) |
结果数组/矩阵 x[n] 或 x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[可选] 对角线枢轴索引的存储数组 |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[可选] 可以覆盖和销毁 A 数据吗? |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[可选] 状态返回值。如果未请求,则在出错时代码将停止 |
类型 | 意图 | 可选 | 属性 | 名称 | ||
---|---|---|---|---|---|---|
complex(kind=dp), | intent(inout), | target | :: | a(:,:) |
输入矩阵 a[n,n] |
|
complex(kind=dp), | intent(in) | :: | b(:) |
右侧向量或数组,b[n] 或 b[n,nrhs] |
||
complex(kind=dp), | intent(inout), | contiguous, target | :: | x(:) |
结果数组/矩阵 x[n] 或 x[n,nrhs] |
|
integer(kind=ilp), | intent(inout), | optional, | target | :: | pivot(:) |
[可选] 对角线枢轴索引的存储数组 |
logical(kind=lk), | intent(in), | optional | :: | overwrite_a |
[可选] 可以覆盖和销毁 A 数据吗? |
|
type(linalg_state_type), | intent(out), | optional | :: | err |
[可选] 状态返回值。如果未请求,则在出错时代码将停止 |