| 1-2 |
Introduction: Problem Formulation, Algorithm Development, Algorithm Implementation, and Algorithm Verification
Structure and Documentation |
Lecture 1 (PDF)
Lecture 2 (PDF)# |
Lecture 1
Class Introduction; Overview of Languages; Program Development
Lecture 2
Discussion of aspects of computers and their operation. An example is given of program development for a simple case of computing the area of a figure.
In the lecture notes the poly_area.f (F) FORTRAN program is referred to. This program implements the area determination algorithm discussed in the lecture.
Links that are in the notes for this lecture:
What is big-endian?
Green's Theorem
The IEEE standard for floating point arithmetic |
| 3-7 |
FORTRAN: "Formula Translation"
Program Creation, Compilation and Linking, Variables and Parameters, Flow Control, Subroutines and Functions
Structure and Documentation
Use of Libraries, Internal and External Communication, and Interaction with other Languages
FORTRAN: Implementation Issues: Compilation Errors, Segmentation Violations, Not-a-Number (NaN), Input/Output (IOSTAT) Errors, Runtime Errors
Transportable Code, Standard Extensions
FORTRAN 90 Differences and Similarities to FORTRAN 77 |
Lecture 3 (PDF)#
Lecture 4 (PDF)
Lecture 5 (PDF)
Lecture 6 (PDF)
Lecture 7 (PDF) |
Lecture 3
Started FORTRAN (Formula Translation). Went through the basic elements that make up this language. An on-line version of a FORTRAN 77 manual can be found here. In reading these notes, you should think about operations you want to do and what command or commands do you use to do that. The list on FORTRAN intrinsic functions can be found here.
Other links to look at:
The FORTRAN Programming Language
Wikipedia Definition of FORTRAN
Lecture 4
Continued with showing the elements of the FORTRAN and more detail on the typically encountered features of the language. Topics covered: Subroutines and Functions; Intrinsic Functions; Constants and Variables; Input Output with Open/Close, Read/Write, Formats; Character Strings.
The links in this lecture were to FORTRAN and intrinsic functions, which are given above. The programs poly_area.f (F) and vars.f (F) are also used.
Lecture 5
Continued with FORTRAN. Character strings, control statements if and do; other commands such as include, common, parameter.
Lecture 6
Finish up FORTRAN. Compile, linking and runtime errors and miscellaneous topics. Practice with using the language.
Lecture 7
Examines the changes that were made in FORTRAN 90 with the introductions on more modern concepts in programming languages. |
| 8-11 |
C for Scientific Uses
Representation of Data through Arrays, Pointers, and Data Structures
Function Calls, Argument Passing and Scoping Rules, IO, Profiling, System Calls, and Signals
C++ Objects
Encapsulation and Inheritance, Polymorphic Operators
Lecture 11 is Examination of Homework 2 Solution |
Lecture 8 (PDF)
Lecture 9 (PDF)#
Lecture 10 (PDF)
Lecture 11 (PDF)# |
Lecture 8
Start of C-language programming. History, variables and executable statements.
Additional links for this class:
The Development of the C Language
Some pages comparing syntax of FORTRAN and C:
Basic C: C and FORTRAN 77 Syntax (PDF)
Basic C: New Features (PDF)
A set of basic exercises in C (PDF)
area.c (C) and hello.c (C)
Lecture 9
Continuation of C and C++
Ball.h (H) and launch.cc (CC)
Lecture 10
Inheritance and overloading in C++
C and C++ routines used in class: launch.c (C)
Example of inheritance (ustring is a class that inherits from the string class but stores everything in upper case): string.h (H), ustring.cc (CC), and ustring.h (H)
C++ class and program for a bouncing ball: Ball.h (H) and launch.cc (CC)
Example of overloading the + operator: coord.cc (CC) and coord.h (H)
Lecture 11
Examination of Homework 2 solutions |
| 12-13 |
Mathematica®
What it is and What it can Do; Structure of Mathematica®; Symbols, Exact Numbers, and Machine Numbers; Lists, Vectors, and Matrices
Working with Mathematica®: Numerical Calculations, Symbolic Calculations, and Graphics
Importing and Exporting Information |
Lecture 12 (PDF)
Lecture 13 (PDF) |
Lecture 12
Start of Mathematica®. These lectures are accompanied by a Mathematica® Notebook that shows example of concepts presented in the notes.
12.010.Lec12.nb (NB)
Lecture 13
Continuation of Mathematica®. These lectures are accompanied by a Mathematica® Notebook that shows example of concepts presented in the notes.
12.010.Lec13.nb (NB) |
| 14-17 |
MATLAB®
"Matrix Laboratory"
MATLAB® Syntax, Workspace, Variables
Script M-Files, IO, Control Flow, Debugging, and Profiling Tools
Object-Oriented Programming
MATLAB® Applications, Polynomials, Interpolation, Integration, Differentiation, ODE
Graphics, 2-D, 3-D, Graphical User Interface (GUI) |
Lecture 14 (PDF)
Lecture 15 (PDF)
Lecture 16 (PDF)# |
Lecture 14
MATLAB®: Introductory lecture on MATLAB® introducing system, variable types, control and functions. The following MATLAB® M-files are used in the lecture:
Lec01_01.m (M)
Lec01_02.m (M)
Lecture 15
MATLAB®: path command, variables, file IO and dialog boxes. The following M-files are used:
Lec02_01_file.m (M)
Lec02_02_db.m (M)
Lec03_01_file.m (M)
(The last file will be used in the next lecture as well.)
The data for these M-files can be found in MatData. A tar file with the data is TSeries.tar (TAR - 1.0 MB) (The TAR file contains: 30 .dat files.)
Lecture 16
MATLAB®: Graphics handles and animation of figures. The following M-files are used in class:
Lec03_movie.m (M)
MATLAB®/per_func.m (M)
Lecture 17
MATLAB®: Final class on GUI construction and use. The following M-files are used (along with the data from MatData: A tar file with the data is TSeries.tar (TAR - 1.0 MB) (The TAR file contains: 30 .dat files.) Basic GUI layout:
GPSanal.m (M)
GPSanal.mat (MAT)
gpsguio.m (M)
Final Operational Version:
tsview.m (M)
tsview.mat (MAT)
gpsgui.m (M)
YrToDate.m (M)
Update BreakGUI.m (M)
WriteText.m (M)
GPSResize.m (M) |
| 18-20 |
Graphics: Review of Common Graphics Program
Graphics with Spreadsheets, Kaleidagraph, Generic Mapping Tool (GMT)
Numerical Methods: Introduction to Numerical Methods
Material from this class will be useful in the Final Project |
Lecture 18 (PDF)#
Lecture 19 (PDF)#
Lecture 20 (PDF) |
Lecture 18
Introduction of Class Project. Demonstration and final programs due in lecture 24. Graphics formats and issues about vector and pixel based graphics. GMT graphics package for mapping applications.
Lecture 19
Class Projects: Statistics and random number generators. M-file randtest.m (M) is implementation of an LCG random number generator.
Lecture 20
Examined Mathematica® homework solution, demonstrated animation and ODE solvers. Looked at some commercial graphics packages.
Files used in class:
12.010_Lec20_Mathematica.nb (NB)
ODE_dem.m (M)
bacc.m (M)
hit.m (M)
animate.m (M) |
| 21-23 |
Advanced Topics: Parallel Computing with Large Memory and Large Numbers of CPUs
Advanced Topics: Parallel MATLAB® |
|
|
| 24 |
Final Project: 2 Classes on Discussion on Problem and Basic Approaches
Final Reports are due two days after lecture 23
Final Class will be In-class Demonstrations of the Final Project Program |
|
|