MATH 625: | Computational Mathematics |
and C Programming |
Fall 2017 Course information
Class Time/Place: | MoWe 5:30pm–6:45pm, Sherman 207 |
Office: | MP 406 |
Phone: | 410–455–2405 |
Email: | rostamian@umbc.edu |
Office hours: | MoWe 4:30–5:30, or by appointment |
Course content
This is a hands-on computational mathematics course with emphasis on programming in C. The goal is quickly to impart the necessary algorithmic and programming skills to enable the students build moderate- to large-scale application programs and gain a mastery of the C programming language in the context of scientific computing.
A working knowledge of basic C is assumed. If you are really interested in taking this course and have no experience with C, you should try to teach yourself some of it before the semester begins. The summer would be a good time for it. I recommend Kochan's book (see below) or something equivalent for that purpose.
A substantial part of the course deals with moderate to advanced topics in C with special emphasis on common idioms of scientific computing. Through the semester you gradually will build your own computing library and will apply it to solve increasingly complex computational projects.
Prerequisites
Math 221 (linear algebra), Math 251 (multivariable calculus), and a working knowledge of basic C.
Syllabus
The course content will consist of selections from the following topics:
- Dynamic memory allocation for vectors and matrices
- Linear system and the LU decomposition of matrices
- Haar wavelets applied to the image processing and compression
- The Nelder-Mead algorithm for minimizing functions of n variables
- Analyzing statically indeterminate 2D trusses via minimization of energy
- Simulated evolution, natural selection and speciation
- Using the Triangle utility to triangulate a polygonal domain
- Gaussian quadrature for integrating over intervals, rectangles, and rectangular meshes
- Integration over triangles and triangulated domains
- Using the UMFPACK library to solve large linear systems with sparse coefficients
- A finite element solver for elliptic partial differential equations on polygonal 2D domains and homogeneous Dirichlet boundary conditions
- Extending the finite element solver to handle inhomogeneous boundary conditions of Dirichlet and Neumann types
Textbooks
I wrote Programming Projects in C specifically for use in this course. You will find it at SIAM's bookstore or at amazon.com, and possibly elsewhere. SIAM gives 30% discount to its members, and I think membership is free to students.
The textbook assumes a working knowledge of C; it is not a C primer. I recommend Kochan's, Programming in C for brushing up on your C skills, and for reference. (You will need it!) The older 3rd edition is just as good; get it if you can find it for a good price, but don't get an earlier edition.
And please stay away from tutorials on the web. I haven't seen a decent one yet; most of them will teach you bad programming ideas and habits which will be a struggle to correct later.
Resources
The textbook's website provides resources such as supplementary files and other information that you may need to complete specific projects.
Coding style
The Linux kernel coding style is written by Linus Torvalds as a style-guide for his collaborators on developing and maintaining the Linux kernel. The advice in chapters 1–8 is generic and applies to any C programming project. I do follow that style myself, and recommend that you do it too.
Grading method
I will collect and grade the programming assignments. Course grade will be based on cumulative performance on these assignments.
Simulated Evolution
Bugs (red dots) evolve into two distinct species in response to environmental factors. A region where food (green dots) is plentiful (near the center) leads to the emergence of a sluggish species that tends to stay in one place. A region where food is scarce (away from the center) leads to the emergence of a species that tends to move about a lot.
The Nelder-Mead minimization algorithm
The Nelder-Mead algorithm is a gradient-free method for minimization of functions of the type f : Rn → R. It works through a moving and deforming adaptive simplex (a triangle in 2D) that “sniffs around” for the location of the minimum.
Large deformations of trusses
The large deformations of a Pratt truss under variable load
The large deformations of a cantilever truss under variable load
Our truss solver handles statically indeterminate trusses with nonlinear elastic members and large deformations (assuming that no buckling occurs).
A finite element solver
Solutions of Poisson's PDE (∇2 u + f = 0) on: (a) an L-shaped domain with zero Dirichlet boundary data; and (b) on an annular domain with mixed Dirichlet and Neumann boundary data. This finite element solver uses linear elements on an unstructured triangular mesh.
Images filtered through Haar wavelets
A grayscale image sample
A color image sample
Original image |
...with 10% of the original information |
...with 5% of the original information |
...with 1% of the original information |
The original 256×256 image was transformed via Haar wavelets. Then the least significant coefficients were dropped and the image was reconstructed with the remaining coefficients. The relative L2 errors of truncation in the three reconstructed images are 2, 3, and 6 percent. The information from the original image retained are 10%, 5%, and 1%, respectively.
Miscellaneous notes
Registrar's Office Dates and Deadlines
The Official UMBC Honors Code
By enrolling in this course, each student assumes the responsibilities of an active participant in UMBC's scholarly community in which everyone's academic work and behavior are held to the highest standards of honesty. Cheating, fabrication, plagiarism, and helping others to commit these acts are all forms of academic dishonesty, and they are wrong. Academic misconduct could result in disciplinary action that may include, but is not limited to, suspension or dismissal.
For detailed policies on academic integrity consult:
- Undergraduate students:
- Student Academic Conduct Policy (a PDF file)
- Graduate students:
- Policy and Procedures for Student Academic Misconduct (a PDF file)
Student Disability Services (SDS)
Services for students with disabilities are provided for all students qualified under the Americans with Disabilities Act of 1990, the ADAA of 2009, and Section 504 of the Rehabilitation Act who request and are eligible for accommodations. The Office of Student Disability Services is the UMBC department designated to coordinate accommodations that would allow for students to have equal access and inclusion in their courses.