Date 
Lec. 
Reci
tation 
Topics covered: 
1/13 
1 

Introduction to the
Class,
Computers, and Computing 



Syllabus 



Why learn Programming 



Why learn Fortran 



History of Computing 



People in the history of computing 



How a computer works 



More on computer structure and operation 



The hexadecimal number system 



Floating Point Numbers 
1/15 
2 

Fundamentals of
Fortran, Programming Principles




Creating and Modifying Programs 



Compiling your program 



A word on standard versions of Fortran 



Rules on the format of Fortran statements 



Fortran 90 Free
Format 
1/15 

2 
Computer Operating
Systems, Unix 



Functions of an operating system 



Unix 



The "man" command 



Unix file system 



Useful Unix File System Commands: ls,
mkdir, cd, pwd




Shells 



Ending your interactive computer session 
1/20 
3 

A First Program 



A Simple form of the
program 



A Modular form of the
program 
1/22 
4 

Next Step, Arithmetic
Assignment Statements 



Simple Arithmetic Operators 



Precedence of Operations 



A fine point on the use of parentheses 



Integer and Mixed Integer/Real Arithmetic 



Floating Point Constants 



Two other ways to assign values to
Variables 
1/22 

4 
More on Unix 



More commands: cp, mv, rm, rmdir 



Creating your own text files with the vi
editor




Some special files in Unix 



File Redirection 



Stopping Programs 



Ending your session 
1/27 
5 

Introduction to
Fortran's Intrinsic Functions 



Some basic INTRINSIC FUNCTIONS (LIST) 



Some comments on speed 



A sample program using intrinsic functions 
1/29 
6 

Writing your own
Functions and Subroutines 



What happens when you use a function 



Subroutines 
1/29 

6 
The program turns
ugly, using DBX 



Getting some practice 
2/3 
7 

Logical Structures 



Logical relational operators 



Boolean Operators 



Precedence 
2/5 
8 

Using Logic, If
statements 
2/5 

8 
Use of IF statements
for Interpolation 



Interpolation and Weighted Transitions 
2/10 
9 

More ways to use
branching 



SELECT CASE statements 



Computed GO TO statments 



DO WHILE statements 
2/12 
10 

Linearization and
Newton Iteration 



Solution of an equation by Newton
Iteration (Postscript) 
2/12 

10 
Examples of Newton
Iteration 
2/17 
11 

DO Loops 
2/19 
12 

Introduction to Arrays 



Declaration of arrays 



FORMAT statement 
2/19 

12 
Review for Exam 1 
2/24 
13 

More on Arrays 



Array Initialization 



Mathematica 



Mathematica quick reference 



Some basic Mathematica 
2/26 
14 

Allocating space for
a problem 



Using Array space in subprograms 



Dynamic Allocation of Array Space 
2/26 

14 
Data Types and Data
Representation 



Derived Type 
3/3 
15 

Input/Output 



READ and WRITE 



END=[label], READ option 



Unformatted I/O 



OPEN and CLOSE options 



INQUIRE 



REWIND 



BACKSPACE 



ENDFILE 
3/5 
16 

Character Variables 



Fortran 77 



CHARACTER intrinsic functions 



Using CHARACTER Variables in I/O 



Relational Operators and CHARACTER
variables 
3/5 

16 
Using the FORMAT
statement 
3/17 
17 

Fortran 90
CHARACTER intrinsic functions 
3/19 
18 

Test Problems 
3/19 

18 
Applications of
CHARACTERs 



ASCII character set 
3/24 
19 

Interpolation 



EXTERNAL and INTRINSIC type statements 



Linear and Quadratic Interpolation 
3/26 
20 

Introduction to
Multidimensional Arrays 



Bivariate Interpolation (Postscript) 
3/26 

20 
Sorting 



Selection Sort 



Bubble Sort 



Insertion Sort 



Using Isolated Subroutines in Unix 
3/31 
21 

Fortran and Linear
Algebra 



Notation for Linear Algebra: Matrices 
4/2 
22 

Array Intrinsic
Functions and INTERFACE Structures 



Writing your own array valued functions 
4/2 

22 
Review for Second Exam 
4/7 
23 

Optimizing Code 



STATEMENT FUNCTIONS
and INTERNAL FUNCTIONS 
4/9 
24 

Least Squares Fits 
4/9 

24 
Application of
Least Squares 



Least Squares Fit of a Straight t Line to
Data 



Least Squares Fit of a Quadratic Curve to
Data 



Least Squares Fit of a General Polynomial
to Data 
4/14 
25 

Numerical Integration 



Trapezoidal and Simpson's Rules
(Postscript) 
4/16 
26 

Basic Numerical
Differentiation 



Numerical Evaluation of
Derivatives 



COMMON 



Important features of COMMON




INCLUDE 



More on MODULEs 
4/16 

26 
The Secant Method
for Solving Nonlinear Equations 



Secant Method (Postscript)

4/21 
27 

Computer Solutions
to ODEs 



Computer Solutions to ODEs (Postscript) 
4/23 
28 

Fortran 90 Pointer Data Type 
4/23 

28 
Practice Solving ODEs 
4/28 
29 

Gauss Elimination
and LU Decomposition 



Gauss Elimination and LU Decomposition
(Postscript) 
4/30 
30 
30 
Review for the
Final Exam 