Conjugate gradient for nonsymmetric problem

Click For Summary

Discussion Overview

The discussion revolves around the adaptation of the conjugate gradient method for nonsymmetric boundary value problems, specifically in the context of solving a 2D grid system with specified boundary conditions and interior point values. Participants explore potential variations of the method and alternative approaches for solving the problem efficiently.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant questions the applicability of the conjugate gradient method for nonsymmetric matrices and seeks alternatives or adaptations for their specific problem setup.
  • Another participant suggests looking into the biconjugate gradient algorithm as a potential solution, noting its instability and recommending the stabilized version, BiCGSTAB.
  • A different approach is proposed where the conjugate gradient method could be applied to the system represented as A^T A y = A^T b, although concerns about the condition number are raised.
  • It is noted that while using A^T A may affect numerical precision due to the condition number, the biconjugate gradient method does not have this degradation issue.
  • A request for code snippets in C or C# related to the conjugate gradient method is made, indicating interest in practical implementation.

Areas of Agreement / Disagreement

Participants express differing views on the applicability and stability of various methods related to the conjugate gradient approach for nonsymmetric problems. No consensus is reached on a definitive solution or method.

Contextual Notes

Concerns about the condition number and numerical precision are mentioned, highlighting potential limitations in the proposed methods without resolving these issues.

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
2K
  • · 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