Skip to content

Commit 372b843

Browse files
committed
Update all notebooks to latest version
1 parent ccfbc22 commit 372b843

19 files changed

+579
-353
lines changed

Dockerfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
FROM dokken92/dolfinx_custom:pyvista_itk
2-
3-
RUN pip3 install notebook
1+
FROM dokken92/dolfinx_custom:12022021
42

53
# create user with a home directory
64
ARG NB_USER

chapter1/fundamentals_code.ipynb

+6-20
Large diffs are not rendered by default.

chapter1/membrane_code.ipynb

+8-9
Large diffs are not rendered by default.

chapter2/diffusion_code.ipynb

+25-14
Large diffs are not rendered by default.

chapter2/heat_code.ipynb

+17-10
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
},
9292
{
9393
"cell_type": "code",
94-
"execution_count": 4,
94+
"execution_count": 5,
9595
"metadata": {},
9696
"outputs": [],
9797
"source": [
@@ -100,7 +100,7 @@
100100
"u_D.vector.ghostUpdate(addv=PETSc.InsertMode.INSERT, mode=PETSc.ScatterMode.FORWARD)\n",
101101
"fdim = mesh.topology.dim - 1\n",
102102
"boundary_facets = dolfinx.mesh.locate_entities_boundary(\n",
103-
" mesh, fdim, lambda x: numpy.full(x.shape[1], True, dtype=numpy.bool))\n",
103+
" mesh, fdim, lambda x: numpy.full(x.shape[1], True, dtype=bool))\n",
104104
"bc = dolfinx.DirichletBC(u_D, dolfinx.fem.locate_dofs_topological(V, fdim, boundary_facets))"
105105
]
106106
},
@@ -114,7 +114,7 @@
114114
},
115115
{
116116
"cell_type": "code",
117-
"execution_count": 5,
117+
"execution_count": 6,
118118
"metadata": {},
119119
"outputs": [],
120120
"source": [
@@ -132,7 +132,7 @@
132132
},
133133
{
134134
"cell_type": "code",
135-
"execution_count": 6,
135+
"execution_count": 7,
136136
"metadata": {},
137137
"outputs": [],
138138
"source": [
@@ -148,7 +148,7 @@
148148
},
149149
{
150150
"cell_type": "code",
151-
"execution_count": 7,
151+
"execution_count": 8,
152152
"metadata": {},
153153
"outputs": [],
154154
"source": [
@@ -169,7 +169,7 @@
169169
},
170170
{
171171
"cell_type": "code",
172-
"execution_count": 8,
172+
"execution_count": 9,
173173
"metadata": {},
174174
"outputs": [],
175175
"source": [
@@ -189,7 +189,7 @@
189189
},
190190
{
191191
"cell_type": "code",
192-
"execution_count": 9,
192+
"execution_count": 10,
193193
"metadata": {},
194194
"outputs": [],
195195
"source": [
@@ -214,7 +214,7 @@
214214
},
215215
{
216216
"cell_type": "code",
217-
"execution_count": 10,
217+
"execution_count": 11,
218218
"metadata": {},
219219
"outputs": [],
220220
"source": [
@@ -253,15 +253,15 @@
253253
},
254254
{
255255
"cell_type": "code",
256-
"execution_count": 11,
256+
"execution_count": 12,
257257
"metadata": {},
258258
"outputs": [
259259
{
260260
"name": "stdout",
261261
"output_type": "stream",
262262
"text": [
263263
"L2-error: 2.83e-02\n",
264-
"Error_max = 1.78e-15\n"
264+
"Error_max = 7.11e-15\n"
265265
]
266266
}
267267
],
@@ -280,6 +280,13 @@
280280
"error_max = numpy.max(numpy.abs(u_vertex_values - u_ex_vertex_values))\n",
281281
"print(\"Error_max = {0:.2e}\".format(error_max))"
282282
]
283+
},
284+
{
285+
"cell_type": "code",
286+
"execution_count": null,
287+
"metadata": {},
288+
"outputs": [],
289+
"source": []
283290
}
284291
],
285292
"metadata": {

chapter2/linearelasticity_code.ipynb

+4-4
Large diffs are not rendered by default.

chapter2/nonlinpoisson_code.ipynb

+13-6
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
{
4848
"cell_type": "code",
49-
"execution_count": 2,
49+
"execution_count": 3,
5050
"metadata": {},
5151
"outputs": [],
5252
"source": [
@@ -59,7 +59,7 @@
5959
"u_D.vector.ghostUpdate(addv=PETSc.InsertMode.INSERT, mode=PETSc.ScatterMode.FORWARD)\n",
6060
"fdim = mesh.topology.dim - 1\n",
6161
"boundary_facets = dolfinx.mesh.locate_entities_boundary(\n",
62-
" mesh, fdim, lambda x: numpy.full(x.shape[1], True, dtype=numpy.bool))\n",
62+
" mesh, fdim, lambda x: numpy.full(x.shape[1], True, dtype=bool))\n",
6363
"bc = dolfinx.DirichletBC(u_D, dolfinx.fem.locate_dofs_topological(V, fdim, boundary_facets))"
6464
]
6565
},
@@ -72,7 +72,7 @@
7272
},
7373
{
7474
"cell_type": "code",
75-
"execution_count": 3,
75+
"execution_count": 4,
7676
"metadata": {},
7777
"outputs": [],
7878
"source": [
@@ -91,7 +91,7 @@
9191
},
9292
{
9393
"cell_type": "code",
94-
"execution_count": 4,
94+
"execution_count": 5,
9595
"metadata": {},
9696
"outputs": [],
9797
"source": [
@@ -217,8 +217,8 @@
217217
"name": "stdout",
218218
"output_type": "stream",
219219
"text": [
220-
"L2-error: 3.92e-16\n",
221-
"Error_max = 8.88e-16\n"
220+
"L2-error: 2.04e-15\n",
221+
"Error_max = 3.11e-15\n"
222222
]
223223
}
224224
],
@@ -237,6 +237,13 @@
237237
"error_max = numpy.max(numpy.abs(u_vertex_values - u_ex_vertex_values))\n",
238238
"print(\"Error_max = {0:.2e}\".format(error_max))"
239239
]
240+
},
241+
{
242+
"cell_type": "code",
243+
"execution_count": null,
244+
"metadata": {},
245+
"outputs": [],
246+
"source": []
240247
}
241248
],
242249
"metadata": {

chapter2/ns_code1.ipynb

+10-2
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)