In this script, we implement the MSEM for the Poisson problem with a manufactured solution in the crazy_mesh.

⭕ To access the source code, click on the [source] button at the right side or click on [Poisson_problem.py]. Dependence may exist. In case of error, check import and install required packages or download required scripts. © mathischeap.com

Poisson_problem.Poisson(K, N, c, save=False)[source]
  • K (int) – We use a crazy mesh of K^3 elements.

  • N (int) – We use mimetic polynomials of degree N.

  • c (float) – The deformation factor of the crazy mesh is c,\ 0\leq c\leq 0.25.

  • save – Bool. If we save the coefficients of the variables.


A tuple of several outputs:

  • The L^2\text{-error} of solution \boldsymbol{u}^h.

  • The H(\mathrm{div})\text{-error} of solution \boldsymbol{u}^h.

  • The L^2\text{-error} of solution \varphi^h.

  • The L^2\text{-error} of the projection, f^h.

  • The L^2\text{-error} of \nabla\cdot\boldsymbol{u}^h+f^h.

  • The L^\infty\text{-error} of \nabla\cdot\boldsymbol{u}^h+f^h.


>>> K = 2
>>> N = 3
>>> c = 0
>>> Poisson(K, N, c) 
L^2-error of u^h:  0.1535...

↩️ Back to Ph.D. thesis complements (ptc).