jorgensd / dolfinx-tutorial

A reimplementation of the Springer book: https://github.com/hplgit/fenics-tutorial/, covering new topics as well as transitioning from dolfin to dolfinx
https://jorgensd.github.io/dolfinx-tutorial/
103 stars 60 forks source link

Problem plotting with pyvista #93

Closed manueldeljesus closed 1 year ago

manueldeljesus commented 2 years ago

I have been following the tutorials with a local conda installation of Fenicsx. Everything has been working so far, except for the visualization using pyvista.

Specifically, I cannot get the code in this part of the tutorial to work. The error occurs when the show function is called.

I copy a summary of the most important part of the traceback to understand the error:

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Input In [12], in <cell line: 25>()
     23         # Clear plotter for next plot
     24         p.remove_actor(actor)
---> 25 plot_function(0, sh)

Input In [12], in plot_function(t, sh)
     17 actor = p.add_mesh(warped)
     18 if not pyvista.OFF_SCREEN:
---> 19     p.show()
     20 else:
     21     pyvista.start_xvfb()

[...]

TypeError: options must be a list of values or a list of (label, value) tuples

I have seen that you suggested using the Docker version to follow the tutorials in another issue #84, but I have been checking and it seems that new versions of pyvista appeared, so I believe the issue may be different. Also, I would need to run it locally, if possible, so that is why I went this way.

Some additional info:

Fedora 36 Python 3.10.6 pyvista 0.36.1 ipygany 0.5.0

jorgensd commented 1 year ago

I have never been able to reproduce this, so I will close the issue. Please feel free to reopen if you are still experiencing this.