Lect10-Sources

Lect10-Sources - CS 267: Applications of Parallel Computers...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
09/26/2002 CS267 1 CS 267: Applications of Parallel Computers Lecture 10: Sources of Parallelism and Locality in Simulation - 2 Horst D. Simon http://www.cs.berkeley.edu/~strive/cs267
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
09/26/2002 CS267 – Lecture 10 2 Recap of Last Lecture Real world problems have parallelism and locality Four kinds of simulations: • Discrete event simulations Particle systems • Lumped variables with continuous parameters, ODEs Continuous variables with continuous parameters, PDEs General observations: Locality and load balance often work against each other • Graph partitioning arose in different contexts as an approach Sparse matrices are important in several of these problems • Sparse matrix-vector multiplication, in particular
Background image of page 2
09/26/2002 CS267 3 Partial Differential Equations PDEs
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
09/26/2002 CS267 – Lecture 10 4 Continuous Variables, Continuous Parameters Examples of such systems include Parabolic (time-dependent) problems: • Heat flow: Temperature(position, time) Diffusion: Concentration(position, time) Elliptic (steady state) problems: Electrostatic or Gravitational Potential: Potential(position) Hyperbolic problems (waves): • Quantum mechanics: Wave-function(position,time) Many problems combine features of above Fluid flow: Velocity,Pressure,Density(position,time) Elasticity: Stress,Strain(position,time)
Background image of page 4
09/26/2002 CS267 – Lecture 10 5 Terminology Term hyperbolic, parabolic, elliptic, come from special cases of the general form of a second order linear PDE a*d 2 u/dx + b*d 2 u/dxdy + c*d 2 u/dy 2 + d*du/dx + e*du/dy + f = 0 where y is time Analog to solutions of general quadratic equation a*x 2 + b*xy + c*y 2 + d*x + e*y + f Backup slide: currently hidden.
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
09/26/2002 CS267 – Lecture 10 6 Example: Deriving the Heat Equation 0 1 x x+h Consider a simple problem A bar of uniform material, insulated except at ends Let u(x,t) be the temperature at position x at time t Heat travels from x-h  to x+h at rate proportional to: As   0 , we get the heat equation: d u(x,t)            (u(x-h,t)-u(x,t))/h - (u(x,t)- u(x+h,t))/h     dt                                                  h = C * d u(x,t)           d 2  u(x,t)     dt                  dx 2 = C * x-h
Background image of page 6
09/26/2002 CS267 – Lecture 10 7 Details of the Explicit Method for Heat From experimentation (physical observation) we have:      δ u(x,t) / t = 2 u(x,t)/ x (assume C = 1 for simplicity) Discretize time and space and use explicit approach (as described for ODEs) to approximate derivative: (u(x,t+1) – u(x,t))/dt = (u(x-h,t) – 2*u(x,t) + u(x+h,t))/h 2 u(x,t+1) – u(x,t)) = dt/h 2 * (u(x-h,t) - 2*u(x,t) + u(x+h,t)) u(x,t+1) = u(x,t)+ dt/h 2 *(u(x-h,t) – 2*u(x,t) + u(x+h,t)) Let z = dt/h 2 u(x,t+1) = z* u(x-h,t) + (1-2z)*u(x,t) + z+u(x+h,t) By changing variables (x to j and y to i): u[j,i+1]= z*u[j-1,i]+ (1-2*z)*u[j,i]+ z*u[j+1,i]
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/26/2010 for the course AERO 16.910 taught by Professor Daniel during the Spring '10 term at MIT.

Page1 / 32

Lect10-Sources - CS 267: Applications of Parallel Computers...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online