CS3220 - Introduction to Scientific Computing Summer 2008 Jonathan - - PowerPoint PPT Presentation

cs3220 introduction to scientific computing
SMART_READER_LITE
LIVE PREVIEW

CS3220 - Introduction to Scientific Computing Summer 2008 Jonathan - - PowerPoint PPT Presentation

CS3220 - Introduction to Scientific Computing Summer 2008 Jonathan Kaldor 1 Overview Course Mechanics What is scientific computing anyways? MATLAB refresher 2 Course Mechanics See syllabus Homeworks Exams Grading


slide-1
SLIDE 1

CS3220 - Introduction to Scientific Computing

Summer 2008 Jonathan Kaldor

1

slide-2
SLIDE 2

Overview

  • Course Mechanics
  • What is scientific computing anyways?
  • MATLAB refresher

2

slide-3
SLIDE 3

Course Mechanics

  • See syllabus
  • Homeworks
  • Exams
  • Grading
  • TA: Jesse Simons

3

slide-4
SLIDE 4

Scientific Computing

  • a.k.a. numerical analysis, a.k.a. numerical

methods...

  • Different things to different people

4

slide-5
SLIDE 5

Scientific Computing

  • Pedantic definition: use of computers to

support other sciences

  • Analysis of data
  • Model Generation
  • ... but not entirely

5

slide-6
SLIDE 6

Scientific Computing

  • Another definition: intersection of analytical

math with applied computer science

  • How to solve (or approximate) answers to

problems in

  • linear algebra
  • calculus
  • differential equations

6

slide-7
SLIDE 7

Scientific Computing

  • In reality, combination of the two
  • Given a problem (maybe, but not always,

motivated by other scientific fields)...

  • ... determine the methods needed to

solve the problem...

  • ... and understand how to implement the

solutions efficiently on a computer

7

slide-8
SLIDE 8

Scientific Computing

  • “But don’t we already know how to solve

those problems?”

8

slide-9
SLIDE 9

Why it is important

  • Yes, but the computer adds its own

peculiarities

  • Floating point numbers introduce

additional error

  • Running time important

9

slide-10
SLIDE 10

Floating Point Numbers

  • In math, numbers have as much precision as

needed

  • On computers, numbers have a finite

precision

  • e.g. π versus 3.141592
  • Leads to accumulation of error
  • 1e-10 + 1e10 = ???

10

slide-11
SLIDE 11

Floating Point Numbers

  • In math, zero is well-defined and distinct
  • In floating point, imprecision leads to

uncertainty

  • Result of computation is 1e-15 ... is it

actually zero?

11

slide-12
SLIDE 12

Floating Point Numbers (a real life example)

  • As part of research, needed to solve cubic

equation

  • detect collisions between two triangles as

they move over time

  • Quadratic formula for quadratics, no

closed-form solution for quartics

  • For cubics, though...

12

slide-13
SLIDE 13

Floating Point Numbers (a real life example)

13

slide-14
SLIDE 14

Floating Point Numbers (a real life example)

  • Implemented closed

form solution for cubics...

13

slide-15
SLIDE 15

Floating Point Numbers (a real life example)

  • Implemented closed

form solution for cubics...

  • ... and it worked!...

13

slide-16
SLIDE 16

Floating Point Numbers (a real life example)

  • Implemented closed

form solution for cubics...

  • ... and it worked!...
  • ... well, almost all of the

time

13

slide-17
SLIDE 17

Floating Point Numbers (a real life example)

  • So what happened?
  • Method was unstable - accumulation of

floating point error in method meant answers were not exact

  • ... and it was just large enough to
  • ccasionally miss

14

slide-18
SLIDE 18

Conditioning

  • Another example: in linear algebra, n x n

matrices are either singular (not invertible)

  • r non-singular (invertible)
  • In scientific computing, third option: ill-

conditioned (nearly-singular)

  • matrix is technically non-singular, but

close enough that inverse cannot be computed with good accuracy

15

slide-19
SLIDE 19

This Course

  • Study types of problems, methods of

solution

  • Emphasis on:
  • Problem recognition
  • How each method works
  • How things can go wrong

16

slide-20
SLIDE 20

This Course

  • Additional goals:
  • Efficient code
  • Being able to discuss sources of error
  • MATLAB plotting tools
  • Identifying easy / hard problems

17

slide-21
SLIDE 21

Course Topics (List)

  • Linear Systems
  • Linear Fitting
  • Interpolation
  • Root finding / optimization
  • Differential Equations

18

slide-22
SLIDE 22

Course Topics (Visually)

[see http://www.graphics.cornell.edu/~jmkaldor/caf-scarf-2-h264-960-24.mov ]

19