CAAM 519: Computational Science I

CAAM 519 Course Information

Instructor:   Loïc Cappanera
Class times:   11am to 11:50am on Monday, Wednesday, & Friday
Location:  Duncan Hall 1042
Office Hours:   Instructor 1:00pm to 2:00pm Tuesday in DCH 2001.
  Teacher Asssitant (Tom Klotz) 1:00pm to 2:00pm Wednesday in DCH 3016.
A syllabus and grading policy are available in accordance with Rice academic policy.


The instruction and due date of every assignment will be updated in this section.
  1. HMW_01 (due 2017/09/15): subversion, text editors and Linux. pdf.
  2. HMW_02 (due 2017/09/29): LaTeX document. pdf.
    Additional Materials: figure to insert and example done homework.
  3. HMW_03 (due 2017/10/13): functions and pointers with C. pdf.
    Remark: To compile a source file that includes math.h with gcc, you need to add the option -lm.
    Example: gcc main.c -lm
  4. HMW_04 (due 2017/11/03): 2D matrix structure, IO and Gauss elimination. pdf.
    Additional files: matrix_A and matrix_B.
    Remark: In question 5, the source file's name should be gauss_elimination.c (not matrix_gauss_inverse.c). Moreover, in question 3 last remark: a matrix NULL should be returned if the addition or product of matrices can not be performed.
  5. HMW_05 (due 2017/12/01): 2D matrix template class, approximatation Poisson problem. pdf.
    UPDATE question 6.b: the source term should return 4cos(2x) (no minus sign).
    UPDATE question 2.b: arguments of constructor are integers (not double).
    Remark: Example of class my_vec with operator (+, () and =) overload available here.
    Remark 1: The operators new[ ] and delete[ ] will be introduced on Monday 20th November, the course note (chapter 14, section 1.3) shows how to allocate a 2D matrix with new[ ]/delete[ ].
    Remark 2: Notion of exception will be introduced in class before Thanksgiving. Relevant information for the homework are provided in the course note (chapter 14, section 2.3).

Lecture notes

Class notes have been prepared for each lecture, but the lecture may deviate from the notes somewhat. The notes will be continually updated as the class progresses, so students can download them again at the beginning of each week.

Recommended Reading

The following books are foundational for the software construction and documentation that will be conducted in this class. However we will not follow them in any way, and they are intended for reference and outside reading.
  • The C Programming Language (2nd Edition) by Brian W. Kernighan and Dennis M. Ritchie (Prentice Hall).
  • The C++ Programming Language (4th Edition) by Bjarne Stroustrup (Addisson Wesley Professional).
  • LaTex Companion (Tools and Techniques for Computer Type Setting), 2nd ed., by Frank Mittelbach, Michel Goossens, Johannes Braams, David Carlisle, and Chris Rowley (Addison Wesley Professional).