Fortran Can You Implement Gauss-Seidel Iteration in Fortran 90/95?

  • Thread starter Thread starter Luke1986
  • Start date Start date
  • Tags Tags
    Fortran
AI Thread Summary
The discussion centers on programming simultaneous linear equations using Fortran 90/95, specifically through the Gauss-Seidel iteration method. The user has successfully solved 3x3 and 4x4 matrices using inverse matrices and is now seeking guidance on implementing the Gauss-Seidel method. They are particularly interested in establishing a tolerance level of 0.000001 for convergence between iterations. The response highlights that a common stopping criterion for this method is based on the residuals, expressed as |rk|/|r0|≤ε, where ε represents the desired precision and |rk| and |r0| are the norms of the residuals at each iteration. This approach provides a clear framework for assessing convergence in the iterative process.
Luke1986
Messages
2
Reaction score
0
Hi, I have to program using Fortran 90/95 simultaneous linear equations. My question is, is it possible to program this? First I did the inverse matrix to find the values of the solution of a 4X4 and 3X3 matrix. I set up [A][X] = [X]' and did the inverse matrix to find the values for [X]. So I got the solutions for x1 x2 x3 x4, ( numbers are subscripts ).

Now that I know that solutions exist, can I program this with the Gauss Seidel iteration method using F 90/95? May you please explain how to set up a tolerance (say 0.000001) between two iterations because I don't understand how to since I have so many variables, or what I'm looking for? I am not asking for the specific code, just a few words to clear up how to approach this program. Thanks for your help.
 
Technology news on Phys.org
About the code, sure you can.
About the tolerance, the most common stopping criteria is |rk|/|r0|≤ε where ε is the desired precision of the approximation and |rk|,|r0| the norms of the residual r=b-Ax on each iteration.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Replies
22
Views
5K
Replies
18
Views
17K
Replies
1
Views
3K
Replies
1
Views
2K
Replies
2
Views
3K
Replies
1
Views
3K
Replies
1
Views
8K
Back
Top