|
|
| Course: | Math 625: Computational Mathematics and C Programming |
| Time & Place: | MW 1:00pm–2:15, ENGR 022 |
| Instructor: | Dr. Rouben Rostamian |
| Office: | MP 402 |
| Phone: | 410–455–2458 |
| Email: | rostamian@umbc.edu |
| Office hours: | MW 2:30–3:45 and by appointment |
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.
Some programming knowledge is assumed. A substantial part of the course will consists of introduction to C with special emphasis on common idioms used in scientific computing. Through the semester the students will gradually build their own computing library and will successively apply it to solve increasingly complex computational projects.
Prerequisites: Math 221 (linear algebra), Math 251 (multivariable calculus)
rank_vertices() function.
Fill the blanks in it with your rank_vertices(),
compile and run. If your rank_vertices() has
problems, you will see diagnostics, otherwise the program
silently terminates.
Triangle is installed as a Unix library on the department's machines. To link with your programs, do:
cc ... your *.o files ... -ltriangle -lm
Here is the stand-alone demo program triangle-demo2.c that I showed you in class.
Note 1: If you have a Linux machine, you may copy the library to your machine. Here is how:
/usr/local/stow/triangle-1.6/lib/libtriangle.a
from the department's machines to the directory
/usr/local/lib/ on your machine. (Make that directory if it does not exist.)
/usr/local/stow/triangle-1.6/include/triangle.h
from the department's machines to the directory
/usr/local/include/ on your machine. (Make that directory if it does not exist.)
Note 2:
Unfortunately, parts of triangle.c are quite hacky
and do not conform to any C standard. Consequently
"gcc -Wall -pedantic -std=c89"
issues quite a few warnings. Let's hope that these are not fatal.
Fixing the problems calls for a major effort which I am not getting
into right now.
Note 3:
If you are using triangle as a library, then enter its header as
#include <triangle.h>. If you are compiling
explicitly with
triangle.c
and
triangle.h,
then enter the header as #include "triangle.h".
We use the quadrature method described in the articles:
I have wrapped their quadrature data into a C program in the files
twb-quad.c
and
twb-quad.h.
The documentation is in the file twb-quad.h.
Here is the stand-alone demo program twb-quad-demo.c that I showed you in class.
Umfpack is installed as a Unix library on the department's machines. To link with your programs, do:
cc ... your *.o files ... -lumfpack -lamd -lm
Note 1: The compressed archive file umfpack-4.4.tar.gz contains a copy of the department's installation. If you have a Linux machine, you may unpack the file as follows:
umfpack-4.4.tar.gz noded above
to your machine.
/usr/local directory on your machine.
This will unpack the archive into the directories
/usr/local/lib
and
/usr/local/include on your machine.
You will need to be superuser to do that last step.
That finishes the installation. Use it as you would on the department's machines.
Note 2:
Umfpack
has quite a few header files, 33 to be exact,
all of which are accessed through the
“master” header
umfpack.h. I have bundled all
the header files into the
subdirectory /usr/local/include/umfpack.
Consequently, include the main header file in your
program as:
#include <umfpack/umfpack.h>.
Umfpack comes with two manuals:
QuickStart.pdf and UserGuide.pdf.
You will find them in the directory
/usr/local/stow/umfpack-4.4/share/doc/umfpack
on the department's machines.
Here are the demo files umfpack-demo1.c, umfpack-demo2.c, umfpack-demo3.c, that I showed you in class.
To apply prescribed Neumann boundary conditions, we need to integrate on the domain's boundary. Here are Gaussian quadrature tables for this purpose: gauss-quad.h, gauss-quad.c, and here is the demo program that I showed in class: gauss-quad-demo.c.
There is no textbook which covers the selection of topics planned for this course. I will provide plenty of reading material from various sources throughout the semester. Students are expected to take detailed notes.
Recommended reading: The C Programming Language by Brian Kernighan and Dennis Ritchie.
It would be a good idea to go over the book's errata collected in the book's website and insert fixes in the book.
You will find much interesting information about the book at http://cm.bell-labs.com/cm/cs/cbook.
I will collect and grade the weekly programming assignments. Course grade will be based on cumulative performance on these assignments.
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.
![]() Original image |
![]() ...with 10% of the original information |
![]() ...with 5% of the original information |
![]() ...with 1% of the original information |
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:
| Author: Rouben Rostamian |
|