Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
JSchoeberl committed Feb 26, 2024
1 parent 186b6f2 commit 2e205f0
Show file tree
Hide file tree
Showing 38 changed files with 1,712 additions and 289 deletions.
28 changes: 14 additions & 14 deletions DG/Nitsche.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions DG/elliptic.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions DG/elliptic_stdDG.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions DG/fourthorder.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions DG/instationary.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions DG/splitting.html
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ <h1><span class="section-number">22. </span>Splitting Methods for the time-depen
</div>
</div>
<div class="cell_output docutils container">
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;ngsolve.comp.LinearForm at 0x1100b2270&gt;
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>&lt;ngsolve.comp.LinearForm at 0x126349030&gt;
</pre></div>
</div>
</div>
Expand Down Expand Up @@ -507,7 +507,7 @@ <h1><span class="section-number">22. </span>Splitting Methods for the time-depen
</div>
</div>
<div class="cell_output docutils container">
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "420abfb6a2ff432bb9b697639a080f52"}</script><div class="output traceback highlight-ipythontb notranslate"><div class="highlight"><pre><span></span><span class="gt">---------------------------------------------------------------------------</span>
<script type="application/vnd.jupyter.widget-view+json">{"version_major": 2, "version_minor": 0, "model_id": "55eeaa0e26694fad847991a1a937aeea"}</script><div class="output traceback highlight-ipythontb notranslate"><div class="highlight"><pre><span></span><span class="gt">---------------------------------------------------------------------------</span>
<span class="ne">KeyboardInterrupt</span><span class="g g-Whitespace"> </span>Traceback (most recent call last)
<span class="n">Cell</span> <span class="n">In</span><span class="p">[</span><span class="mi">4</span><span class="p">],</span> <span class="n">line</span> <span class="mi">15</span>
<span class="g g-Whitespace"> </span><span class="mi">13</span> <span class="k">while</span> <span class="n">t</span> <span class="o">&lt;</span> <span class="n">tend</span><span class="p">:</span>
Expand Down
6 changes: 3 additions & 3 deletions DG/stationary.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions DG/stokes.html

Large diffs are not rendered by default.

135 changes: 87 additions & 48 deletions _sources/abstracttheory/Coercive.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
"A(u,u) \\geq \\alpha_1 \\| u \\|_V^2 \\qquad \\forall \\, u \\in V,\n",
"\\end{equation}\n",
"* and continuous\n",
"\n",
"\\begin{equation}\n",
"A(u,v) \\leq \\alpha_2 \\| u \\|_V \\, \\| v \\|_V \\qquad \\forall \\, u , v \\in V,\n",
"\\end{equation}\n",
"\\end{itemize}\n",
"\n",
"with bounds $\\alpha_1$ and $\\alpha_2$ in ${\\mathbb R}^+$. It is not necessarily symmetric.\n",
"Let $f(.) : V \\rightarrow {\\mathbb R}$ be a continuous linear form on $V$, i.e., \n",
Expand Down Expand Up @@ -78,8 +78,9 @@
]
},
{
"attachments": {},
"cell_type": "markdown",
"id": "e10c25d4-d37f-4d63-86be-c7ce12a01bf7",
"id": "9c0196f8-5315-4bf6-8474-5f2af7184258",
"metadata": {},
"source": [
"Instead of the linear form $f(\\cdot)$, we will often write $f \\in V^\\ast$. The evaluation is written as the duality product \n",
Expand All @@ -88,7 +89,7 @@
"\\left< f , v \\right>_{V^\\ast \\times V} = f(v).\n",
"$$\n",
"\n",
"**Lemma:** A continuous bilinear form $A(\\cdot,\\cdot) : V \\times V \\rightarrow \\setR$\n",
"**Lemma:** A continuous bilinear form $A(\\cdot,\\cdot) : V \\times V \\rightarrow {\\mathbb R}$\n",
"induces a continuous linear operator $A : V \\rightarrow V^\\ast$ via\n",
"\n",
"$$\n",
Expand All @@ -106,95 +107,122 @@
"$$\n",
"Thus, we can define the operator $A : u \\in V \\rightarrow A(u,\\cdot) \\in V^\\ast$. \n",
"It is linear, and its operator norm is bounded by\n",
"\\begin{eqnarray*}\n",
"\\| A \\|_{V \\rightarrow V^\\ast} & = &\n",
"\\begin{align*}\n",
"\\| A \\|_{V \\rightarrow V^\\ast} &= \n",
"\\sup_{u\\in V} \\frac{ \\| A u \\|_{V^\\ast}}{\\| u \\|_V} =\n",
"\\sup_{u\\in V} \\sup_{v \\in V} \\frac{ \\left< A u, v\\right>_{V^\\ast \\times V} } {\\| u \\|_V \\, \\| v \\|_V} \\\\\n",
"& = & \\sup_{u\\in V} \\sup_{v \\in V} \\frac{ A (u,v) } {\\| u \\|_V \\, \\| v \\|_V} \\leq\n",
"&= \\sup_{u\\in V} \\sup_{v \\in V} \\frac{ A (u,v) } {\\| u \\|_V \\, \\| v \\|_V} \\leq\n",
"\\sup_{u\\in V} \\sup_{v\\in V} \\frac{ \\alpha_2 \\| u \\|_V \\| v \\|_V } {\\| u \\|_V \\, \\| v \\|_V} = \\alpha_2.\n",
"\\end{eqnarray*}\n",
"$\\Box$"
"\\end{align*}\n",
"$\\Box$\n",
"\n",
"Using this notation, we can write the variational problem as operator equation: find $u \\in V$ such that\n",
"$$\n",
"A u = f \\qquad (\\mbox{in } V^\\ast).\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "7ee7c92a-a3b7-4548-8ab6-9b3bd734716f",
"id": "491f09d8-8cec-4f28-b601-3bb266624fc7",
"metadata": {},
"source": [
"Using this notation, we can write the variational problem as operator equation: find $u \\in V$ such that\n",
"$$\n",
"A u = f \\qquad (\\mbox{in } V^\\ast).\n",
"$$\n",
"\n",
"\\begin{theorem}[Banach's contraction mapping theorem] Given a Banach space\n",
"**Theorem: (Banach's contraction mapping theorem)** Given a Banach space\n",
"$V$ and a mapping $T : V \\rightarrow V$, satisfying the Lipschitz condition\n",
"\n",
"$$\n",
"\\| T(v_1) - T(v_2) \\| \\leq L \\, \\| v_1 - v_2 \\| \\qquad \\forall \\, v_1, v_2 \\in V\n",
"$$\n",
"\n",
"for a fixed $L \\in [0,1)$. Then there exists a unique $u \\in V$ such that\n",
"\n",
"$$\n",
"u = T(u),\n",
"$$\n",
"\n",
"i.e. the mapping $T$ has a unique fixed point $u$. The iteration $u^1 \\in V$ given, compute\n",
"\n",
"$$\n",
"u^{k+1} := T(u^k)\n",
"$$\n",
"\n",
"converges to $u$ with convergence rate $L$:\n",
"\n",
"$$\n",
"\\| u - u^{k+1} \\| \\leq L \\| u - u^k \\|\n",
"$$\n",
"\\end{theorem}\n",
"\n",
"$$"
]
},
{
"cell_type": "markdown",
"id": "d6a58687-792b-4be3-8a32-7aaff43e68d8",
"metadata": {},
"source": [
"**Theorem:(Lax Milgram)** Given a Hilbert space $V$, a coercive and continuous bilinear form $A(\\cdot,\\cdot)$, and a continuous linear form $f(.)$. Then there exists a unique $u \\in V$ solving\n",
"\n",
"\\begin{theorem}[Lax Milgram] Given a Hilbert space $V$, a coercive and continuous bilinear form $A(\\cdot,\\cdot)$, and a continuous linear form $f(.)$. Then there exists a unique $u \\in V$ solving\n",
"$$\n",
"A(u,v) = f(v) \\qquad \\forall \\, v \\in V.\n",
"$$\n",
"There holds \n",
"\\begin{equation} \\label{equ_lax_milgram_bound}\n",
"\n",
"$$\n",
"\\| u \\|_V \\leq \\alpha_1^{-1} \\| f \\|_{V^\\ast}\n",
"\\end{equation}\n",
"\\end{theorem}\n",
"{\\em Proof:} Start from the operator equation $A u = f$. Let $J_V : V^\\ast \\rightarrow V$ be the Riesz isomorphism defined by\n",
"$$\n",
"\n",
"*Proof:* Start from the operator equation $A u = f$. Let $J_V : V^\\ast \\rightarrow V$ be the Riesz isomorphism defined by\n",
"\n",
"$$\n",
"(J_V g, v)_V = g(v) \\qquad \\forall \\, v \\in V, \\; \\forall \\, g \\in V^\\ast.\n",
"$$\n",
"\n",
"Then the operator equation is equivalent to\n",
"\n",
"$$\n",
"J_V A u = J_V f \\qquad (\\mbox{in } V),\n",
"$$\n",
"and to the fixed point equation (with some $0 \\neq \\tau \\in \\setR$ chosen below)\n",
"\\begin{equation} \\label{equ_fixedpointequ}\n",
"\n",
"and to the fixed point equation (with some $0 \\neq \\tau \\in {\\mathbb R}$ chosen below)\n",
"\n",
"$$\n",
"u = u - \\tau J_V (A u - f).\n",
"\\end{equation}\n",
"$$\n",
"\n",
"We will verify that\n",
"\n",
"$$\n",
"T (v) := v - \\tau J_V (A v - f)\n",
"$$\n",
"\n",
"is a contraction mapping, i.e., $\\| T (v_1) - T (v_2) \\|_V \\leq L \\| v_1 - v_2 \\|_V$ \n",
"with some Lipschitz constant $L \\in [0,1)$.\n",
"Let $v_1, v_2 \\in V$, and set $v = v_1 - v_2$. Then\n",
"\\begin{eqnarray*}\n",
"\n",
"\\begin{align*}\n",
"\\| T (v_1) - T (v_2) \\|_V^2 \n",
"& = & \\| \\{ v_1 - \\tau J_V (A v_1 - f) \\} - \\{ v_2 - \\tau J_V (A v_2 -f) \\} \\|_V^2 \\\\\n",
"& = & \\| v - \\tau J_V A v \\|_V^2 \\\\\n",
"& = & \\| v \\|_V^2 - 2 \\tau (J_V A v, v)_V + \\tau^2 \\| J_V A v \\|_V^2 \\\\\n",
"& = & \\| v \\|_V^2 - 2 \\tau \\left< A v , v \\right> + \\tau^2 \\| A v \\|_{V^\\ast}^2 \\\\\n",
"& = & \\| v \\|_V^2 - 2 \\tau A(v,v) + \\tau^2 \\| A v \\|_{V^\\ast}^2 \\\\\n",
"& \\leq & \\| v \\|_V^2 - 2 \\tau \\alpha_1 \\| v \\|_V^2 + \\tau^2 \\alpha_2^2 \\| v \\|_V^2 \\\\\n",
"& = & (1 - 2 \\tau \\alpha_1 + \\tau^2 \\alpha_2^2) \\| v_1 - v_2 \\|_V^2\n",
"\\end{eqnarray*}\n",
"&= \\| \\{ v_1 - \\tau J_V (A v_1 - f) \\} - \\{ v_2 - \\tau J_V (A v_2 -f) \\} \\|_V^2 \\\\\n",
"&= \\| v - \\tau J_V A v \\|_V^2 \\\\\n",
"&= \\| v \\|_V^2 - 2 \\tau (J_V A v, v)_V + \\tau^2 \\| J_V A v \\|_V^2 \\\\\n",
"&= \\| v \\|_V^2 - 2 \\tau \\left< A v , v \\right> + \\tau^2 \\| A v \\|_{V^\\ast}^2 \\\\\n",
"&= \\| v \\|_V^2 - 2 \\tau A(v,v) + \\tau^2 \\| A v \\|_{V^\\ast}^2 \\\\\n",
"& \\leq \\| v \\|_V^2 - 2 \\tau \\alpha_1 \\| v \\|_V^2 + \\tau^2 \\alpha_2^2 \\| v \\|_V^2 \\\\\n",
"&= (1 - 2 \\tau \\alpha_1 + \\tau^2 \\alpha_2^2) \\| v_1 - v_2 \\|_V^2\n",
"\\end{align*}\n",
"\n",
"Now, we choose $\\tau = \\alpha_1 / \\alpha_2^2$, and obtain a Lipschitz constant\n",
"\n",
"$$\n",
"L^2 = 1 - \\alpha_1^2 / \\alpha_2^2 \\in [0,1).\n",
"$$\n",
"\n",
"Banach's contraction mapping theorem state that (\\ref{equ_fixedpointequ}) \n",
"has a unique fixed point. Finally, we obtain the bound (\\ref{equ_lax_milgram_bound}) from\n",
"\n",
"$$\n",
"\\| u \\|_V^2 \\leq \\alpha_1^{-1} A(u,u) = \\alpha_1^{-1} \\, f(u) \\leq \\alpha_1^{-1} \\| f\\|_{V^\\ast} \\| u \\|_V,\n",
"$$\n",
"\n",
"and dividing by one factor $\\|u\\|$.\n",
"\\hfill $\\Box$"
"$\\Box$"
]
},
{
Expand All @@ -203,11 +231,14 @@
"metadata": {},
"source": [
"## Approximation of coercive variational problems\n",
"\n",
"Now, let $V_h$ be a closed subspace of $V$. We compute the\n",
"approximation $u_h \\in V_h$ by the Galerkin method\n",
"\\begin{equation}\n",
"\n",
"$$\n",
"A(u_h, v_h) = f(v_h) \\qquad \\forall \\, v_h \\in V_h.\n",
"\\end{equation}\n",
"$$\n",
"\n",
"This variational problem is uniquely solvable by Lax-Milgram, \n",
"since, $(V_h,\\|.\\|_V)$ is \n",
"a Hilbert space, and continuity and coercivity on $V_h$ are inherited\n",
Expand All @@ -218,42 +249,50 @@
"up to a constant factor, as good as the best possible approximation in the\n",
"finite dimensional space.\n",
"\n",
"\\begin{theorem}[Cea] The approximation error of the Galerkin method\n",
"**Theorem:(Cea)** The approximation error of the Galerkin method\n",
"is quasi optimal\n",
"\n",
"$$\n",
"\\| u - u_h \\|_V \\leq \\alpha_2 / \\alpha_1 \\inf_{v \\in V_h} \\| u - v_h \\|_V\n",
"$$\n",
"\\end{theorem}\n",
"{\\em Proof:} A fundamental property is the Galerkin orthogonality\n",
"\n",
"*Proof:* A fundamental property is the Galerkin orthogonality\n",
"\n",
"$$\n",
"A(u-u_h, w_h) = A(u,w_h) - A(u_h, w_h) = f(w_h) - f(w_h) = 0\n",
"\\qquad \\forall \\, w_h \\in V_h.\n",
"$$\n",
"\n",
"Now, pick an arbitrary $v_h \\in V_h$, and bound\n",
"\\begin{eqnarray*}\n",
"\\| u - u_h \\|_V^2 & \\leq & \\alpha_1^{-1} A(u-u_h, u-u_h) \\\\\n",
"& = & \\alpha_1^{-1} A(u-u_h, u-v_h) + \\alpha_1^{-1} A(u-u_h, \\underbrace{v_h-u_h}_{\\in V_h}) \\\\\n",
"& \\leq & \\alpha_2 / \\alpha_1 \\, \\| u - u_h \\|_V \\| u - v_h \\|_V.\n",
"\\end{eqnarray*}\n",
"\\begin{align*}\n",
"\\| u - u_h \\|_V^2 & \\leq \\alpha_1^{-1} A(u-u_h, u-u_h) \\\\\n",
"& = \\alpha_1^{-1} A(u-u_h, u-v_h) + \\alpha_1^{-1} A(u-u_h, \\underbrace{v_h-u_h}_{\\in V_h}) \\\\\n",
"& \\leq \\alpha_2 / \\alpha_1 \\, \\| u - u_h \\|_V \\| u - v_h \\|_V.\n",
"\\end{align*}\n",
"\n",
"Divide one factor $\\|u - u_h\\|$. Since $v_h \\in V_h$ was arbitrary, the estimation\n",
"holds true also for the infimum in $V_h$.\n",
"\\hfill $\\Box$\n",
" $\\Box$\n",
"\n",
"\n",
"\\bigskip\n",
"If $A(\\cdot,\\cdot)$ is additionally symmetric, then it is an inner product. In this\n",
"case, the coercivity and continuity properties are equivalent to\n",
"\n",
"$$\n",
"\\alpha_1 \\| u \\|_V^2 \\leq A(u,u) \\leq \\alpha_2 \\, \\| u \\|_V^2\n",
"\\qquad \\forall \\, u \\in V.\n",
"$$\n",
"\n",
"The generated norm $\\|.\\|_A$ is an equivalent norm to $\\|.\\|_V$. In the \n",
"symmetric case, we can use the orthogonal projection with respect to \n",
"$(.,.)_A$ to improve the bounds to\n",
"\n",
"$$\n",
"\\| u - u_h \\|_V^2 \\leq \\alpha_1^{-1} \\| u - u_h \\|_A^2 \\leq\n",
" \\alpha_1^{-1} \\inf_{v_h \\in V_h} \\| u - v_h \\|_A^2 \\leq\n",
" \\alpha_2 / \\alpha_1 \\| u - v_h \\|_V^2.\n",
"$$\n",
"\n",
"The factor in the quasi-optimality estimate is now the square root of the\n",
"general, non-symmetric case."
]
Expand Down
6 changes: 6 additions & 0 deletions _sources/abstracttheory/Untitled.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
Loading

0 comments on commit 2e205f0

Please sign in to comment.