Tom Blaylock CPS615

Assignments 4 & 5

Solving the Wave Function in MPI

Solving the wave equation as described in Chapter 5 of Fox et al., 1988, Solving Problems on Concurrent Processors was conducted using C(Assignment4) and Java(Assignment5) and MPI.

The problem of a vibrating string which has fixed end points was considered. The time dependent motion of the string is represented by the partial differential equation:

We assumed that the string stretches over the interval from 0 to 1 in the x direction, and that the ends are anchored at amplitude 0. To solve this problem numerically, we choose uniform intervals delta x and delta t, of space and time. Then for each point i along the x direction, we can derive a scheme for computing the value of the amplitude at each time step. This assumes that we are computing the value at a new time step(t+delta t)(called t+1) where we already know the values at the current time step t and the previous time step(t-delta t)(called t-1):

The number of points N in the discretization of the x direction is chosen. Time units were chosen so that delta t =1. The constant c was also set to 1. Global left and right endpoints were fixed at psi=0.

Test programs are located in my subdirectory Projects_Assnmts on the VPL system along with test output(Assignment4.txt, Assignment5.txt).