We give you the following data:
We also give you some routines for plotting the results and for sparse vector matrix multiply . In particular we give you the following functions, which can be found in the same file:
wininfo <- create_grid_window(points,cell_info) draw_grid_values(x,wininfo) vect <- sparse_mvmult(A,b)
Your job is to write a linear system's solver to solve the airflow problem over the data we give you. This will require generating the appropriate matrix from the data and implementing the Jacobi iterative method for solving the equation . Your final program, which should be called solve_wing, should load the data, generate the matrix , create a window (using create_grid_window), iterate through the Jacobi method and replot the values of every 100 iterations (using draw_grid_values). Your program should go through 10 cycles of 100 iterations (1000 iterations total). Your initial guess for should be all 0s.
You can run a demo of what your program should do by running
..../15-499B/bin/airflow on a color X terminal.