I am a new user of fenicsx. When I tried the tutorial on solving the Poisson equation, I ran into a problem with the visualization part.
Actually, I am running the program in Pycharm. When I run to use Pyvista to show the results, the program starts to run but cannot stop for a long time. In these lines
if not pyvista.OFF_SCREEN:
plotter.show()
else:
figure = plotter.screenshot("fundamentals_mesh.png")
However, it works if I didn’t use the unstructured grid, such as
Are you running the notebook in pycharm, or a pythonscript in pycharm?
For your second example, you are using pythreejs, which is no longer part of pyvista’s backend.
Could you please specify what versions of pyvista you are using.
Thirdly, in the latter example, you have not added a “show” command, so it is unclear if you are using the same logic as in your first snippet.
At first, I run the code in the pythonscrpit in pycharm.
Secondly, I’m sorry that I forget to tell you I have removed the pythreejs in the brackets. The second example works. And my pyvista version is 0.43.1 which is the latest version.
Finally, I run plotter.show() but it still doesn’t stopped and nothing appear.