简体   繁体   English

C ++中的有效大型稀疏块压缩线性方程

[英]Efficient large sparse block compressed linear equation in C++

everyone. 大家。 I have little experience about linear algebra equation solver. 我对线性代数方程求解器的经验很少。 But now, I need to solve the large sparse block compressed linear equation. 但是现在,我需要解决大型稀疏块压缩线性方程。 ie, Ax=b . Ax=b

Matrix A is composed of sub-blocks whose size is (nb,nb) . 矩阵A由大小为(nb,nb)的子块组成。 and size of A is (N,N) subblocks. A大小是(N,N)个子块。 Then the real size of matrix A is (nb*N,nb*N) . 那么矩阵A的实际大小为(nb*N,nb*N)

There are only few sub-blocks exists. 仅存在几个子块。 And A is diagonal dominant. A是对角线主导。

I have tried Eigen's built-in slovers. 我已经尝试过Eigen的内置固定器。 ie, SimplicialLLT and BiCGSTAB, the first is slow while the second cannot converge. 即SimplicialLLT和BiCGSTAB,第一个很慢,而第二个不能收敛。

Then I tried third-party solvers of Eigen with Intel MKL, ie, PardisoLLT 、PardisoLDLT and PardisoLU. 然后我使用Intel MKL尝试了Eigen的第三方求解器,即PardisoLLT,PardisoLDLT和PardisoLU。 They were slow too. 他们也很慢。

Finally, I tried third-party solvers of Eigen with SuiteSparse, ie, CHOLMOD and SPQR. 最后,我使用SuiteSparse(即CHOLMOD和SPQR)尝试了Eigen的第三方求解器。 The first is slow while the second gave the same value of input, it seems that it didn't work. 第一个很慢,而第二个给出了相同的输入值,似乎没有用。

I think maybe it is because that I used the solvers in wrong way that I didn't take advantage of feature "block compress" and thus triggered a lot of useless computing. 我认为可能是因为我错误地使用了求解器,所以我没有利用“块压缩”功能,从而引发了许多无用的计算。

Could anyone give me some advices? 有人可以给我一些建议吗?

As long as your matrix size doesn't exceed about 5000 rows/columns, using a sparse solver won't bring any reasonable benefits; 只要矩阵大小不超过约5000行/列,使用稀疏求解器将不会带来任何合理的好处。 for such matrices an ordinary dense solver would be good as well, because it doesn't contains "overheads" related to storing and operating sparse structures, such as linked lists or adjacency structures. 对于此类矩阵,普通的密集解算器也将是很好的,因为它不包含与存储和操作稀疏结构(例如链表或邻接结构)有关的“开销”。 On the other hand, if your matrix is very large (say, a million or so rows/columns), an iterative solver only would work. 另一方面,如果矩阵非常大(例如,大约一百万行/列),则迭代求解器仅适用。 I suggest that you visit the following webpage, which contains description of a problem and solution very similar to what you are working with (including solution of systems with sparse matrices having block structure, as well as image processing): http://members.ozemail.com.au/~comecau/CMA_LS_Sparse.htm 我建议您访问以下网页,其中包含与您正在使用的内容非常相似的问题和解决方案的描述(包括具有块结构的稀疏矩阵系统的解决方案以及图像处理): http:// members。 ozemail.com.au/~comecau/CMA_LS_Sparse.htm

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM