Docsity

Efficiency: Full vs Sparse Implementations & Temperature Field Plotting in Computational M, Assignments of Engineering

Toggle sidebar
bg1
AOE/ESM 2074
Introduction to Computational Methods
H.W. Set 10
due 6 December 2001
1. Read Chapter 7 in the Chapman text.
2. Run the heat demo codes from class to compare the relative efficiency of full and sparse
implementations. Alter the codes to eliminate the plotting feature (and so compare
only the calculation times). Run each code for n=10,50,100,200,400 and use the
tic; toc; commands from Matlab to produce timing information. Plot the reported
time for each code at each value of n. Discuss the results.
3. A desired two-dimensional temperature field is described by the expression
T(x)=exp−1
2(x −µ)P−1(x −µ)
where x =(x1,x
2) is the position vector, while the vector µ =(µ1,µ
2), and the 2 ×2
matrix Pare specified.
Construct a surface plot and a contour plot for the case with
µ =(1,2),and P=21
14
.
1

Partial preview of the text

Download Efficiency: Full vs Sparse Implementations & Temperature Field Plotting in Computational M and more Assignments Engineering in PDF only on Docsity!

AOE/ESM 2074

Introduction to Computational Methods

H.W. Set 10

due 6 December 2001

  1. Read Chapter 7 in the Chapman text.
  2. Run the heat demo codes from class to compare the relative efficiency of full and sparse implementations. Alter the codes to eliminate the plotting feature (and so compare only the calculation times). Run each code for n = 10, 50 , 100 , 200 , 400 and use the tic; toc; commands from Matlab to produce timing information. Plot the reported time for each code at each value of n. Discuss the results.
  3. A desired two-dimensional temperature field is described by the expression

T (x) = exp

[ −

(x − μ)′^ P −^1 (x − μ)

]

where x = (x 1 , x 2 ) is the position vector, while the vector μ = (μ 1 , μ 2 ), and the 2 × 2 matrix P are specified. Construct a surface plot and a contour plot for the case with

μ = (1, 2), and P =

( 2 1 1 4

) .