What you need to do for the assignment



next up previous
Next: About this document Up: No Title Previous: Solving linear equations:

What you need to do for the assignment

 

We give you the following data:

  1. The location of a set of points, each of which corresponds to one cell.
  2. For each cell (point) we give the following information for each of its boundary edges.
    1. The index of the point on the other side of the edge.
    2. The length of the boundary edge
    3. The distance from the point to the point on the other side of the edge.
    This is given as a nested sequence of the form

  3. We give the vector . This is 0 for all points except the points along the left boundary.
  4. We give a list of the indices of the points along the right boundary.
To read in the data you can use the function read_data, which you can find in the file .../15-499B/data/hw6.nesl. This will return the quadruple (points, cell_info, b, right_indices).

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.





next up previous
Next: About this document Up: No Title Previous: Solving linear equations:



Guy Blelloch
Thu Jun 15 17:00:37 EDT 1995