step10, a FENICS script which uses the Discontinuous Petrov Galerkin (DPG) method to solve a Poisson problem, and repeatedly refines the mesh, guided by DPG error indicators. On each refinement step, cells are ordered by size of the local error estimates, and then enough "top" cells are refined to represent the proportion THETA of the total error estimate. It then plots the decay of the estimated error as a function of the number of mesh elements.
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:
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
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.
The error decay plots:
The mesh plots for case 1:
The mesh plots for case 2:
The mesh plots for case 3:
The mesh plots for case 4: