Hi,
I’ve been enjoying the updated iTutorials very much!
I noticed a small issue with the new HCurlDiv iTutorial, though…
It tries to compute the div of the curl of a grid function l in block 12, and fails like this:
Exception Traceback (most recent call last)
in ()
----> 1 div(uc)
~/ngsuite/ngsolve-install/lib/python3/dist-packages/ngsolve/utils.py in div(func)
84 if add:
85 return add
—> 86 raise Exception(“cannot form div”)
87
88
Exception: cannot form div
Just to see what would happen, I changed a line in utils.py (as below) and restarted the Jupyter kernel.
[code]def div(func):
if func.derivname == “div”:
if func.derivname in ["div", "curl"]:
return func.Deriv()
add = func.Operator("div")
if add:
return add
raise Exception("cannot form div")
[/code]
It seemed to work:
div(uc)
<ngsolve.comp.CoefficientFunction at 0x7fd22cce68e0>
Best,
Dow