Content deleted Content added
Added link |
→The Algorithm: Converted to superscript notation |
||
Line 20:
The algorithm is as follows:<ref>{{cite book|author1=R. Barrett|author2=M. Berry|author3=T. F. Chan|author4=J. Demmel|author5=J. Donato|author6=J. Dongarra|author7=V. Eijkhout|author8=R. Pozo|author9=C. Romine|author10=H. Van der Vorst|title=Templates for the Solution of Linear Systems: Building Blocks for Iterative Methods, 2nd Edition|publisher=SIAM|year=1994|url=https://netlib.org/linalg/html_templates/Templates.html}}</ref>
# Choose an initial guess <math>{\bold x}
# Compute the residual <math>{\bold r}
# Choose <math>\tilde {\bold r}
# For <math>i = 1, 2, 3, \dots</math> do:
## <math>\
## If <math>\
## If <math>i=1</math>:
### <math>{\bold p}
## Else:
### <math>\
### <math>{\bold u}
### <math>{\bold p}
## Solve <math>M\hat {\bold p}={\bold p}
## <math>\hat {\bold v} = A\hat {\bold p}</math>
## <math>\
## <math>{\bold q}
## Solve <math>M\hat {\bold u} = {\bold u}
## <math>{\bold x}
## <math>\hat {\bold q} = A\hat {\bold u}</math>
## <math>{\bold r}
## Check for convergence: if there is convergence, end the loop and return the result
|