Title: BIL102
1BIL102
- Introduction to
- Scientific Engineering Computing
2Instructor
- Nüzhet Dalfes
- Associate Professorat theEurasian Institute of
Earth Sciences - Also, Adviser to the Rector for Information
Technologies - dalfes_at_itu.edu.tr
- 285-3930 (x145)
3Common informatics curriculum at ITU
- Intro. to Computers and Information Systems
- Intro. to Scientific and Engineering Computing
4Intro. to Computers and Information Systems
- A first introduction to the world of computers
- Basic skills in using computers for communication
and computing - Basic skills for efficient use of information
systems - Internet
- Library systems
5Intro. to Scientific and Engineering Computing
- Basic skills for scientific/engineering problem
solving using computers - Data structures and algoritms
- Programming skills in a (standard) language
- Skills for integrating the computing
chainAnalyze à Program à Run à Visualize
6BIL102
- Taught in three versions
- Fortran 90
- C
- Combo Fortran 90 C Java Javascript
- You are Section I
- Metallurgical Engg
- Food Engg
7Intranet-assisted course
- Everything (almost) will be available at the Web
site - It is imperative that you should
- have an e-mail address
- and be comfortable with a browser(Internet
Explorer or Netscape) - Register yourself to HIM(Homework Information
System)
8Working environment
- Windows NT 4.0
- Browser, etc.
- F_World
- Linux
- Text editor (pico)
- Compiler (F )
- Mail (pine)
9IMPORTANT
- What you will be reading on this screen will
always be available at the Web site - Taking notes its up to you to decide!
10Textbook(s)
- Programming in F
- T.M.R. Ellis and Ivor R. Philips
- Ordered for the M.I.L.s Reserve Section
- Photocopies available Fen-Edebiyat printshop
- Essential Fortran 90 95
- Loren P. Meissner
- 5 copies at the M.I.L.s Reserve Section
11Schedule
- Wednesday 1400 - 1700
- 75 min. lecture 15 min. break 75 min.
lecture/demo - Out lt 1645
12Requirements
- Homework assignments 20 10 x 2
- Every week (except the first one)
- Pick it up from to Web site turn it in by HIS
- Due the end of week after.
- Quizes 40 4 x 10
- 5 quizes in total randomly distributed!
- On paper (for the moment!)
- Final 40
13How do we use computers in science and
engineering?
- To organize and analyze data
- Excel, Access, ...
- To understand the implications of a model of
(i.e. to simulate) a natural or human-made system
14Simulation of natural/artificial systems
- Build a conceptual à quantitative model (most of
the time, write down the appropriate equations) - Formulate a solution to these equations using
numerical methods - Data structures algorithms
- Program these data structures and algorithms in a
language - Run the program and analyze its output using
visualization techniques
15A brief history of computing machines
- Early computing devices
- 1822 Charles Babbage - Difference Engine -
Analytical EngineAda Augusta - the first
programmer - 1944 Mark I, an electromechanical computer
- Electronic computers
- First generation - vacuum tubes
- 1946 ENIAC - Electronic Numerical Integrator and
Computer - UNIVAC - Universal Automatic Computer
- Second generation 1959-1965 transistors
- 1958 IBM 7090
- 1963 PDP-8, the first minicomputer
- Third generation 60-70 integrated circuits
- 1964 IBM System/360
- Fourth generation VLSI
16(No Transcript)
17(No Transcript)
18(No Transcript)
19(No Transcript)
20Computing systems
- Central processing unit (CPU) has registers
- Memory (these days, RAM, Random Access Memory
- Input/Output units video cardmonitor, keyboard,
etc. - Storage units disks
21Computer memory organization
- Units of measure
- Basic unit bit
- 8 bits 1 byte
- 1024 bytes 1 Kbyte or 1 K
- 1024 K 1 Megabyte or 1 M
- CPU registrers, RAM, ROM Read-Only Memory
- n bytes 1 word (n4, 8, etc.) ð 1 word 32
bits, or 64 bits, etc.
22Computer memory organization contd
- Associated with each word or byte is an address
- As far as the computer is concerned, instructions
are data
23How to tell a computer what to do?
- 0001101101010110 00011011010101100101101111010110
00011011110101101101101111010110
0111101111010110 - MOV A, ACCMUL B, ACCADD C, ACC
24How do we tell these days a computer what to do?
Source program (high level language)
Compiler
Object program (machine language)
25Software in Science Engineering
- Ready-made Analysis and simulation environments
- Custom-made programs codes
- You (or your team) write (program) them from
scratch - Legacy codes you have to understand and modify
them
26Programming in the 90s
- Structured programming of the 70s
- Pascal C Fortran 77 Ada ...
- Object-oriented programming of the 80s
- Smalltalk C
- 90s
- Java Fortran 90/95
27A brief history of Fortran
- FORTRAN FORmula TRANlation
- John Backus 13 programmers at IBM for IBM 704
1954-1957 - Other manufacturers developped FORTRAN for their
machines - Portability standards!
- Fortran 66 à Fortran 77 à Fortran 90 à Fortran 95
à Fortran 2000
28So, why Fortran?
- Concise language
- Good compilers producing efficient machine code
- Legacy high-quality mathematical libraries
(IMSL, NAG, ) available - New version have features helpful for
parallelization
29Software
- Operating system
- UNIX à Open Systems
- MS DOS à MS Windows 3.1 à MS Windows 95 à MS
Windows NT - Graphical User Interfaces
- MS Windows
- X Windows
- Utilities Editors, etc.
- Integrated Development Environments (IDE)
30Fortran 90Link to the Past
- Fortran 90/95 ? Fortran 77
- All Fortran 77 programs will work with Fortran 90
compilers
31The F language
F
Fortran 77
Fortran 90
32The F language
- Easy
- to learn
- to implement
- to understand
- Powerful enough for use in large programs
33program Radioactive_Decay !-----------------------
--------------------------------------------------
--- ! This program calculates the amount of a
radioactive substance that ! remains after a
specified time, given an initial amount and its
! half-life. Variables used are !
InitalAmount initial amount of substance
(mg) ! HalfLife half-life of substance
(days) ! Time time at which the
amount remaining is calculated (days) !
AmountRemaining amount of substance remaining
(mg) ! ! Input InitialAmount, HalfLife, Time !
Output AmountRemaining !------------------------
--------------------------------------------------
--- implicit none real InitialAmount,
HalfLife, Time, AmountRemaining ! Get values
for InitialAmount, HalfLife, and Time. print
, "Enter initial amount (mg) of substance, its
half-life (days)" print , "and time (days) at
which to find amount remaining" read ,
InitialAmount, HalfLife, Time ! Compute the
amount remaining at the specified time.
AmountRemaining InitialAmount 0.5 (Time /
HalfLife) ! Display AmountRemaining. print
, "Amount remaining ", AmountRemaining,
"mg" end program Radioactive_Decay
34program Radioactive_Decay !-----------------------
--------------------------------------------------
--- ! This program calculates the amount of a
radioactive substance that ! remains after a
specified time, given an initial amount and its
! half-life. Variables used are !
InitalAmount initial amount of substance
(mg) ! HalfLife half-life of substance
(days) ! Time time at which the
amount remaining is calculated (days) !
AmountRemaining amount of substance remaining
(mg) ! ! Input InitialAmount, HalfLife, Time !
Output AmountRemaining !------------------------
--------------------------------------------------
--- implicit none real InitialAmount,
HalfLife, Time, AmountRemaining ! Get values
for InitialAmount, HalfLife, and Time. print
, "Enter initial amount (mg) of substance, its
half-life (days)" print , "and time (days) at
which to find amount remaining" read ,
InitialAmount, HalfLife, Time ! Compute the
amount remaining at the specified time.
AmountRemaining InitialAmount 0.5 (Time /
HalfLife) ! Display AmountRemaining. print
, "Amount remaining ", AmountRemaining,
"mg" end program Radioactive_Decay
35program Radioactive_Decay !-----------------------
--------------------------------------------------
--- ! This program calculates the amount of a
radioactive substance that ! remains after a
specified time, given an initial amount and its
! half-life. Variables used are !
InitalAmount initial amount of substance
(mg) ! HalfLife half-life of substance
(days) ! Time time at which the
amount remaining is calculated (days) !
AmountRemaining amount of substance remaining
(mg) ! ! Input InitialAmount, HalfLife, Time !
Output AmountRemaining !------------------------
--------------------------------------------------
--- implicit none real InitialAmount,
HalfLife, Time, AmountRemaining ! Get values
for InitialAmount, HalfLife, and Time. print
, "Enter initial amount (mg) of substance, its
half-life (days)" print , "and time (days) at
which to find amount remaining" read ,
InitialAmount, HalfLife, Time ! Compute the
amount remaining at the specified time.
AmountRemaining InitialAmount 0.5 (Time /
HalfLife) ! Display AmountRemaining. print
, "Amount remaining ", AmountRemaining,
"mg" end program Radioactive_Decay