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

      displaymath550

    • Form vector

      displaymath552

    • Solve

      displaymath554

    • Form final prediction

        equation123

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

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





Tomas Arias
Mon Apr 2 13:24:52 EDT 2001