Hi Steven,
Thanks for writing! And, thank you very much for providing the notebook,
which I was able to use to replicate what you're seeing.
I had to make only a minor set of changes to your notebook. The key
changes are here:
data = dict({('connect1', 'test1') : U[Mconn]})
ds = yt.load_unstructured_mesh(Mconn, Mcoords, node_data=data)
(Note that node_data is not strictly necessary here.)
This let me do a slice plot and annotation, just like in the docs, which
I've attached here.
This is a fun application -- I think it would be really cool to work on
making this more integrated into yt! I've issued a PR to make our
unstructured mesh docs a bit clearer, too. (
https://github.com/yt-project/yt/pull/1782 ) There's a lot of room for
improvement in our support of unstructured mesh, but it's definitely an
area we want to grow in.
-Matt
[image: slice_image.png]
On Tue, May 15, 2018 at 8:08 AM Steven Armour
FENICS is one of the most popular FEM solvers and considered one of the best FEM solvers for Python as well as being a sibling NumFocues project. The outputs of fenics is the dolfin-XML or .pvd/.vtu . And thus Fenics has traditionally relied on VTK to view its outputs. I would like to, however, move from the nightmare install that is VTK to using yt to view the output.
The issue is that fenics only supports tetrahedral meshes with on mesh point data. Whereas from reading http://yt-project.org/doc/examining/loading_data.html sections: Generic Array Data, Semi-Structured Grid Data as well as http://yt-project.org/doc/visualizing/unstructured_mesh_rendering.html that yt does or does not load tetrahedral data and does not load on mesh point data but instead cell-centered data.
I have tried using the meshio library to convert from .vtu to .e (exodus II) with no success.
There is also an example notebook based on one of the examples from the fenics tutorials here https://github.com/GProtoZeroW/IssueNotebooks/blob/master/FENICS%20YT.ipynb
So what would be ideal is to get a loader method that reads in a fenics object to yt to bypass any writing to a file so that one can get visulisations like what has been done with the MOOSE ex ( http://yt-project.org/doc/visualizing/unstructured_mesh_rendering.html) but with FENICS _______________________________________________ yt-users mailing list -- yt-users@python.org To unsubscribe send an email to yt-users-leave@python.org