Assignment 3

Assignment 3 is now available! You can view the document here. This assignment will be due at 11:00 pm on Feb 23rd. The submission guidelines are identical to the previous assignment. Electronic submissions are preferred (cc’ing both kmcrane@cs.cmu.edu and nsharp@cs.cmu.edu), but if you wish to submit a physical document, do so in class or at 215 Smith Hall. Smith Hall locks to the public at 5:00 pm, so plan accordingly.

The document linked above has several questions inline, numbered as Exercises 18-26. You DO NOT need to complete exercises 20 and 26, and you might not understand Section 6.3 — these all depend on exterior calculus, which we will be covering soon.

Once again, there is a coding component at the conclusion of the document, where you will be asked to implement some of the ideas described in the preceding text. A corresponding code skeleton is now present in the course repository, which you should download and modify. Note that the core library has also been updated, so you will need to re-download (or git pull, if you’re using git) the entire repository. The skeleton in Assignment3.py contains empty methods in which you will implement your solution, all of your modifications must be between the lines which say BEGIN YOUR CODE and END YOUR CODE. Some of the function names referenced in the text might not perfectly align with the codebase; don’t worry about this, just fill out the skeleton code. To submit the coding portion, email us your modified copy of the file Assignment3.py along with your written submission.

Again, we will only be considering triangular meshes without boundary for this assignment. There is a collection of such meshes in the Assignment3/Boundaryless_Meshes/ directory on which to test your code. Also, the codebase wiki has some information on matrix computation in Python which you might find useful.

Be warned, this coding portion is a bit more involved than the previous assignment, I suggest you start early so you have time to ask questions as needed.

8 thoughts on “Assignment 3”

    1. I am pretty sure it should just be $A$. I am pretty sure it is just a comma (I have the question written up in LaTeX with a comma and it looks identical to the document).

    1. That formula actually holds regardless of the size of the triangle. However, mass matrices are still necessary for other reasons (note that two similar triangles of different sizes have identical cotan weights, so it feels like the difference must show up somewhere).

      1. Thanks for the response. I must be missing something here. The gradient from 23 can be written as a vector with length 1/h, where h is the height, right? So it’s norm squared will be 1/h^2…

  1. Since the deadline is fast approaching, here are two commonly useful (but vague) hints about the coding portion:

    – The paragraph at the bottom of page 70 (spanning to the top of page 71) describes an important computational step. If you haven’t written a few lines of code corresponding to that step (for part 1 & 2), your code will fail most of the time! Try to understand why before you attempt a fix.
    – If you find that you need to use extremely large step sizes to get good results for part 3, you probably didn’t use a mass matrix. Because of the way we derived the backwards Euler equation for part 3, you will need to use the mass matrix in a slightly nonstandard way.

    Kudos to those of you who have already worked through these issues on your own!

Leave a Reply