Skip to content

Commit

Permalink
html render for notebook 8
Browse files Browse the repository at this point in the history
  • Loading branch information
lmoresi committed Nov 5, 2024
1 parent 7047c85 commit e772683
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 47 deletions.
103 changes: 58 additions & 45 deletions docs/user/Notebooks/8-Particle_Swarms.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"id": "0974f1a1-60dd-4d52-9855-79e8030450e9",
"metadata": {},
"outputs": [],
Expand All @@ -46,10 +46,18 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"id": "dddf1a25-1d89-4c39-90dc-9ca5a45db5dd",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"[esdhcp-137.anu.edu.au:18692] shmem: mmap: an error occurred while determining whether or not /var/folders/tx/95gr762j29z4tt5d1dnqlgth0000gn/T//ompi.esdhcp-137.501/jf.0/4013031424/sm_segment.esdhcp-137.501.ef320000.0 could be created.\n"
]
}
],
"source": [
"#| output: false # Suppress warnings in html version\n",
"\n",
Expand Down Expand Up @@ -191,22 +199,7 @@
"execution_count": 8,
"id": "c3e1937a-2c8c-46e7-992f-3b74cd991463",
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "16110a6f07c942d28b40970a014d0ba4",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"EmbeddableWidget(value='<iframe srcdoc=\"<!DOCTYPE html>\\n<html>\\n <head>\\n <meta http-equiv=&quot;Content-…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"if uw.mpi.size == 1:\n",
" import pyvista as pv\n",
Expand All @@ -232,7 +225,7 @@
" )\n",
" \n",
" pl.camera.zoom(3)\n",
" pl.show(jupyter_backend=\"html\")"
"\n"
]
},
{
Expand Down Expand Up @@ -319,22 +312,7 @@
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ddb5d9712b3c4e82b6e2cd5af8d2aaea",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"EmbeddableWidget(value='<iframe srcdoc=\"<!DOCTYPE html>\\n<html>\\n <head>\\n <meta http-equiv=&quot;Content-…"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"outputs": [],
"source": [
"if uw.mpi.size == 1:\n",
" import pyvista as pv\n",
Expand Down Expand Up @@ -370,13 +348,48 @@
" opacity=1,\n",
" )\n",
" \n",
" pl.show(jupyter_backend=\"html\")\n",
" pl.export_html(f\"html5/terrain_flow_mesh_only.html\")\n",
" "
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "0adf1c25-c69d-4853-987a-1e6e5fad30b1",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <iframe\n",
" width=\"750\"\n",
" height=\"300\"\n",
" src=\"html5/terrain_flow_mesh_only.html\"\n",
" frameborder=\"0\"\n",
" allowfullscreen\n",
" \n",
" ></iframe>\n",
" "
],
"text/plain": [
"<IPython.lib.display.IFrame at 0x157fe2750>"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#| fig-cap: \"Interactive Image: Convection model output\"\n",
"from IPython.display import IFrame\n",
"IFrame(src=f\"html5/terrain_flow_mesh_only.html\", width=750, height=300)"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "377301f7-9596-4216-917f-fc5dca474c0d",
"metadata": {},
"outputs": [],
Expand All @@ -389,7 +402,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"id": "3f3c3875-4ba1-4e99-a793-3446af229b6d",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -432,7 +445,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 15,
"id": "85122b6c-a44d-4253-9eae-c182f1402df2",
"metadata": {},
"outputs": [
Expand All @@ -445,7 +458,7 @@
"Piecewise((1/100, {\\left<\\Sigma\\right>}(N.x, N.y) < 0.05), (1, True))"
]
},
"execution_count": 14,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -456,7 +469,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 16,
"id": "7ecf2fbf-f714-4c5f-9d99-bbe86b462da8",
"metadata": {},
"outputs": [],
Expand All @@ -466,7 +479,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 17,
"id": "b1c3f95e-f6ea-49b8-87bd-824587a91336",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -519,7 +532,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 18,
"id": "4948cff8-89da-4822-aee7-f2207aa513b0",
"metadata": {},
"outputs": [
Expand All @@ -538,10 +551,10 @@
" "
],
"text/plain": [
"<IPython.lib.display.IFrame at 0x1050ee7d0>"
"<IPython.lib.display.IFrame at 0x1619abb50>"
]
},
"execution_count": 1,
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
19 changes: 19 additions & 0 deletions docs/user/Notebooks/html5/terrain_flow_mesh_only.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/user/Notebooks/html5/terrain_flow_plot.html

Large diffs are not rendered by default.

0 comments on commit e772683

Please sign in to comment.