Iterative Solvers in MATLAB
조회 수: 13 (최근 30일)
이전 댓글 표시
Hello Experts,
I am trying to Solve Ax=B in MATLAB, where A is square matrix of size ~500,000 and B is the vector of same size. I have solved similar equations in COMSOL with iterative solvers like Conjugate Gradient and Algebraic Multigrid Preconditioners.
I have tried many iterative solvers like cgs, bicgs, bicgstab, minres without any preconditioners in MATLAB. But none of them would converge (1e-6). I did not try any preconditioners because I never understood the way to include them in my solver.
Does anyone know how could I implement CG with Algebraic Multigrid Preconditioner in MATLAB? Any other inputs are also welcomed :)
Sanket
댓글 수: 1
Pranav Gupta
2020년 5월 22일
Hello Sanket,
It has been a while, but I am curious about your success with the AMG preconditioner. I have sparse non-Hermitian (complex symmetric) matrices (100000x100000) with density ~0.5% and ILU preconditioners, etc. are not working. I was wondering if you have suggestions for me, because AMG needs a Hermitian matrix, which I don't have.
답변 (2개)
Laura Proctor
2011년 5월 31일
The five-point finite difference approximation to Laplace's equation on a square, two-dimensional domain provides an example. The following statements use the preconditioned conjugate gradient method preconditioner M = R'*R, where R is the incomplete Cholesky factor of A.
A = delsq(numgrid('S',50));
b = ones(size(A,1),1);
tol = 1.e-3;
maxit = 10;
R = cholinc(A,tol);
[x,flag,err,iter,res] = pcg(A,b,tol,maxit,R',R);
Only four iterations are required to achieve the prescribed accuracy.
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!