Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
markuswess committed Jun 16, 2024
1 parent bfb020a commit cdf2402
Show file tree
Hide file tree
Showing 6 changed files with 102 additions and 89 deletions.
19 changes: 12 additions & 7 deletions _sources/examples/waveguide_3d.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,9 @@
],
"source": [
"#Draw solution\n",
"#scenebd = Draw (gfe[1], mesh, \"E\", order=2, draw_surf=True, clipping={\"y\":1, \"z\":0},min=-0.5,max=0.5,autoscale=False)\n",
"scenee = Draw (gfE[1], mesh, \"E\", order=2, draw_surf=False, clipping={\"y\":1, \"z\":0},min=-0.5,max=0.5,autoscale=False,points=dcs.GetWebGuiPoints(2),settings = {\"Objects\" : {\"Clipping Plane\" : True}}, euler_angles=[-120,2,-15])\n",
"#sceneh = Draw (gfH.Operator(\"altshape\")[2], mesh, \"H\", order=2, draw_surf=False, clipping={\"y\":1, \"z\":0},min=-0.5,max=0.5,autoscale=False)\n"
"#scenee = Draw (gfE[1], mesh, \"E\", order=2, draw_surf=False, clipping={\"y\":1, \"z\":0},min=-0.5,max=0.5,autoscale=False,points=dcs.GetWebGuiPoints(2),settings = {\"Objects\" : {\"Clipping Plane\" : True}}, euler_angles=[-120,2,-15])\n",
"#sceneh = Draw (gfH.Operator(\"altshape\")[2], mesh, \"H\", order=2, draw_surf=False, clipping={\"y\":1, \"z\":0},min=-0.5,max=0.5,autoscale=False)\n",
"gfE_anim = GridFunction(fesE,multidim=0)"
]
},
{
Expand Down Expand Up @@ -277,6 +277,7 @@
"tmpE = gfE.vec.CreateVector()\n",
"\n",
"now = time()\n",
"timepassed = 0\n",
"with TaskManager():\n",
" gfH.vec.data += -tau/2*massH_inv@bf_mixed*gfE.vec\n",
" while t<tend:\n",
Expand All @@ -289,10 +290,11 @@
" \n",
" gfH.vec.data += -tau*massH_inv@bf_mixed*gfE.vec\n",
" if i%drawevery == 0:\n",
" timepassed = time()-now\n",
" scenee.Redraw()\n",
" timepassed += time()-now\n",
" #scenee.Redraw()\n",
" #sceneh.Redraw()\n",
" print(\"\\r time = {}, step = {}, {:e} dofs/s\".format(t,i,drawevery*fes.ndof/timepassed),end=\"\")\n",
" gfE_anim.AddMultiDimComponent(gfE.vec)\n",
" #print(\"\\r time = {}, step = {}, {:e} dofs/s\".format(t,i,drawevery*fes.ndof/timepassed),end=\"\")\n",
" now = time()\n",
"\n"
]
Expand All @@ -303,7 +305,10 @@
"id": "1225aeff",
"metadata": {},
"outputs": [],
"source": []
"source": [
"print(\"finshed with an average of {:e} dofs/s\".format(i*fes.ndof/timepassed),end=\"\")\n",
"scenee = Draw (gfE_anim[1], mesh, \"E\", order=2, animate = True, draw_surf=False, clipping={\"y\":1, \"z\":0},min=-0.5,max=0.5,autoscale=False,points=dcs.GetWebGuiPoints(2),settings = {\"Objects\" : {\"Clipping Plane\" : True}}, euler_angles=[-120,2,-15])"
]
}
],
"metadata": {
Expand Down
110 changes: 42 additions & 68 deletions examples/waveguide_3d.html

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions maxwell/diffops.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions maxwell/hcurl.html

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions reports/examples/waveguide_3d.err.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Traceback (most recent call last):
File "/home/mwess/.local/lib/python3.10/site-packages/jupyter_cache/executors/utils.py", line 58, in single_nb_execution
executenb(
File "/usr/local/lib/python3.10/dist-packages/nbclient/client.py", line 1269, in execute
return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute()
File "/usr/local/lib/python3.10/dist-packages/nbclient/util.py", line 85, in wrapped
return just_run(coro(*args, **kwargs))
File "/usr/local/lib/python3.10/dist-packages/nbclient/util.py", line 60, in just_run
return loop.run_until_complete(coro)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/usr/local/lib/python3.10/dist-packages/nbclient/client.py", line 707, in async_execute
await self.async_execute_cell(
File "/usr/local/lib/python3.10/dist-packages/nbclient/client.py", line 1025, in async_execute_cell
await self._check_raise_for_error(cell, cell_index, exec_reply)
File "/usr/local/lib/python3.10/dist-packages/nbclient/client.py", line 919, in _check_raise_for_error
raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content)
nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell:
------------------
#Draw solution
#scenee = Draw (gfE[1], mesh, "E", order=2, draw_surf=False, clipping={"y":1, "z":0},min=-0.5,max=0.5,autoscale=False,points=dcs.GetWebGuiPoints(2),settings = {"Objects" : {"Clipping Plane" : True}}, euler_angles=[-120,2,-15])
#sceneh = Draw (gfH.Operator("altshape")[2], mesh, "H", order=2, draw_surf=False, clipping={"y":1, "z":0},min=-0.5,max=0.5,autoscale=False)
gfE_anim = GridFunction(fesE,multidim=0)
------------------

---------------------------------------------------------------------------
NameError Traceback (most recent call last)
Input In [7], in <cell line: 4>()
 1 #Draw solution
 2 #scenee = Draw (gfE[1], mesh, "E", order=2, draw_surf=False, clipping={"y":1, "z":0},min=-0.5,max=0.5,autoscale=False,points=dcs.GetWebGuiPoints(2),settings = {"Objects" : {"Clipping Plane" : True}}, euler_angles=[-120,2,-15])
 3 #sceneh = Draw (gfH.Operator("altshape")[2], mesh, "H", order=2, draw_surf=False, clipping={"y":1, "z":0},min=-0.5,max=0.5,autoscale=False)
----> 4 gfE_anim = GridFunction(fesE,multidim=0)

NameError: name 'fesE' is not defined
NameError: name 'fesE' is not defined

2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit cdf2402

Please sign in to comment.