348
11. Efficiency and Accuracy Improvement
It is important to take care that the implementation of boundary conditions also fulfills the consistency requirements. For example, if a symmetry
boundary condition is implemented by setting the boundary value equal to
the value a t the near-boundary node, the restriction operator cannot calculate the boundary value of 6 by interpolating the fine grid boundary values;
it must calculate 6 at all inner nodes and then apply the boundary condition
to it, i.e. set 6 at the symmetry boundary equal to 4 at the near-boundary
nodes. If the boundary condition is applied to 4, then 4' would not be the
same at the boundary and next-to-boundary nodes, and a gradient of 4'
would be passed to the finer grid. Then the solution on the fine grid cannot
be converged beyond a certain limit. A similar situation can occur due to
inconsistencies in treating other boundary conditions, but we shall not list
all the possibilities here. It is important to assure that the iteration errors
can be reduced to machine accuracy (even though this criterion will not be
used when the code is put into production); if this is not possible, something
is wrong!
Other strategies (e.g., W-cycles) may be used for cycling between the
grids. Efficiency may be improved by basing the decision to switch from one
grid to another on the rate of convergence. The simplest choice is the Vcycle described above with a fixed number of iterations on each grid level.
The behavior of the FMG method for the V-cycle with typical numbers of
iterations at each level is schematically shown in Fig. 11.6. The optimum
choice of parameters is problem dependent, but their effect on performance
is not as dramatic as for the single-grid method. Details of multigrid methods
can be found in the book by Hackbusch (1985).
U Converged solution
Prolo\ngation
n Intermediate solution
R e ~ ~ i c t i o n
\ y
-
Fig. 11.6. Schematic presentation of FMG scheme using V-cycles, showing typical
numbers of outer iterations at different stages in one cycle
The multigrid method can be applied to unstructured grids as well as
structured grids. In FV methods, one usually joins fine grid CVs to produce
coarse grid CVs; the number of fine CVs per coarse CV may differ, depending
on the shape of CVs (tetrahedra, pyramids, prisms, hexahedra etc.). The
multigrid idea can even be used if the coarse and fine grids are not related by
11. Efficiency and Accuracy Improvement
It is important to take care that the implementation of boundary conditions also fulfills the consistency requirements. For example, if a symmetry
boundary condition is implemented by setting the boundary value equal to
the value a t the near-boundary node, the restriction operator cannot calculate the boundary value of 6 by interpolating the fine grid boundary values;
it must calculate 6 at all inner nodes and then apply the boundary condition
to it, i.e. set 6 at the symmetry boundary equal to 4 at the near-boundary
nodes. If the boundary condition is applied to 4, then 4' would not be the
same at the boundary and next-to-boundary nodes, and a gradient of 4'
would be passed to the finer grid. Then the solution on the fine grid cannot
be converged beyond a certain limit. A similar situation can occur due to
inconsistencies in treating other boundary conditions, but we shall not list
all the possibilities here. It is important to assure that the iteration errors
can be reduced to machine accuracy (even though this criterion will not be
used when the code is put into production); if this is not possible, something
is wrong!
Other strategies (e.g., W-cycles) may be used for cycling between the
grids. Efficiency may be improved by basing the decision to switch from one
grid to another on the rate of convergence. The simplest choice is the Vcycle described above with a fixed number of iterations on each grid level.
The behavior of the FMG method for the V-cycle with typical numbers of
iterations at each level is schematically shown in Fig. 11.6. The optimum
choice of parameters is problem dependent, but their effect on performance
is not as dramatic as for the single-grid method. Details of multigrid methods
can be found in the book by Hackbusch (1985).
U Converged solution
Prolo\ngation
n Intermediate solution
R e ~ ~ i c t i o n
\ y
-
Fig. 11.6. Schematic presentation of FMG scheme using V-cycles, showing typical
numbers of outer iterations at different stages in one cycle
The multigrid method can be applied to unstructured grids as well as
structured grids. In FV methods, one usually joins fine grid CVs to produce
coarse grid CVs; the number of fine CVs per coarse CV may differ, depending
on the shape of CVs (tetrahedra, pyramids, prisms, hexahedra etc.). The
multigrid idea can even be used if the coarse and fine grids are not related by
