kinnala / scikit-fem

Simple finite element assemblers

Home Page:https://scikit-fem.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example 11

whiffee opened this issue · comments

Going through the gallery of examples. Example 2 works okay, but example 11 does not. No errors and no response. Jupyter and Idle give the same non-activity. Python 3.9.13. Could you look at this one and see if it's borked or if my 13700k just won't handle it?

thanks,
Gary

Most common issue is that there has been a feature added in master branch which is not yet available in the latest release.

...but that doesn't seem to be the case here.

All examples are run in the CI test suite so I'm quite confident. Perhaps you are confused by the fact that the example writes a VTK file which you are supposed to open in another tool such as Paraview for postprocessing?

It might be a worthwhile addition to explain that in a comment.

Thanks for the tip, I would never have found it myself. When running Jupyter in win10,
a file is indeed produced. Its filename is ipykernel_launcher.vtk and it can be found
at C:\Users\gary\AppData\Local\Programs\Python\Python39\Lib\site-packages.
It is 80kb in size. Paraview pretends to open this file just like a graphic file, and
places it in the project tree. However, consulting the info tab, it can be seen that
the file contains 0 points, 0 cells and uses 0 memory. It has no visual representation.

Maybe I should include the output of pip3 list: (As I mentioned, on running the example,
no errors were reported.)

Package Version Editable project location


amqp 5.1.1
anyio 3.6.2
appdirs 1.4.4
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
arrow 1.2.3
asgiref 3.6.0
asttokens 2.2.1
attrs 22.1.0
backcall 0.2.0
beautifulsoup4 4.11.1
billiard 3.6.4.0
bleach 5.0.1
celery 5.1.2
certifi 2022.12.7
cffi 1.15.1
charset-normalizer 2.1.1
click 7.1.2
click-didyoumean 0.3.0
click-plugins 1.1.1
click-repl 0.2.0
colorama 0.4.6
comm 0.1.2
contourpy 1.0.6
croniter 1.3.5
cycler 0.11.0
debugpy 1.6.4
decorator 5.1.1
defusedxml 0.7.1
Django 3.2.5
django-cors-headers 3.10.1
django-drf-filepond 0.4.1
django-filter 21.1
django-storages 1.13.2
djangorestframework 3.12.4
dmsh 0.2.23
entrypoints 0.4
exceptiongroup 1.0.4
executing 1.2.0
fastjsonschema 2.16.2
fonttools 4.38.0
fqdn 1.5.1
gevent 21.12.0
greenlet 1.1.3.post0
idna 3.4
importlib-metadata 5.1.0
iniconfig 1.1.1
intel-openmp 2021.4.0
ipykernel 6.6.0
ipympl 0.9.2
ipython 7.30.1
ipython-genutils 0.2.0
ipywidgets 8.0.3
isoduration 20.11.0
jedi 0.18.2
Jinja2 3.1.2
jsonpointer 2.3
jsonschema 4.17.3
jupyter 1.0.0
jupyter_client 7.4.8
jupyter-console 6.4.4
jupyter-contrib-core 0.4.2
jupyter-contrib-nbextensions 0.7.0
jupyter_core 5.1.0
jupyter-events 0.5.0
jupyter-highlight-selected-word 0.2.0
jupyter-nbextensions-configurator 0.6.1
jupyter_server 2.0.1
jupyter_server_terminals 0.4.2
jupyterlab-pygments 0.2.2
jupyterlab-widgets 3.0.4
kiwisolver 1.4.4
kombu 5.2.4
llvmlite 0.39.1
lxml 4.9.2
Markdown 3.3.6
markdown-it-py 2.1.0
MarkupSafe 2.1.1
matlab2python 1.1 c:\users\gary\downloads\matlab2python
matplotlib 3.6.2
matplotlib-inline 0.1.6
mdurl 0.1.2
mercury 1.1.6
meshio 5.3.4
meshplex 0.18.11
mistune 0.8.4
mkl 2021.4.0
mljar-mercury 1.1.6
mpmath 1.2.1
nbclassic 0.4.8
nbclient 0.7.2
nbconvert 6.5.4
nbformat 5.7.0
nest-asyncio 1.5.6
netgen-mesher 6.2.2203.post46.dev0
networkx 2.8.8
ngsolve 6.2.2204
notebook 6.5.2
notebook_shim 0.2.2
npx 0.1.1
numba 0.56.4
numpy 1.23.5
packaging 22.0
pandoc 2.3
pandocfilters 1.5.0
parso 0.8.3
pickleshare 0.7.5
Pillow 9.3.0
pip 22.3.1
platformdirs 2.6.0
pluggy 1.0.0
plumbum 1.8.0
ply 3.11
prometheus-client 0.15.0
prompt-toolkit 3.0.36
psutil 5.8.0
pure-eval 0.2.2
py-pde 0.27.1
pycparser 2.21
pyee 8.2.2
Pygments 2.13.0
pyparsing 3.0.9
pyppeteer 1.0.2
PyQt5 5.15.8
PyQt5-Qt5 5.15.2
PyQt5-sip 12.11.1
pyrsistent 0.19.2
pytest 7.2.0
python-dateutil 2.8.2
python-dotenv 0.19.2
python-json-logger 2.0.4
pytz 2022.7
pywin32 305
pywinpty 2.0.9
PyYAML 6.0
pyzmq 24.0.1
qtconsole 5.4.0
QtPy 2.3.0
requests 2.28.1
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rich 13.2.0
scikit-fem 8.0.0
scipy 1.9.3
Send2Trash 1.8.0
setuptools 58.1.0
shortuuid 1.0.11
six 1.16.0
smop 0.41
sniffio 1.3.0
soupsieve 2.3.2.post1
SQLAlchemy 1.4.27
sqlparse 0.4.3
stack-data 0.6.2
sympy 1.11.1
tbb 2021.7.1
terminado 0.17.1
tinycss2 1.2.1
tomli 2.0.1
tornado 6.2
tqdm 4.64.1
traitlets 5.7.1
uri-template 1.2.0
urllib3 1.26.13
vine 5.0.0
wcwidth 0.2.5
webcolors 1.12
webencodings 0.5.1
webgui-jupyter-widgets 0.2.14
websocket-client 1.4.2
websockets 10.4
whitenoise 5.3.0
widgetsnbextension 4.0.4
x21 0.4.1
zipp 3.11.0
zope.event 4.6
zope.interface 5.5.2

Idle. Running the example on Idle, no error msg, and no .vtk file produced.

Linux Mint 21.0. No file is produced in Jupyter, evidently. At least it can't be
found by Searchmonkey. Looking specifically in the site-packages directory
under Python39 shows it to be empty.

Should there be a JSON for the kernel launcher? Or some parameter arguments
of some kind? I'm sort of out of my depth here.

regards
Gary Bollenbach

m.save(splitext(argv[0])[0] + '.vtk')

This line writes the file. Perhaps you want to change the first parameter, filename, to save-method since you use Jupyter?

That would be fine. Or even out to matplotlib. But I notice that if the line reads:

m.save('myfile' + '.vtk') it writes the same 80kb empty file, only to a different location.

I'm unable to reproduce. I get around 80kb VTK file which is not empty and opens successfully in ParaView 5.11.0.

(skfemenv) gustaft1@G339CWYYKJ scikit-fem % ipython docs/examples/ex11.py 
(skfemenv) gustaft1@G339CWYYKJ scikit-fem % ls -la docs/examples/ex11 | grep ex11
ls: docs/examples/ex11: No such file or directory
(skfemenv) gustaft1@G339CWYYKJ scikit-fem % ls -la docs/examples/ | grep ex11  
-rw-r--r--   1 gustaft1  staff    915 Jan 19 22:24 ex11.py
-rw-r--r--   1 gustaft1  staff  81409 Feb  8 17:19 ex11.vtk

Yes I see it now. I apologize, it looks like my Paraview was just too old to show anything. With the new version I can see what you are seeing.

regards
Gary Bollenbach