project
The purpose of this project is to implement Newton's method and FAS for solving the nonlinear elliptic equation. The example is the nonlinear Poisson-Boltzmann equation for the potential u corresponding to a given charge density reads
for , and
For and , an exact solution in 1-d is given by
We consider a 2-d problem on the unit square . Let
. We choose appropriate , and such that
the exact solution is
Given a current approximation , derive the linearized Poisson Boltzmann equation (LPBE) at .
Assemble the matrix equation for the LPBE. Besides the matrix of Laplacian operator, you need to compute the mass matrix corresponding to the L2 inner product. You can use three vertices quadrature rule i.e.
Then the mass matrix becomes diagonal. This is known as mass lumping.
Use the direct solver to solve the matrix equation.
Use a multigrid solver (e.g. amg) to solve the matrix equation. You can use your own multigrid methods or call amg (or mg) in ifem.
Implement the Newton's method. Control the relative error of the residual in the stopping criteria.
Change the tolerance or max iteration steps in multigrid solver and collect a table of total iteration steps and cpu time for different choices of inner iteration.
Uniform refine the grid several times and list the iteration steps to reach for different and compute the approximation error in norm.
Apply Newton's method in step 2 to to obtain a solution .
Prolongate to a fine space with . Use the prolongation matrix in the Multigrid project; see projectMG.
Solve one fixed iteration or one Newton's iteration in the fine grid
Change from to and show the error in norm.
Implement the nonlinear Gauss-Seidel (NGS) smoother. Keep runing the NGS iteration to test the convergence. The 1-D nonlinear problem is better understood by the finite difference discretization. To adapte to finite element discretization, simply change the mass matrix.
Test two level version of FAS. You can use the restriction operato in MG project for the restriction of residual. But the restriction of the function is simply a nodal interpolation
u_c = u_f(coarseNodeFineIdx)
Change two level FAS to V-cycle FAS by recrusion.
Compare the convergence and computational cost of FAS with Newton's method and Two-Grid method.