Capítulo III Pruebas del sistema
3.3 Casos de pruebas para Crear Agenda
fn(u1, u2, . . . , un) = 0.
(4.34)
This nonlinear system can be formulated in vector notation as:
F(u) = 0, (4.35)
where
u= [u1, u2, ..., un]T, is a vector of n unknown values that we are seeking and
F(u) = [f1(u1, u2, ..., un), f2(u1, u2, ..., un), ..., fn(u1, u2, ..., un)]T, (4.36) is a set of nonlinear equations.
Note that, in general, we do not know in advance if a solution for Equation (4.35) exists, and, if it does, whether it is unique. However, we proceed on the assumption that at least one solution does exist and return to multigrid methods in order to search for such a solution.
4.3.2 Nonlinear Multigrid FAS
The linear multigrid scheme, described in Section 4.2.4, can be generalised to nonlinear systems.
In this section, we will be using multigrid methods for solving nonlinear systems of equations
53 4.3. Iterative Methods for Nonlinear Systems
based upon the Full Approximation Scheme (FAS). The first description of FAS was in [19].
Since then, it has been used in many studies and was shown to lead efficiently to the solution of some systems of nonlinear equations (e.g. [16, 17, 145] and many others). FAS seeks to apply the ideas from the linear multigrid iteration and use them directly in a nonlinear multigrid iteration. The general nonlinear Equation (4.35) may also be written in the form:
A (u) = b, (4.37)
where A is nonlinear in the unknown a, and b does not depend on u, and u, b ∈ Rn. Given an estimate v of the solution u, we can define the error e = u− v, as we have defined earlier for a linear system. We start by explaining that the important difference between linear and nonlinear algebraic systems is in the relationship between the residual and the error. In the standard linear multigrid case, the error equation is A e = r and we can determine this error by solving the error equation. Now the residual is r = b− A(v), so when we subtract Equation (4.37) from this residual we obtain,
A(u)− A(v) = r. (4.38)
In general A(e) = A(u− v) 6= r, which means that we cannot solve the simple error equation as we have done in the linear multigrid. Therefore, we must consider Equation (4.38) as a residual equation. We can write Equation (4.37) in the following equivalent form,
A(v + e)− A(v) = r, (4.39)
i.e.
A(v + e) = r + A(v). (4.40)
The idea behind the coarse grid correction part of the Full Approximation Scheme FAS is to approximate Equation (4.40) on a coarser grid. Consequently, in this scheme the coarse grid problem is solved for the full solution, v + e, rather than the error, e, but with a modified right-hand side.
In order to solve the nonlinear problem using FAS, we need to implement (pre or post) nonlinear smoothing as well as the coarse grid correction. We will describe here the nonlinear smoothing first, then we will describe the overall FAS algorithm after that.
We start by smoothing the solution using a few sweeps from a pre-smoother on the fine grid in the FAS algorithm. To do this, we use the nonlinear Jacobi or nonlinear Gauss-Seidel iterations which are described in [28]. An approximation solution vk is updated by using the nonlinear
Chapter 4. Solution Algorithms for Algebraic Systems 54
Jacobi iteration as follows,
vik+1= vki +Fi(vk)
Ji(vk), i = 1, ..., n, (4.41) where the superscripts k + 1 and k are the current and previous iterations of the nonlinear Jacobi iteration, respectively, Ji(vk) is the first derivative of Fi(vk) with respect to vik. For the nonlinear Gauss-Seidel iteration one simply applies the most up-to-date components of v in the evaluation of Fi and Ji on the right-hand side. The smoothing properties of the nonlinear ω-weighted Jacobi and the nonlinear ω- ω-weighted Gauss-Seidel will depend upon the particular nonlinear algebraic discrete system. Consequently, optimal choices for ω cannot be obtained easily but may be estimated after a sequence of numerical experiments. To describe the FAS algorithm, we return to the residual Equation (4.38) and we will use it to obtain the coarse grid correction. We suppose that uL is the exact solution on grid L,
AL(uL) = bL, (4.42)
and that vL is an approximate solution. We now compute the residual on the fine grid as follows:
rL = bL− AL(vL). (4.43)
Then, we restrict both the residual rL and the approximate solution vL from the fine grid to the coarser grid:
rL−1 = ILL−1(rL), (4.44)
vL−1 = ILL−1(vL), (4.45)
using the standard restriction operations [28, 130]. Therefore, the Equation (4.40) is approxi-mated on the coarser grid with the modified right-hand side as follows:
AL−1(vL−1) = bL−1, (4.46)
bL−1 = rL−1+ AL−1(vL−1). (4.47)
If Equation (4.46) is solved for vL−1 then the error approximation eL−1 can be computed on the coarse grid as follows:
eL−1 = vL−1− vL−1. (4.48)
Then we interpolate the error eL−1 from the coarse grid to obtain eL on the fine grid.
eL= IL−1L (eL−1). (4.49)
55 4.3. Iterative Methods for Nonlinear Systems
This gives the correction vector which is applied to the fine grid solution.
vL= vL+ eL. (4.50)
Then we smooth this updated solution with a few sweeps from the post-smoother on the fine grid, see Algorithm 2. The nonlinear multigrid FAS is a popular implementation of a nonlinear multigrid method and has been applied effectively for many systems of nonlinear equations, e.g. [51–53, 62, 74, 96, 109, 116].
We have presented the first of the nonlinear multilevel algorithms, the FAS algorithm, in this subsection. In the following subsection 4.3.3, we will introduce the Newton method which is often used to linearise nonlinear systems, and we will use this as a basis for further algorithms, namely Newton-Multigrid 4.3.3.2 which is a Newton iteration that uses a multigrid solver for each linear solve, and the Newton-Krylov method.
Algorithm 2Nonlinear multigrid (FAS) algorithm for the solution of the nonlinear system.
Function: vL= F ASV cycle(vL, bL, L)
1: Update the solution vL by applying ν1 iterations of the selected smoother on the fine grid (Pre-smoother)
2: Calculate the nonlinear residual rL= bL− AL(vL) .
3: Restrict the residualrL−10 = ILL−1rL on the coarse grid L− 1.
4: Restrict the solution vL−10 = ILL−1vL on the coarse grid L− 1.
5: Calculate the modified right-hand side bL−1 = rL−10 + AL−1(v0L−1) on the coarser grid.
6: if (L− 1 = Lmin) then Solve the problem on the coarsest grid (AL−1(vL−1) = bL−1)
7: else vL−1= F ASV cycle(v0L−1, bL−1, L− 1)
8: Calculate the error approximation eL−1 on the coarse grid eL−1= vL−1− v0L−1.
9: Interpolate the correction equation from coarse grid to the fine grid eL = IL−1L eL−1.
10: Calculate the correction equation to the fine grid vL= vL+ eL.
11: Update the solution vL by applying ν2 iterations of the selected smoother on the fine grid (Post-smoother)