step6, a FENICS code which solves the nonlinear p-Laplacian problem directly.
The p-Laplacian equation has the form
- div kappa(u) grad u = f in Omega = [0,1]x[0,1] u = 0 on dOmegawhere:
kappa(u) = ( epsilon^2 + |grad u|^2) ) ^ ( (p-2)/2 ) = ( epsilon^2 + wx^2 + wy^2 ) ^ ( (p-2)/2 ) epsilon = 1.0E-05 f(x,y) = 2*pi*pi*sin(pi*x) * sin(pi*y)The parameter epsilon artificially keeps kappa(u) bounded above 0, guaranteeing that the power (p-2)/2 is meaningful, and the equation is solvable.
The program relies heavily on the ideas and implementation embodied in Jay Gopalakrishnan's dpg_laplace code.
Note that I have installed FENICS using Docker, and so to run this script I issue the commands:
dpg_bvp, a FENICS script which uses the Discontinuous Petrov Galerkin (DPG) method to solve a boundary value problem over an interval, by Jay Gopalakrishnan.
dpg_laplace, a FENICS script which uses the Discontinuous Petrov Galerkin (DPG) method to solve a Poisson problem over the unit square, by Jay Gopalakrishnan.
dpg_laplace_adapt, a FENICS script which uses the Discontinuous Petrov Galerkin (DPG) method to solve a Poisson problem over the unit square, with adaptivity, by Jay Gopalakrishnan.