Problems with biCGSTAB
I wrote a biconjugate gradient method in C for my FEM solver, but it does not work. (I can tell because when I use a different method, the results are correct). Can you see if there is an obvious problem with the code below?
multiplyR(matrix, vector) is a function that multiplies a matrix on the left with a vector on the right.
addVectors(vector A, vector B, int n, double k) returns A+kB. (The n is length of each vector).
As you can see, I'm not using a pre-conditioner.
Any help would be much appreciated!!
I have recently tried using a gauss-siedel preconditioner. The results did not improve at all, but they did change. Does that mean that I should try more sophisticated preconditioners, that there something wrong with the algorithm above, or that I should move on to gmres or some other method?
(I think I'm just going to try gaussian elimination until I feel like tackling this problem again. I've spent far too long on it!!!)
|All times are GMT -4. The time now is 13:20.|