Parallel Implementation
Basic idea:
- break domain [a,b] into P subdomains
- each process calculates the integral of f over its subdomain
- integral over [a,b] = sum of the P individual contributions
-
Each process needs:
- the number of processes, P
- its rank
- the interval bounds a,b
- the number of subintervals, n
Assume that n is evenly divisible by P
First pass hardwire a,b,n and f(x)