Final Project

Solving Laplace's Equation Using Your Class Library

Due Date: Dec 14, 2008 by noon

Required for submitting:

    • Grade Sheet Print this sheet and bring it to class on the last day of class.

    • Bring your UML diagram to class.

Resources:

Introduction and Purpose:

  • For this final project in CS 328, I want you to realize the benefits of the capabilities of the class library that you have built throughout the semester. We started with array/vector classes and moved into matrix implementations. We have then incorporated virtual functions, public and private inheritance, and interface and implementation base classes to enhance the usability and adaptability of your library. Now, I want you to tie it all together to use your class library of data objects and operations to solve a mathematically difficult (if not impossible) problem.

    • Apart from the problem solving nature of this assignment, I want you to experience a few other equally important aspects of working on a larger project. You will:

      1. Submit a design

      2. Produce a project Report

      3. Test and Verify your project

      4. Compare techniques to solve the same problem

      5. Work with a partner to accomplish part of the above (if you so choose)

The Project Pieces:

  • Design will be your UML diagram in detail. As always, your UML lays out for inspection by designers, implementers, and fixers the "game plan" of your programming project. Your design is to include all aspects of the working model: classes for objects, classes for operations, global functions and operators. Relationships between these components describe at one level the coordination of these important elements of the design.

      • Important Notice: Your design (UML) will be due Wednesday, December 3, 2008. Don't put it off; you need to begin thinking about this project NOW.

    • Testing and Verification of your code is performed for obvious reasons: to expose any failings of your code or design and to find holes in your logic. To this end, test your code extensively. Then test it again. And when you are done with your own tests, have your partner test your code. (It is assumed that, if you have a partner, you are sharing the coding duties for this project in the sense that one partner takes care of one piece of the puzzle and the other takes care of another piece.) It is difficult to be completely honest and objective when it comes to testing your own code; one is loathe to try to break one's own creation. So, have your friend try to break your code. Also, play with the parameters of the problem to be solved. See what works, what works better, and what doesn't work.

    • Comparing techniques of finding the solution serves at least two purposes: to help verify that you indeed have computed a valid solution to the problem, and for your own edification about the two or more methods of solving the problem at hand. You are to use two solution finding techniques. One method is the iterative technique you coded in assignment #5 (either Jacobi or Gauss-Seidel iteration). The other is Gaussian elimination using any pivoting technique you want to use. I'd suggest you consult your cs 228 book or any other text on elementary numerical methods. You are invited to use any other methods for finding the solution to the system, but you will use at least these two methods. Compare them by holding constant all other parameters (like mesh size). Is it significant? Is one method better than another? You can also play with the "tightness" of the mesh as a parameter. You are given free reign on how you want to do this comparison. Of course, you will be graded on the relevence and effectiveness of your methodologies. I can think of several ways to do this. Can you? ("No" is an acceptable answer to this rhetorical question, but only if your name is Ralph Wiggum.)

    • Your Project Report will be a formal document (sorry, no pencil scratchings on a napkin, cave art, or any other form of primitive documentation) outlining the procedures you took to solve the problem. It is NOT to be filled with unnecessary information, unnecessary verbage, and unnecessary commentary. It IS to have adequate but brief descriptions of the following:

      • statement of the problem

      • mathematical justification for your approach to the problem solution

      • methodologies for generating your approximations to the solution

          • mathematical techniques

          • the parameters used in your code (e.g. mesh density, number of iterations, etc.)

      • your solution (approximations)

      • a 'discussion' of the viability of your solution - the comparisons referred to above, speed of convergence of the two methods, etc.

      • anything else you deem important to the project

    • Working with a partner on this project is not mandatory but is sanctioned. If you wish to work on your own, so be it. If you work with a partner, be sure to divide the work evenly between the TWO of you. (You may only work in groups of two.) I don't want to see that one person in any group is doing a great majority of the work involved in the project. Both partners are expected to know every aspect of the project, including the code and its design.

Specifications:

  • This is the problem you will solve

      • uxx(x,y) + uyy(x,y) = y, (0 < x < 1, 0 < y < 1),

      • u(x,0) = x3 u(x,1) = x3 (0 x 1),

      • u(0,y) = 0 u(1,y) = 1 (0 y 1)

Deliverables:

    • Code: I will test that the code you submit does indeed compile and run. You are to copy all your source code along with a makefile into your cs328 directory. How to do this is explained in Submission procedure.

    • makefile: Supply the makefile which compiles and builds your program as detailed above. I really suggest that you play around with and use the third of the makefiles I posted.

    • Your gradesheet and UML (in class, of course). Remember that your UML is due Wednesday, the 3rd day of December.

    • You can email your paper to me by due time.

Evaluation

  • Your project will be evaluated in the usual manner but for one exception. You will have an oral "interview". You need to sign up for a date with Josh and me to discuss your project. If you are working with a partner, then both of you will be present at the time of the interview. It will take 30 minutes. I will post a sign-up sheet on my office door for times during the first two days of finals week (Monday and Tuesday, the 15th and 16th of December).

    • We will grade your project for all the usual parameters for good coding. But we will pay particularly close attention to your use of the object-oriented paradigm to see if you have written code that is extendable, reusable, modifiable, and adaptable. Keep this in mind as you build your design. Keep this in mind as you code the construction of A, x, and b in the model Ax = b.