Irregular Mesh: OpenMP Partitioning
Flux computations are data-parallel
- flux = (x(iedge(i,1))-x(iedge(i,2)))/2
- Independent because edge_val ? node_val
Node updates are nearly data-parallel
- x(iedge(i,1)) = x(iedge(i,1)) - flux(i);
- Not truly independent because sometimes iedge(iY,1) = iedge(iX,2)
- But ATOMIC supports updates using associative operators
Error check is a reduction
- err = err + flux(i)*flux(i)
- REDUCTION class for variables