Download presentation
Presentation is loading. Please wait.
1
Computational Physics Dr. Guy Tel-Zur Home Assignment Number 2
2
Parallel Solver for the 1D Wave Equation One-Way, 1-D Wave, Equation (Advection): Initial Condition: Courant Number, r=c t/ x Verify 0<r<1
3
Explicit finite difference schemes for first order 1-D wave equation
4
Part 1: Solve using Forward Euler (FWU) Scheme Part 2: Solve using Upwind (UPW) Scheme Use: c = 0.5, x=0.04, t=0.02
5
Continued: Initial Condition: x range: -2 ≤ x ≤ 2 Boundary Conditions: U(-2,t)=0, U(2,t)=1
6
The Computational Model
7
Instructions Solve the 1D Wave Equation in Parallel Use a SPMD model in C using MPI Use a Master-Workers model The entire amplitude array is partitioned and distributed as sub-arrays to all tasks. Each task owns a portion of the total array. Decide about the number of Parallel Tasks Use Point-to-Point and Collective MPI commands as needed
8
Which of the Schemes behave nicer? Comment on the #Tasks vs. Running time (Computation to communication ratio) Submit plots of the solution, u(x,t), at: t=0, t=1 and t=2 Submit EXE#2 to gtelzur@gmail.com Due: Two weeks from today
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.