Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demonstrate ParaView-like VTK viewer in notebooks #5

Open
nikosavola opened this issue Jan 20, 2023 · 2 comments
Open

Demonstrate ParaView-like VTK viewer in notebooks #5

nikosavola opened this issue Jan 20, 2023 · 2 comments
Labels

Comments

@nikosavola
Copy link
Contributor

Make an example notebook of simulating something in Elmer and looking at the resulting field with something like https://itkwidgets.readthedocs.io/en/latest/integrations.html#vtk for a fully notebook workflow.

@nikosavola
Copy link
Contributor Author

There's also pyVista which looks really good

@Dzupdu
Copy link

Dzupdu commented Jan 9, 2024

Pyvista seems to work really nicely and with the correct packages installed the images can be rendered interactively such that the can be rotated and zoomed in the notebook

Example code:

# might need to install also trame and trame-vtk packages
import pyvista

ds = pyvista.read('./waveguides_n_guides_1_f10_t0001.pvtu')
ds = ds.threshold(scalars='GeometryIds', value=(1,1))
ds.plot(scalars='electric field re e', cpos='yx', zoom=4.0)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants