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_inline429
  2. Prediction step --
    • Form matrix

      displaymath431

    • Form vector

      displaymath433

    • Solve

      displaymath435

    • Form final prediction

        equation118

Important note: This formulation of the algorithm uses Rho tex2html_wrap_inline437 and g tex2html_wrap_inline437 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_inline437 . At the final step, you should first multiply the contents of Rho tex2html_wrap_inline437 by b tex2html_wrap_inline437 , and then loop over all of the preceding Rho tex2html_wrap_inline447 , multiplying by b tex2html_wrap_inline447 and accumulating the final result into Rho tex2html_wrap_inline437 .

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





Tomas Arias
Fri Mar 17 13:11:50 EST 2000