Multigrid Algorithm: procedure MG(level, A, u, f)
if level = coarsest then
- solve coarsest grid equation by another method “exactly”
else
- smooth Alevel u = f (m1 times)
- Compute residual r = f - Alevel u
- Restrict F = R r ( R is Restriction Operator)
- Call MG( level + 1, A(level+1), V, F) (mc times)
- Interpolate v = P V (Interpolate new solution at this level)
- correct unew = u + v
- smooth Aunew = f (m2 times) and
- set u = unew
Alevel v = r = f - Alevel u