In this example, we solve the Poisson equation
in
, where
is given in Figure
.
The boundary conditions are u=0 on the inner circle and
on the outer circle. Since this is a linear
problem with no parameter dependence, it does not make use of the
continuation options in PLTMG, and it does not require the
solution of nonlinear algebraic equations.
The description of
was provided as a skeleton consisting of
24 subregions.
Thus we must begin by calling TRIGEN to generate a triangulation.
The use of so many subregions in the skeleton was unnecessary to
define such a simple domain, but we created this skeleton to
illustrate some features of TRIGEN.
In particular, the 24 subregions can be grouped into three sets of
eight similar subregions.
In defining the skeleton input, we specified that similar regions should
be triangulated in a similar fashion. The resulting
triangulation produced by TRIGEN is shown in Figure
.
The triangulation has 224 vertices and 408 triangles.
Options in INPLT were set such that in the skeleton, each
subregion is given its own color, while in the triangulation, regions that
share the same (user specified) label are given the same color.
Using this triangulation, we next call PLTMG
to solve the problem on the initial mesh.
We then adaptively refine the mesh through a
call to TRIGEN with IADAPT=1 and NVTRGT=540.
Next we solve the problem on the refined mesh using PLTMG.
We continue the adaptive refinement process with a call to TRIGEN with
IADAPT=1, NVTRGT=1100.
We then solve this problem using PLTMG, and then call TRIGEN once
more, this time only to compute an a posteriori error estimate for the
current solution.
In Figure
, we illustrate the error and the
solution on the mesh with NVF=1100 using two calls to TRIPLT.
Finally, we call GPHPLT to provide some data about the
state of the calculation. The result is shown in Figure
.
On the left are log-log plots of the relative error in
and
norms, as a function of the number of vertices.
In the top middle is a plot of the logarithms of the Newton residual and
search direction as a function of iteration number.
The hierarchical basis multigrid method was used to solve the large
sparse linear systems of equations arising in the calculation.
Its convergence history for the last Newton step is shown in the lower middle
of Figure
. Finally, a bar graph showing the
execution time of PLTMG as a function of the major subroutines
it calls is shown in the lower right corner. A complete description of
GPHPLT and its options is given in Section
.