Algebraic Multigrid (AMG) Kent-Andre Mardal and Bjørn Fredrik Nielsen

advertisement
Algebraic Multigrid (AMG)
Kent-Andre Mardal
and
Bjørn Fredrik Nielsen
(Ch. 8 in Briggs, Henson & McCormick)
AMG Recap
Standard smoothers are used.
We need to deal with smooth errors somehow.
No coarse grid, but we will still use "coarse grid"
matrices.
The algebraic smooth error is the error that the
smoother is not able to reduce,
This leads to
.)
Smooth errors have relatively small residuals!
(This is natural, since A is a discretization of
Interpolation operator
Given a set C of coarse nodes, then an interpolation
operator can be made.
This interpolation operator can also be used to define
a restriction operator,
In geometric multigrid (GMG) we have a similar
relation.
Galerkin Property
When the interpolation operator is defined, the Galerkin
property gives the coarse matrix
(This can also be done in GMG.)
Conclusion
All that is needed to employ AMG is a criterion to
determine the coarse grid nodes.
Everything else is "similar" to GMG.
Our task
Out task is to find a set C of coarse nodes that
1. is able to represent smooth functions,
2. is as small as possible.
To be more precise on point 2, we introduce the concept
"grid complexity".
Grid Complexity
Definition 1 Grid complexity is the total number of
divided by the number of
nodes on all grid levels
.
nodes on the finest grid ,
The number of operations needed by the smoothers,
the restrictions and the prolongations are propotional
to the total number of nodes.
Hence, we estimate the number of aritmetic
operations relative to number of nodes in the fine
grid.
Grid Complexity II
Why does multigrid only require
?
In GMG the grid complexity is determined by the grids.
We have the following estimates:
1D:
2D:
operation.
Hence, one V-cycle is an
3D:
Grid Complexity II
We need some kind of criteria that will remove
of the unknowns associated with a matrix.
The complexity will then be
Moreover, the nodes in the coarse grid should be able to
represent "algebraic smooth functions".
Definitions
is the set of points that strongly influence .
We need to define two sets to make an algorithm to select
coarse nodes.
is the set of points that strongly depend on .
(will be used a little later)
Criteria
For each -point , every point
that
strongly influence either should be in the coarse
or should strongly depend on at
interpolary set
least on point in .
Ensure that smooth components are represented.
The set of coarse points should be a maximal
point
subset of all points with the property that no
point.
strongly depends on another
Make sure that the coarse grid is as small as
possible.
and
,
,
is connected with an edge if
matrix with
The verticies in the graf are the unknowns
Figure 1: Graf of a
u3
and
Utility: Graf
A usefull concept is the graf of a (symmetric) matrix. A
graf is used to represent a set of unknowns and its
connections.
.
.
u1
u2
u4
as the only zero elements.
Utility: Graf II
4
6
1
2
3
Figure 2: Graf of the matrix.
Nonzero elements that satisfy a
, appear in the graf.
criteria, e.g.,
Nonzero elements that does not
, does not
satisfy a criteria, e.g.,
appear in the graf.
zero elements
5
7
Information from the Graf
Node 1 has 4 strong connections, 3, 4, 6 and 7 .
Node 2 has 3 strong connections, 3, 6 and 7.
Node 3 has 3 strong connections, 1, 2 and 6.
Node 4 has 2 strong connections, 1 and 5.
Node 5 has 3 strong connections, 4, 6 and 7.
Node 6 has 5 strong connections, 1, 2, 3, 5 and 7 .
Node 7 has 4 strong connections, 1, 2, 5 and 6.
Any of these nodes can be chosen as a coarse node!
Once one of them is chosen, the strong connections are marked as fine
nodes. Hence, there are many possible choices of coarse nodes.
A choice
6 is chosen as the first coarse node.
1, 2, 3, 5 and 7 are marked as fine nodes.
4 is marked as a coarse node.
This results in 2 coarse nodes!
Another choice
4 is chosen as the first coarse node.
1 and 5 are marked as fine nodes.
3 is marked as a coarse node.
2 and 6 are marked as fine nodes.
7 is marked as a coarse node.
This results in 3 coarse nodes!
Criteria for choosing coarse nodes
The node with the most strong connections is chosen as a coarse
node!
The fine nodes are marked.
Then the node among the remaining with the most strong connections
are chosen.
This might seem as a good strategy, but in general most of the nodes have
the same number of strong connections.
Uniform distribution
Lets consider a 1D example of a grid.
Many possible selections of coarse nodes are possible!
C1
C3
C5
C7 C8
C6
C4
C2
Figure 3: One choice.
One choice of coarse grid elements leads to coarse nodes next to
each other.
C1
C2
C3
C4
C5
C6
C7
Figure 4: Another choice.
While another choice does not.
A counter
We introduce a counter
that initally contains the number of strong
connections to . Hence,
.
.
.
.
.
.
.
The next step is to use this counter to choose the nodes in a structured pat-
tern.
Uniforms distribution II
A simple strategy to avoid clustering of coarse nodes is:
are marked as fine nodes.
, where
3. The counter in the nodes of the sets
one.
in
is chosen as a coarse node.
2. All nodes
1. The node with highest
, is increased by
4. If there are any unmarked nodes, then go to 1.
Back to the example
6 is chosen as the first coarse node.
1, 2, 3, 5 and 7 are marked as fine nodes.
The counter in the strong connections of 1, 2, 3, 5 and 7 are increased
by one.
is increased by 1.
Hence, the
is set as a coarse node.
The node (4) with the larges
Applications
Now we have developed all the utilities to employ AMG!
How does it work in practice ?
It is "impossible" to understand this from the theory!
In Briggs et. al there is an example with a nine-point Laplacian. We now
consider this example.
Poisson problem
The picture shows the selection of
the coarse nodes for a nine-point
Laplacian. The upper left picture is
the inital fine grid and the lower right
shows the final selection. Coarse
nodes are black, fine nodes are
white, potensial coarse nodes are
grey and potensial fine nodes are
white with a black border.
Figure 5: Coarse grid.
Poisson problem II
The "coarse grid" is the same as in GMG.
AMG will work, because GMG does.
The coarse node selection algorithm has chosen a "good" set of
nodes.
Anisotropic diffusion equation
Let us consider the anisotropic diffusion equation,
Standard multigrid does not work! We must use either
semi-coarsening,
line-smoothing,
RILU smoothing.
Anisotropic diffusion equation.
Figure 6: Coarse grid.
The left picture shows the fine nodes. The right picture shows the selection of
coarse (black) nodes.
Semi-coarsening
AMG automatically produces semi-coarsening!
AMG will work, because GMG does.
The coarse node selection algorithm has chosen a "good" set of
nodes.
AMG vs. GMG
The solution fase is the same as in GMG.
AMG require a costly setup fase, therefore AMG is slower than AMG.
The setup fase is usually comparable to the solution fase.
AMG seems slightly more roboust.
AMG don’t need a hierarchy of grids, it builds up a hierarchy of coarse
matrices based on a property of the smoother!
AMG is probably the most active research area in the MG community.
Software
Diffpack does not support AMG (yet). However, some AMG codes can be
found on the multigrid resource on the web, www.mgnet.org.
GMD contains the original AMG1R5 (F77) code. This is probably a
good start.
Many other packages, both GMG and AMG.
Download