next up previous contents
Next: Matrix G and vector Up: Broyden Solver Previous: Improved initial guess

``broyden''

 

The modified Broyden algorithm discussed in class is:

  1. Trial step --
    • Form trial step tex2html_wrap_inline505
  2. Prediction step --
    • Form matrix

      displaymath507

    • Form vector

      displaymath509

    • Solve

      displaymath511

    • Form final prediction

        equation125

Important note: This formulation of the algorithm uses Rho tex2html_wrap_inline513 and g tex2html_wrap_inline513 in two different ways: to store the trial step and residual (which we called Rho' and g' in lecture) and to store the final prediction step. This becomes important for coding only at the stage where we form the final Rho tex2html_wrap_inline513 . At the final step, you should first multiply the contents of Rho tex2html_wrap_inline513 by b tex2html_wrap_inline513 , and then loop over all of the preceding Rho tex2html_wrap_inline523 , multiplying by b tex2html_wrap_inline523 and accumulating the final result into Rho tex2html_wrap_inline513 .

Beginning with your code ``test_it'', make a new program ``broyden'' with the modifications below.





Tomas Arias
Mon Mar 25 16:15:06 EST 2002