Skip to content

Repository files navigation

Anisotropic mesh adaptation for the Poisson equation

The goal of the code is to solve the Poisson equation

$$ \begin{cases} -\Delta u &= f, \text{ in } \Omega,\\ u &= g, \text{ on } \partial \Omega. \end{cases} $$

using the finite element method, with anisotropic mesh adaptation, in a (yet) two dimensional domain $\Omega\subset\mathbb R^2$. The methods used in this code are described in Picasso, 20031 and Dubuis, 20192. The main novelty of this code is the use of the open source softwares Fenicsx3 and mmg4. The code also allows to use $\mathbb P^2$ finite elements, using Naga-Zhang post-processing5. We provide a list of the file in this repository and what they contain.

  • adaptive_algorithm.py : contains the class Params used to as an input of the adaptive solver solver_adapt.
  • compute_error.py : gives the compute_error function, which computes the error between a finite element solution and a given known solution $u$.
  • estimators.py : Contains the implementation of the anisotropic residual based a posteriori estimators that are used to drive the mesh adaptation. Contains also many functions used for the mesh adaptation, as well as the call to mmg.
  • mesh_functions.py : Auxiliary functions used for the post-processing in ZienkiewiczZhu.py, NagaZhang_P1.py and NagaZhang_P2.py.
  • NagaZhang_P1.py, NagaZhang_P2.py : Naga-Zhang post-processing5 of the gradient, for $\mathbb P^1$ or $\mathbb P^2$ finite elements.
  • read_functions.py : A file that contains functions to read the data saved from the folder.
  • run_solver.py : An example run of the adaptive algorithm, on the function (citer George).
  • solver.py : A simple solver of the Poisson equation using Fenicsx3.
  • ZienkiewiczZhu.py : Python implementation of the Zienkiewicz-Zhu post-processing method6 for $\mathbb P^1$ finite elements.

Footnotes

  1. An Anisotropic Error Indicator Based on Zienkiewicz--Zhu Error Estimator: Application to Elliptic and Parabolic Problems

  2. Adaptive algorithms for two fluids flows with anisotropic finite elements and order two time discretizations

  3. dolfinx 2

  4. mmg

  5. A New Finite Element Gradient Recovery Method: Superconvergence Property, A Posteriori Error Estimates Based on the Polynomial Preserving Recovery, The polynomial-preserving recovery for higher order finite element methods in 2D and 3D 2

  6. The superconvergent patch recovery and a posteriori error estimates. Part 1: The recovery technique, The superconvergent patch recovery and a posteriori error estimates. Part 2: Error estimates and adaptivity

About

Anisotropic mesh adaptation for the Poisson equation

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages