Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JSchoeberl committed Mar 5, 2024
1 parent eab1dff commit 02c4eea
Show file tree
Hide file tree
Showing 12 changed files with 404 additions and 303 deletions.
293 changes: 170 additions & 123 deletions FEM/nonconforming.html

Large diffs are not rendered by default.

155 changes: 89 additions & 66 deletions _sources/FEM/nonconforming.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,80 @@
"cells": [
{
"cell_type": "markdown",
"id": "34132792-ca2c-42c6-9657-d0e3123f38e9",
"id": "4d490ac5-a557-45b3-82a8-a5bc3e6a1f16",
"metadata": {},
"source": [
"\n",
"\n",
"\n",
"# Non-conforming Finite Element Methods\n",
"\\label{sec_nonconforming}\n",
"\n",
"In a conforming finite element method, one chooses a sub-space $V_h \\subset V$, and defines the finite element approximation as\n",
"\n",
"$$\n",
"\\mbox{Find } u_h \\in V_h: \\qquad A(u_h, v_h) = f(v_h) \\qquad \\forall \\, v_h \\in V_{h}\n",
"$$\n",
"For reasons of simpler implementation, or even of higher accuracy, the \n",
"conforming framework is often violated. Examples are:\n",
"\\begin{itemize}\n",
"\\item\n",
"The finite element space $V_h$ is not a sub-space of $V = H^m$. \n",
"* The finite element space $V_h$ is not a sub-space of $V = H^m$. \n",
"Examples are the non-conforming $P^1$ triangle, and the Morley element for\n",
"approximation of $H^2$.\n",
"\\item\n",
"The Dirichlet boundary conditions are interpolated in the boundary vertices.\n",
"\\item\n",
"The curved domain is approximated by straight sided elements\n",
"\\item\n",
"The bilinear-form and the linear-form are approximated by \n",
"* The Dirichlet boundary conditions are interpolated in the boundary vertices.\n",
"* The curved domain is approximated by straight sided elements\n",
"* The bilinear-form and the linear-form are approximated by \n",
"inexact numerical integration\n",
"\\end{itemize}\n",
"\n",
"\\noindent\n",
"The lemmas by Strang are the extension of Cea's lemma to the \n",
"non-conforming setting.\n",
"\n",
"\n",
"\\subsubsection{The First Lemma of Strang}\n",
"non-conforming setting."
]
},
{
"cell_type": "markdown",
"id": "7945cf76-5afd-4b56-b506-d05833e552a6",
"metadata": {},
"source": [
"## The First Lemma of Strang\n",
"In the first step, let $V_h \\subset V$, but the bilinear-form and the linear-form are replaced by mesh-dependent forms \n",
"\n",
"$$\n",
"A_h(.,.): V_h \\times V_h \\rightarrow {\\mathbb R}\n",
"$$ \n",
"and \n",
"\n",
"$$\n",
"f_h(.) : V_h \\rightarrow {\\mathbb R}.\n",
"$$\n",
"We do not assume that $A_h$ and $f_h$ are defined on $V$. \n",
"We assume that the bilinear-forms $A_h$ are uniformly coercive, i.e.,\n",
"there exists an $\\alpha_1$ independent of the mesh-size such that\n",
"\n",
"$$\n",
"A_h (v_h, v_h) \\geq \\alpha_1 \\, \\| v_h \\|_V^2 \\qquad \\forall \\, v_h \\in V_h\n",
"$$\n",
"The finite element problem is defined as \n",
"\n",
"$$\n",
"\\mbox{Find } u_h \\in V_h: \\qquad A_h (u_h, v_h) = f_h (v_h) \\qquad \\forall \\, v_h \\in V_h\n",
"$$\n",
"\n",
"\\begin{lemma}[First Lemma of Strang] Assume that\n",
"\\begin{itemize}\n",
"\\item $A(.,.)$ is continuous on $V$\n",
"\\item $A_h(.,.)$ is uniformly coercive \n",
"\\end{itemize}\n",
"Then there holds\n",
"\\begin{eqnarray*}\n",
"\\| u - u_h \\| & \\preceq & \\inf_{v_h \\in V_h} \\left\\{\n",
" \\| u - v_h \\| + \\sup_{w_h \\in V_h} \\frac{|A(v_h, w_h) - A_h (v_h, w_h)|}{\\| w_h \\|} \\right\\} \\\\\n",
" & & \n",
" + \\sup_{w_h \\in V_h} \\frac{f(w_h) - f_h (w_h)}{\\| w_h \\|}\n",
"\\end{eqnarray*}\n",
"\\end{lemma} \n",
"{\\em Proof:} \n",
"> **First Lemma of Strang:** Assume that\n",
"> * $A(.,.)$ is continuous on $V$\n",
"> * $A_h(.,.)$ is uniformly coercive \n",
"> Then there holds\n",
">\n",
"> \\begin{eqnarray*}\n",
" \\| u - u_h \\| & \\preceq & \\inf_{v_h \\in V_h} \\left\\{\n",
" \\| u - v_h \\| + \\sup_{w_h \\in V_h} \\frac{|A(v_h, w_h) - A_h (v_h, w_h)|}{\\| w_h \\|} \\right\\} \\\\\n",
" & & \n",
" + \\sup_{w_h \\in V_h} \\frac{f(w_h) - f_h (w_h)}{\\| w_h \\|}\n",
" \\end{eqnarray*}\n",
"\n",
"*Proof:*\n",
"Choose an arbitrary $v_h \\in V_h$, and set $w_h := u_h - v_h$.\n",
"We use the uniform coercivity, and the definitions of $u$ and $u_h$:\n",
"\n",
"\\begin{eqnarray*}\n",
"\\alpha_1 \\| u_h - v_h \\|_V^2 & \\leq & A_h (u_h - v_h, u_h - v_h) = A_h (u_h - v_h, w_h) \\\\\n",
" & = & A(u-v_h, w_h) + [ A(v_h, w_h) - A_h(v_h, w_h) ] + [ A_h (u_h, w_h) - A(u, w_h)] \\\\\n",
" & = & A(u-v_h, w_h) + [ A(v_h, w_h) - A_h(v_h, w_h) ] + [ f_h(w_h) - f(w_h)]\n",
" \n",
"\\end{eqnarray*}\n",
"Divide by $\\| u_h - v_h \\| = \\| w_h \\|$, and use the continuity of $A(.,.)$:\n",
"\\begin{equation}\n",
Expand All @@ -83,27 +84,35 @@
"\\end{equation}\n",
"\n",
"Using the triangle inequality, the error $\\| u - u_h \\|$ is bounded by\n",
"\n",
"$$\n",
"\\| u - u_h \\| \\leq \\inf_{v_h \\in V_h} \\| u - v_h \\| + \\| v_h - u_h \\|\n",
"$$\n",
"The combination with (\\ref{equ_strang1a}) proves the result. \n",
"\\hfill $\\Box$\n",
"\n",
"\\bigskip\n",
"\n",
"{\\bf Example:} Lumping of the $L_2$ bilinear-form: \\newline\n",
"\\hfill $\\Box$"
]
},
{
"cell_type": "markdown",
"id": "c31c0159-43e7-435f-a33a-c2a7ef9d96c9",
"metadata": {},
"source": [
"**Example:** Lumping of the $L_2$ bilinear-form: \\newline\n",
"Define the $H^1$ - bilinear-form\n",
"\n",
"$$\n",
"A(u,v) = \\int_\\Omega \\nabla u \\cdot \\nabla v + \\int_\\Omega u v \\, dx,\n",
"$$\n",
"and perform Galerkin discretization with $P^1$ triangles.\n",
"The second term leads to a non-diagonal matrix. \n",
"The vertex integration rule\n",
"\n",
"$$\n",
"\\int_T v \\, dx \\approx \\frac{|T|}{3} \\sum_{\\alpha = 1}^3 v(x_{T,\\alpha})\n",
"$$\n",
"is exact for $v \\in P^1$. We apply this integration rule for the term\n",
"$\\int u v \\, dx$:\n",
"\n",
"$$\n",
"A_h(u,v) = \\int \\nabla u \\cdot \\nabla v + \n",
"\\sum_{T \\in {\\cal T}} \\frac{|T|}{3} \\sum_{\\alpha = 1}^3 u(x_{T,\\alpha}) v(x_{T,\\alpha})\n",
Expand All @@ -113,6 +122,7 @@
"\n",
"Inserting the nodal basis $\\varphi_i$, we obtain a diagonal matrix for\n",
"the second term:\n",
"\n",
"$$\n",
"\\varphi_i (x_{T,\\alpha}) \\varphi_j (x_{T,\\alpha}) = \n",
" \\left\\{ \\begin{array}{cl}\n",
Expand All @@ -123,19 +133,22 @@
"$$\n",
"\n",
"To apply the first lemma of Strang, we have to verify the uniform coercivity\n",
"\n",
"\\begin{equation}\n",
"\\label{equ_uniformell}\n",
"\\sum_T \\frac{|T|}{3} \\sum_{\\alpha = 1}^3 |v_h(x_{T,\\alpha})|^2 \\geq \n",
"\\alpha_1 \\sum_T \\int_T | v_h |^2 \\, dx \\qquad \\forall \\, v_h \\in V_h,\n",
"\\end{equation}\n",
"which is done by transformation to the reference element.\n",
"The consistency error can be estimated by\n",
"\n",
"\\begin{equation}\n",
"\\label{equ_consist}\n",
"| \\int_T u_h v_h \\, dx - \\frac{|T|}{3} \\sum_{\\alpha=1}^3 u_h(x_\\alpha) v_h(x_\\alpha) |\n",
" \\preceq h_T^2 \\, \\| \\nabla u_h \\|_{L_2(T)} \\, \\| \\nabla v_h \\|_{L_2(T)}\n",
"\\end{equation}\n",
"Summation over the elements give\n",
"\n",
"$$\n",
"A(u_h, v_h) - A_h (u_h, v_h) \\preceq h^2 \\| u_h \\|_{H^1(\\Omega)} \\, \\| v_h \\|_{H^1(\\Omega)}\n",
"$$\n",
Expand All @@ -157,25 +170,31 @@
"\\item In explicit time integration methods for parabolic or hyperbolic\n",
"problems, one has to solve linear equations with the $L_2$-matrix. This\n",
"becomes cheap for diagonal matrices.\n",
"\\end{itemize}\n",
"\n",
"\\subsubsection{The Second Lemma of Strang}\n",
"\\end{itemize}"
]
},
{
"cell_type": "markdown",
"id": "48356664-175d-4ad9-99a0-f0a958dde04a",
"metadata": {},
"source": [
"## The Second Lemma of Strang\n",
"\n",
"In the following, we will also skip the requirement $V_h \\subset V$. \n",
"Thus, the norm $\\|.\\|_V$ cannot be used on $V_h$, and it will be replaced by\n",
"mesh-dependent norms $\\|.\\|_h$. These norms must be defined for $V + V_h$.\n",
"As well, the mesh-dependent forms $A_h(.,.)$ and $f_h(.)$ are defined \n",
"on $V + V_h$. We assume \n",
"\\begin{itemize}\n",
"\\item uniform coercivity:\n",
"$$\n",
"A_h (v_h, v_h) \\geq \\alpha_1 \\| v_h \\|_h^2 \\qquad \\forall \\, v_h \\in V_h\n",
"$$\n",
"\\item continuity:\n",
"$$\n",
"A_h (u, v_h) \\leq \\alpha_2 \\| u \\|_h \\| v_h \\|_h \\qquad \\forall \\, u \\in V + V_h, \\; \\forall \\, v_h \\in V_h\n",
"$$\n",
"\\end{itemize}\n",
"* uniform coercivity:\n",
" \n",
" $$\n",
" A_h (v_h, v_h) \\geq \\alpha_1 \\| v_h \\|_h^2 \\qquad \\forall \\, v_h \\in V_h\n",
" $$\n",
"* continuity:\n",
"\n",
" $$\n",
" A_h (u, v_h) \\leq \\alpha_2 \\| u \\|_h \\| v_h \\|_h \\qquad \\forall \\, u \\in V + V_h, \\; \\forall \\, v_h \\in V_h\n",
" $$\n",
"\n",
"The error can now be measured only in the discrete norm $\\| u - u_h \\|_{V_h}$.\n",
"\\begin{lemma}\n",
Expand All @@ -186,7 +205,8 @@
" \\sup_{w_h \\in V_h} \\frac{| A_h(u,w_h) - f_h(w_h) |}{\\| w_h \\|_h}\n",
"\\end{equation}\n",
"\\end{lemma}\n",
"{\\em Remark}: The first term in (\\ref{equ_strang2}) is the approximation\n",
"\n",
"*Remark:* The first term in (\\ref{equ_strang2}) is the approximation\n",
"error, the second one is called consistency error. \\\\\n",
"{\\em Proof:} Let $v_h \\in V_h$. Again, set $w_h = u_h - v_h$, and\n",
"use the $V_h$-coercivity:\n",
Expand All @@ -198,27 +218,35 @@
"$$\n",
"\\| u_h - v_h \\|_h \\preceq \\| u - v_h \\|_h + \\frac{A_h(u,w_h) - f_h(w_h)}{\\| w_h \\|_h}\n",
"$$\n",
"The rest follows from the triangle inequality. \\hfill $\\Box$\n",
"\n",
"\n",
"\\subsubsection{The non-conforming $P^1$ triangle}\n",
"The rest follows from the triangle inequality. \\hfill $\\Box$"
]
},
{
"cell_type": "markdown",
"id": "c322eeec-0d23-4bb8-838e-a379714ec359",
"metadata": {},
"source": [
"### The non-conforming $P^1$ triangle}\n",
"\n",
"The non-conforming $P^1$ triangle is also called the Crouzeix-Raviart element.\n",
"\n",
"The finite element space generated by the non-conforming $P^1$ element\n",
"is\n",
"\n",
"$$\n",
"V_h^{nc} := \\{ v \\in L_2 : v_{|T} \\in P^1(T), \\mbox{and }v \\mbox{ is continuous in edge mid-points} \\}\n",
"$$\n",
"\n",
"The functions in $V_h^{nc}$ are not continuous across edges, and thus, \n",
"$V_h^{nc}$ is not a sub-space of $H^1$. We have to extend the bilinear-form and\n",
"the norm in the following way:\n",
"\n",
"$$\n",
"A_h (u,v) = \\sum_{T \\in {\\cal T}} \\int_T \\nabla u \\nabla v \\, dx\n",
" \\qquad \\forall \\, u, v \\in V + V_h^{nc}\n",
"$$\n",
"and\n",
"\n",
"$$\n",
"\\| v \\|_h^2 := \\sum_{T \\in {\\cal T}} \\| \\nabla v \\|_{L_2(T)}^2 \\qquad \\forall \\, v \\in V + V_h^{nc}\n",
"$$\n",
Expand Down Expand Up @@ -312,17 +340,12 @@
"\n",
"There are several applications where the non-conforming $P^1$ triangle\n",
"is of advantage:\n",
"\\begin{itemize}\n",
"\\item\n",
"The $L_2$ matrix is diagonal (exercises)\n",
"\\item\n",
"It can be used for the approximation of problems in fluid dynamics\n",
"* The $L_2$ matrix is diagonal (exercises)\n",
"* It can be used for the approximation of problems in fluid dynamics\n",
"described by the Navier Stokes equations (see later).\n",
"\\item\n",
"The finite element matrix has exactly 5 non-zero entries in each row\n",
"* The finite element matrix has exactly 5 non-zero entries in each row\n",
"associated with inner edges. That allows simplifications in the matrix\n",
"generation code.\n",
"\\end{itemize}"
"generation code."
]
},
{
Expand Down
2 changes: 2 additions & 0 deletions _sources/sobolevspaces/SobolevSpaces.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@
"\n",
"\n",
"The case $W_2^k$ is special, it is a Hilbert space. We denote it by\n",
"\n",
"$$\n",
"H^k(\\Omega) := W_2^k(\\Omega).\n",
"$$\n",
"The inner product is \n",
"\n",
"$$\n",
"(u,v)_{H^k} := \\sum_{|\\alpha| \\leq k} (D^\\alpha u, D^\\alpha v)_{L_2}\n",
"$$\n",
Expand Down
Loading

0 comments on commit 02c4eea

Please sign in to comment.