Conjugate gradient for nonsymmetric problem

Click For Summary
SUMMARY

The discussion focuses on adapting the conjugate gradient method for nonsymmetric boundary value problems, specifically in the context of a 2D square grid. The user seeks to solve a system represented by a nonsymmetric matrix A, derived from a specific iterative formula for interior grid points. While the standard conjugate gradient method is applicable only to symmetric matrices, alternatives such as the biconjugate gradient algorithm and its stabilized version, BiCGSTAB, are recommended. Additionally, transforming the problem to solve A^T A y = A^T b is suggested, although it may impact numerical precision due to condition number considerations.

PREREQUISITES
  • Understanding of the conjugate gradient method and its limitations with nonsymmetric matrices.
  • Familiarity with boundary value problems in numerical analysis.
  • Knowledge of iterative methods such as successive over-relaxation (SOR).
  • Basic concepts of matrix operations, particularly involving transposes and condition numbers.
NEXT STEPS
  • Research the biconjugate gradient algorithm and its applications for nonsymmetric systems.
  • Explore the BiCGSTAB algorithm for stabilizing the biconjugate gradient method.
  • Learn about transforming systems to solve A^T A y = A^T b and its implications on numerical precision.
  • Investigate code implementations of the conjugate gradient method in C or C# for practical applications.
USEFUL FOR

Mathematicians, numerical analysts, and software developers working on solving nonsymmetric boundary value problems or optimizing numerical methods for efficiency.

ihggin
Messages
14
Reaction score
0
Hi, I was wondering if it is possible to adapt the conjugate gradient method (or if there's a variation of the method) for nonsymmetrical boundary value problems.

For example, I want to solve something like a 2D square grid, where f(x)=0 for all x on the boundary of the square, f(x_{i0,j0})=1 and f(x_{i1, j1}) for specified interior points, and

f(x_{i,j})=.1f(x_{i-1,j})+.2f(x_{i+1,j})+.3f(x_{i,j-1})+.4f(x_{i,j+1})

for all other interior grid points x_{i,j}. If I change f_{i,j} to a 1D vector y_{k}, and then write the system of eqs out, the matrix A in the system I want to solve (Ay=b) is not symmetric.

From what I've read, the conjugate gradient method only works for symmetric A, so I was wondering if there is some way to adapt the method, or a different way of setting up the system. If not, what would be the fastest way to solve this problem? (The only reason I'm interested in conjugate gradient is b/c I heard it's fast.) I'm currently using successive over-relaxation (SOR). Is there anything faster?
 
Technology news on Phys.org
ihggin said:
From what I've read, the conjugate gradient method only works for symmetric A, so I was wondering if there is some way to adapt the method, or a different way of setting up the system.

Google for "biconjugate gradient algorithm".

There are some traps here, because biconjugate gradient can be unstable. A practical stabilized version is the BiCGSTAB algorithm (also in Google!)
 
Another way the conjugate gradient method could be used is to solve
A^T A y = A^T b​
 
Hurkyl said:
Another way the conjugate gradient method could be used is to solve
A^T A y = A^T b​

True, provided it doesn't matter that the condition number of A^T A is the square of the condition number of A, which may decrease the numerical precision.

The biconjugate gradient method also involves multiplyng vectors by A^T, but it doesn't degrade the condition number.
 
Anybody has Conjugate Gradient code snippet in C or C#?
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
1K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 16 ·
Replies
16
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 36 ·
2
Replies
36
Views
8K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K