|
13 | 13 | } |
14 | 14 | }, |
15 | 15 | "source": [ |
| 16 | + "\n", |
| 17 | + "# Notebook 1: Meshes\n", |
| 18 | + "\n", |
16 | 19 | "<div style=\"float: right; width: 40%\">\n", |
17 | 20 | " \n", |
18 | 21 | "\n", |
19 | 22 | "\n", |
20 | 23 | "</div>\n", |
21 | 24 | "\n", |
22 | 25 | "\n", |
23 | | - "## Notebook 1: Meshes\n", |
24 | | - "\n", |
25 | | - "Introducing meshes: how to build them, interrogate them and visualise them.\n", |
26 | | - "\n", |
27 | | - " - `mesh.view()`\n", |
28 | | - " - Mesh refinement options\n", |
29 | | - " - Mesh coordinates\n", |
30 | | - " - Mesh coordinate systems\n", |
31 | | - " - Mesh deformation\n", |
32 | | - "\n", |
33 | | - "\n", |
34 | 26 | "\n", |
35 | | - "Mesh adaptivity is a work-in-progress.\n", |
36 | | - "\n", |
37 | | - "\n" |
| 27 | + "This notebookIntroduces the mesh discretisation that we use in `Underworld3` and how you can build one of the pre-defined meshes. This notebook also show you how to use the `pyvista` visualisation tools for `Underworld3` objects. The mesh holds information on the mesh geometry, boundaries and coordinate systems and you can attach data to the mesh (see Notebook 2: [Variables](2-Variables.ipynb)). \n" |
38 | 28 | ] |
39 | 29 | }, |
40 | 30 | { |
|
71 | 61 | }, |
72 | 62 | "tags": [] |
73 | 63 | }, |
74 | | - "outputs": [ |
75 | | - { |
76 | | - "name": "stdout", |
77 | | - "output_type": "stream", |
78 | | - "text": [ |
79 | | - "PostHog telemetry failed: HTTPSConnectionPool(host='eu.i.posthog.com', port=443): Max retries exceeded with url: /capture/ (Caused by NameResolutionError(\"<urllib3.connection.HTTPSConnection object at 0x3049912b0>: Failed to resolve 'eu.i.posthog.com' ([Errno 8] nodename nor servname provided, or not known)\"))\n" |
80 | | - ] |
81 | | - } |
82 | | - ], |
| 64 | + "outputs": [], |
83 | 65 | "source": [ |
84 | 66 | "#| output: false # Suppress warnings in html version\n", |
85 | 67 | "\n", |
|
105 | 87 | }, |
106 | 88 | { |
107 | 89 | "cell_type": "code", |
108 | | - "execution_count": 22, |
| 90 | + "execution_count": 3, |
109 | 91 | "id": "1c928d60-24a9-4415-ab22-41834695c70a", |
110 | 92 | "metadata": { |
111 | 93 | "editable": true, |
|
157 | 139 | }, |
158 | 140 | { |
159 | 141 | "cell_type": "code", |
160 | | - "execution_count": 23, |
| 142 | + "execution_count": 4, |
161 | 143 | "id": "b9cfac97-5c19-46b1-aebd-0fb77678b9ed", |
162 | 144 | "metadata": {}, |
163 | 145 | "outputs": [ |
|
173 | 155 | " [ 0.51755571, 0.41031492, 0.44421012]])" |
174 | 156 | ] |
175 | 157 | }, |
176 | | - "execution_count": 23, |
| 158 | + "execution_count": 4, |
177 | 159 | "metadata": {}, |
178 | 160 | "output_type": "execute_result" |
179 | 161 | } |
|
232 | 214 | }, |
233 | 215 | { |
234 | 216 | "cell_type": "code", |
235 | | - "execution_count": 26, |
| 217 | + "execution_count": 5, |
236 | 218 | "id": "1cb8378c-cdb8-4e75-bd12-e85f12169ef7", |
237 | 219 | "metadata": { |
238 | 220 | "editable": true, |
|
266 | 248 | }, |
267 | 249 | { |
268 | 250 | "cell_type": "code", |
269 | | - "execution_count": 27, |
| 251 | + "execution_count": 6, |
270 | 252 | "id": "fd6cbed0-3159-4c6c-a482-6a9636158854", |
271 | 253 | "metadata": { |
272 | 254 | "editable": true, |
|
291 | 273 | " " |
292 | 274 | ], |
293 | 275 | "text/plain": [ |
294 | | - "<IPython.lib.display.IFrame at 0x35f726660>" |
| 276 | + "<IPython.lib.display.IFrame at 0x33d867770>" |
295 | 277 | ] |
296 | 278 | }, |
297 | | - "execution_count": 27, |
| 279 | + "execution_count": 6, |
298 | 280 | "metadata": {}, |
299 | 281 | "output_type": "execute_result" |
300 | 282 | } |
|
406 | 388 | "text": [ |
407 | 389 | "\n", |
408 | 390 | "\n", |
409 | | - "Mesh # 0: .meshes/uw_cubed_spherical_shell_ro1.0_ri0.547_elts8_plexFalse.msh\n", |
| 391 | + "Mesh # 0: .meshes/uw_cubed_spherical_shell_ro1.0_ri0.547_elts8_plexTrue.msh\n", |
410 | 392 | "\n" |
411 | 393 | ] |
412 | 394 | }, |
413 | 395 | { |
414 | 396 | "data": { |
415 | 397 | "application/vnd.jupyter.widget-view+json": { |
416 | | - "model_id": "f18b77ba1d8d44ae96a3832ea3ffa5a3", |
| 398 | + "model_id": "9b169322ec7d469e81893a05b2cbfffb", |
417 | 399 | "version_major": 2, |
418 | 400 | "version_minor": 0 |
419 | 401 | }, |
420 | 402 | "text/plain": [ |
421 | | - "Widget(value='<iframe src=\"http://localhost:50188/index.html?ui=P_0x307b3b5f0_1&reconnect=auto\" class=\"pyvista…" |
| 403 | + "Widget(value='<iframe src=\"http://localhost:58527/index.html?ui=P_0x33d89cf80_1&reconnect=auto\" class=\"pyvista…" |
422 | 404 | ] |
423 | 405 | }, |
424 | 406 | "metadata": {}, |
|
428 | 410 | "name": "stdout", |
429 | 411 | "output_type": "stream", |
430 | 412 | "text": [ |
431 | | - "Number of cells: 3072\n", |
| 413 | + "Number of cells: 7615\n", |
432 | 414 | "\n", |
433 | 415 | "No variables are defined on the mesh\n", |
434 | 416 | "\n", |
435 | | - "| Boundary Name | ID |\n", |
436 | | - "| -------------------------------- |\n", |
437 | | - "| Lower | 1 |\n", |
438 | | - "| Upper | 2 |\n", |
439 | | - "| Null_Boundary | 666 |\n", |
440 | | - "| All_Boundaries | 1001 |\n", |
441 | | - "| All_Boundaries | 1001 |\n", |
442 | | - "| UW_Boundaries | -- |\n", |
443 | | - "| -------------------------------- |\n", |
| 417 | + "| Boundary Name | ID | Min Size | Max Size |\n", |
| 418 | + "| ------------------------------------------------------ |\n", |
| 419 | + "| Lower | 1 | 1062 | 1062 |\n", |
| 420 | + "| Upper | 2 | 1062 | 1062 |\n", |
| 421 | + "| Null_Boundary | 666 | 1672 | 1672 |\n", |
| 422 | + "| All_Boundaries | 1001 | 1536 | 1536 |\n", |
| 423 | + "| All_Boundaries | 1001 | 1536 | 1536 |\n", |
| 424 | + "| UW_Boundaries | -- | 5332 | 5332 |\n", |
| 425 | + "| ------------------------------------------------------ |\n", |
444 | 426 | "\n", |
445 | 427 | "\n", |
446 | | - "Use view(1) to view detailed mesh information.\n", |
447 | | - "\n" |
| 428 | + "DM Object: uw_.meshes/uw_cubed_spherical_shell_ro1.0_ri0.547_elts8_plexTrue.msh 1 MPI process\n", |
| 429 | + " type: plex\n", |
| 430 | + "uw_.meshes/uw_cubed_spherical_shell_ro1.0_ri0.547_elts8_plexTrue.msh in 3 dimensions:\n", |
| 431 | + " Number of 0-cells per rank: 1672\n", |
| 432 | + " Number of 1-cells per rank: 10053\n", |
| 433 | + " Number of 2-cells per rank: 15998\n", |
| 434 | + " Number of 3-cells per rank: 7615\n", |
| 435 | + "Labels:\n", |
| 436 | + " depth: 4 strata with value/size (0 (1672), 1 (10053), 2 (15998), 3 (7615))\n", |
| 437 | + " All_Boundaries: 1 strata with value/size (1001 (1536))\n", |
| 438 | + " Elements: 1 strata with value/size (99999 (7871))\n", |
| 439 | + " Lower: 1 strata with value/size (1 (1062))\n", |
| 440 | + " Upper: 1 strata with value/size (2 (1062))\n", |
| 441 | + " celltype: 4 strata with value/size (0 (1672), 1 (10053), 3 (15998), 6 (7615))\n", |
| 442 | + " Null_Boundary: 1 strata with value/size (666 (1672))\n", |
| 443 | + " UW_Boundaries: 4 strata with value/size (1 (1062), 2 (1062), 666 (1672), 1001 (1536))\n" |
448 | 444 | ] |
449 | 445 | } |
450 | 446 | ], |
451 | 447 | "source": [ |
452 | | - "mesh.view()" |
| 448 | + "mesh.view(1)" |
453 | 449 | ] |
454 | 450 | }, |
455 | 451 | { |
|
470 | 466 | "\n", |
471 | 467 | "See Notebook 8 for a short mesh-deformation example.\n" |
472 | 468 | ] |
473 | | - }, |
474 | | - { |
475 | | - "cell_type": "code", |
476 | | - "execution_count": null, |
477 | | - "id": "2374ad95-c893-49a8-9915-de68374135ba", |
478 | | - "metadata": {}, |
479 | | - "outputs": [], |
480 | | - "source": [] |
481 | 469 | } |
482 | 470 | ], |
483 | 471 | "metadata": { |
|
0 commit comments