{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lect10-Sources

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

This preview shows pages 1–9. Sign up to view the full content.

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

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

View Full Document
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
09/26/2002 CS267 3 Partial Differential Equations PDEs

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

View Full Document
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)
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.

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

View Full Document
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
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]

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

View Full Document
09/26/2002 CS267 – Lecture 10 8 Explicit Solution of the Heat Equation Use finite differences with u[j,i] as the heat at time   t= i*dt  ( i = 0,1,2 ,…)
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}