Skip to content

Commit 9d52627

Browse files
committed
Add fix from #253 + some other typs in that text. (#256)
1 parent 63c5cde commit 9d52627

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

chapter3/robin_neumann_dirichlet.ipynb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,17 @@
4646
"-\\int_{\\Omega}\\nabla \\cdot (\\kappa \\nabla u)v ~\\mathrm{d} x = \\int_{\\Omega}\\kappa \\nabla u\\cdot \\nabla v~\\mathrm{d} x - \\int_{\\partial\\Omega}\\kappa \\frac{\\partial u}{\\partial n} v ~\\mathrm{d} s.\n",
4747
"$$\n",
4848
"\n",
49-
"On the Dirichlet part ($\\Gamma_D^i$), the boundary integral vanishes since $v=0$. On the remaining part of the boundary, we split the boundary into contributions from the Neumann parts ($\\Gamma_N^i$) and Robin parts ($\\Gamma_R^i$). Inserting the boundary conditions, we obtain\n",
49+
"On the Dirichlet part ($\\Gamma_D^i$), the boundary integral vanishes since $v=0$. On the remaining part of the boundary, we split the boundary into contributions from the Neumann parts ($\\Gamma_N^i$) and Robin parts ($\\Gamma_R^i$).\n",
50+
"Inserting the boundary conditions, we obtain\n",
5051
"\n",
5152
"$$\n",
52-
"-\\int_{\\Omega}\\kappa\\frac{\\partial u }{\\partial n }v~\\mathrm{d} s=\\sum_i \\int_{\\Gamma_N^i} g_i~\\mathrm{d} s + \\sum_i\\int_{\\Gamma_R^i}r_i(u-s_i)~\\mathrm{d}s.\n",
53+
"-\\int_{\\partial\\Omega}\\kappa\\frac{\\partial u }{\\partial n }v~\\mathrm{d} s=\\sum_i \\int_{\\Gamma_N^i} g_iv~\\mathrm{d} s + \\sum_i\\int_{\\Gamma_R^i}r_i(u-s_i)v~\\mathrm{d}s.\n",
5354
"$$\n",
5455
"\n",
5556
"Thus we have the following variational problem\n",
5657
"\n",
5758
"$$\n",
58-
"F(u, v)=\\int_\\Omega \\kappa \\nabla u \\cdot \\nabla v~\\mathrm{d} x + \\sum_i\\int_{\\Gamma_N^i}g_i v~\\mathrm{d}s +\\sum_i\\int_{\\Gamma_R^i}r_i(u-s_i)~\\mathrm{d}s - \\int_\\Omega fv~\\mathrm{d} x = 0.\n",
59+
"F(u, v)=\\int_\\Omega \\kappa \\nabla u \\cdot \\nabla v~\\mathrm{d} x + \\sum_i\\int_{\\Gamma_N^i}g_i v~\\mathrm{d}s +\\sum_i\\int_{\\Gamma_R^i}r_i(u-s_i)v~\\mathrm{d}s - \\int_\\Omega fv~\\mathrm{d} x = 0.\n",
5960
"$$\n",
6061
"\n",
6162
"We have been used to writing the variational formulation as $a(u,v)=L(v)$, which requires that we identify the integrals dependent on the trial function $u$ and collect these in $a(u,v)$, while the remaining terms form $L(v)$. We note that the Robin condition has a contribution to both $a(u,v)$ and $L(v)$. \n",

chapter3/robin_neumann_dirichlet.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,17 @@
5555
# -\int_{\Omega}\nabla \cdot (\kappa \nabla u)v ~\mathrm{d} x = \int_{\Omega}\kappa \nabla u\cdot \nabla v~\mathrm{d} x - \int_{\partial\Omega}\kappa \frac{\partial u}{\partial n} v ~\mathrm{d} s.
5656
# $$
5757
#
58-
# On the Dirichlet part ($\Gamma_D^i$), the boundary integral vanishes since $v=0$. On the remaining part of the boundary, we split the boundary into contributions from the Neumann parts ($\Gamma_N^i$) and Robin parts ($\Gamma_R^i$). Inserting the boundary conditions, we obtain
58+
# On the Dirichlet part ($\Gamma_D^i$), the boundary integral vanishes since $v=0$. On the remaining part of the boundary, we split the boundary into contributions from the Neumann parts ($\Gamma_N^i$) and Robin parts ($\Gamma_R^i$).
59+
# Inserting the boundary conditions, we obtain
5960
#
6061
# $$
61-
# -\int_{\Omega}\kappa\frac{\partial u }{\partial n }v~\mathrm{d} s=\sum_i \int_{\Gamma_N^i} g_i~\mathrm{d} s + \sum_i\int_{\Gamma_R^i}r_i(u-s_i)~\mathrm{d}s.
62+
# -\int_{\partial\Omega}\kappa\frac{\partial u }{\partial n }v~\mathrm{d} s=\sum_i \int_{\Gamma_N^i} g_iv~\mathrm{d} s + \sum_i\int_{\Gamma_R^i}r_i(u-s_i)v~\mathrm{d}s.
6263
# $$
6364
#
6465
# Thus we have the following variational problem
6566
#
6667
# $$
67-
# F(u, v)=\int_\Omega \kappa \nabla u \cdot \nabla v~\mathrm{d} x + \sum_i\int_{\Gamma_N^i}g_i v~\mathrm{d}s +\sum_i\int_{\Gamma_R^i}r_i(u-s_i)~\mathrm{d}s - \int_\Omega fv~\mathrm{d} x = 0.
68+
# F(u, v)=\int_\Omega \kappa \nabla u \cdot \nabla v~\mathrm{d} x + \sum_i\int_{\Gamma_N^i}g_i v~\mathrm{d}s +\sum_i\int_{\Gamma_R^i}r_i(u-s_i)v~\mathrm{d}s - \int_\Omega fv~\mathrm{d} x = 0.
6869
# $$
6970
#
7071
# We have been used to writing the variational formulation as $a(u,v)=L(v)$, which requires that we identify the integrals dependent on the trial function $u$ and collect these in $a(u,v)$, while the remaining terms form $L(v)$. We note that the Robin condition has a contribution to both $a(u,v)$ and $L(v)$.

0 commit comments

Comments
 (0)