| Course: | Math 625/0101 [catalog #3964]: Computational Mathematics and C Programming |
| Time/Place: | TT 1:00pm-2:15pm, MP 401 |
| Instructor: | Dr. Rouben Rostamian |
| Office: | MP 402 |
| Phone: | 410-455-2458 |
| Email: | rostamian@umbc.edu |
| Office hours: | TT 11:15-12:00 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)
truss-demo < cantilever.dat > cantilever.solution
truss-demo: read 8 nodes, 15 links, DOF=12
Nelder-Mead search converged after 1221 function evaluations
truss-demo < bollman.dat > bollman.solution
truss-demo: read 14 nodes, 39 links, DOF=25
Nelder-Mead search converged after 5958 function evaluations
read-mesh-data.c, in read_node_data(),
near the end, I have:fscanf(fp, "%d %lf %lf %*d", ....
fscanf(fp, "%u %lf %lf %*d", ....
Try the various combinations of test functions and domain geometries defined in this file. Verify that you are getting the expected answer in each case.
Recommended usage: Putsquare.polyin a directory of its own. Make a coarse triangulation (square.1.*)and a fine triangulation (square.2.*)by:
triangle -Qa0.05q30 square.poly.
triangle -Qa0.01q30 square.1.poly.
Recommended usage: Putannulus.polyin a directory of its own. Make a coarse triangulation (annulus.1.*)and a fine triangulation (annulus.2.*)by:
triangle -Qa0.5q30 annulus.poly.
triangle -Qa0.1q30 annulus.1.poly.
An ell-shaped domain with a hole removed. Its area is 2.82.
void maple_plot(Mesh *mesh, double *u, const char *filename);
receives pointers to the mesh structure mesh, the
solution vector u, and the name of an output file.
It writes the given data to the output file in a form that
can be read into Maple to display the solution
as a 3D surface. Instuctions for running Maple are given at
the top of that output file.
maple_plot() (see above)
but produces output that can be viewed in Matlab:
matlab-plot.h
matlab-plot.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.
Required 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.
![]() Original image |
![]() ...with 10% of the original information |
![]() ...with 5% of the original information |
![]() ...with 1% of the original information |