Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

problems with the docs

More
3 years 7 months ago #3178 by Poulin
I am brand new to ngsolve but installed it today and and keen to learn to use it. There are a couple of problems that I found in the docs and I am not sure if it is well known or not.

First, in installing ngsolve on jupyter on my ubuntu system, I needed to install jupyter-notebook as well, and the install command did not work but needed to use enable, as copied below.

sudo apt install jupyter-notebook
jupyter nbextension enable ngsolve --user --py

Second, I found about 6 or so examples in the notebooks that did not run, the first of which was the notebook on Maxwells equations. I can provide a longer list if need be.

I presume these are known but wanted to try and contribute in case they aren't.
More
3 years 7 months ago #3179 by joachim
Replied by joachim on topic problems with the docs
Hi Poulin,

welcome to NGSolve. Yes, please tell us what is not working.

You may also watch the tutorials on youtube to see how they should work, e.g. the Maxwell tutorial:



Joachim
More
3 years 7 months ago #3185 by Poulin
Replied by Poulin on topic problems with the docs
Hello Joachim,

Thanks for sharing this video wtih me.

I understand the setup of the code but the problem I had was with an error.

In particular, I am copying the error message below. I will copy other errors that I get in the other codes in separate lines.



AttributeError Traceback (most recent call last)
<ipython-input-5-47895662d752> in <module>
5 from math import pi
6 mu0 = 4*pi*1e-7
----> 7 mur = mesh.MaterialCF({"magnet" : 1000}, default=1)
8
9 a = BilinearForm(fes)

AttributeError: 'ngsolve.comp.Mesh' object has no attribute 'MaterialCF'
More
3 years 7 months ago #3186 by Poulin
Replied by Poulin on topic problems with the docs
2.6 Stokes Equation

TypeError Traceback (most recent call last)
<ipython-input-2-4cfe5b119a48> in <module>
1 V = H1(mesh, order=2, dirichlet="wall|inlet|cyl")
2 Q = H1(mesh, order=1)
----> 3 X = V*V*Q

TypeError: unsupported operand type(s) for *: 'ngsolve.comp.H1' and 'ngsolve.comp.H1'
More
3 years 7 months ago #3187 by Poulin
Replied by Poulin on topic problems with the docs
2.11 Matrix free operator application¶


NameError Traceback (most recent call last)
<ipython-input-4-8901926dddb7> in <module>
2 felS = Sigma.GetFE(el)
3 felV = V.GetFE(el)
----> 4 fel = MixedFE(felS, felV)
5 trafo = mesh.GetTrafo(el)
6

NameError: name 'MixedFE' is not defined
More
3 years 7 months ago #3188 by Poulin
Replied by Poulin on topic problems with the docs
3.3 Discontinuous Galerkin Discretizations for linear transport

TypeError Traceback (most recent call last)
<ipython-input-11-05fb163505bf> in <module>
1 # this does not work:
2 c2 = BilinearForm(VT)
----> 3 res.data = c2.mat * gfu.vec

TypeError: matrix not ready - assemble bilinearform first
Time to create page: 0.171 seconds