I need to solve a linear equation Ax=b for 7000 times (A is sparse and complex square matrix), and at each time only 4 elements (A(i,k), A(i,m), A(j,k) and A(j,m)) are changed while all other elements are the same (at each time the indices i,j,k,m are different). I used block to obtain the updated inverse of matrix A. The total CPU time is more than 20 minutes. I am wondering if there is a faster way to solve this equation and control the CPU time within 1 minute.

Thanks a lot in advance.

Benson from Texas

  • 1
    $\begingroup$ cs.stackexchange is the wrong place. Apart from that, we can't tell you if 20 minutes is good or bad unless you tell us the matrix size. $\endgroup$ – gnasher729 Apr 19 at 11:45
  • 2
    $\begingroup$ What is "block"? Are you doing low-rank updates of a factorization of A? $\endgroup$ – harold Apr 19 at 11:51
  • 3
    $\begingroup$ While this question is on-topic here, it is not likely to get good answers in its present form. How sparse is the matrix, and what resolution algorithm are you using? Furthermore, if you're writing your own code from scratch, Computational Science is likely to give you better answers for numerical algorithms. If you're already using a specific library, then you should ask on Stack Overflow, showing your current code. $\endgroup$ – Gilles Apr 19 at 11:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.