-
Notifications
You must be signed in to change notification settings - Fork 51
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
VTK xml file support with high order lagrange elements #64
Comments
Hi Martin, MFEM (and therefore GLVis) does not support VTK XML files at this time. Of course, adding support for that will be great, however it is currently not a priority for us. On this note, as part of the CEED ECP project, http://ceed.exascaleproject.org/, we are developing a new mesh and field specification, called FMS, http://github.com/CEED/FMS which includes support for more types of finite element fields of arbitrary orders. Currently, if you export (in memory) your mesh and fields to FMS, we can convert them to MFEM representation and send them to GLVis for visualization - this is illustrated in the "PUMI + MFEM demo" in the -Veselin |
Hi Veselin, thanks for the link to FMS, I'll definitely take a closer look. For now I am not sure if there is an easy path to writing these files for me as I do all the mesh handling in python. As for VTK, I figured that the legacy files also support the high order elements with element types defined here: https://www.vtk.org/doc/nightly/html/vtkCellType_8h_source.html Thanks, |
Hi Martin, Can you post a link to the description of the nodes of Tzanio |
Hi Tzanio, actually I don't know if this is documented anywhere, could not find anything. So I did a bit of reverse engineering: I generated single element hex meshes with paraviews unstructured mesh source (make sure to select the Lagrange element type) and saved that to ascii legacy vtk and sorted out the node ordering for Hexes up to order 10 relative to a lexicographic sorting of the nodes in reference coordinates. I could share this in case that is useful for you. Non-uniform sampling works fine this way - I use Gauss-Lobatto in fact. Martin |
Just realizing you asked for |
Thanks Martin, can you share the file? |
We have been looking at Lagrange cells in VTK with @martinvandriel together. I have extracted the relevant code to generate Lagrange quads/hexes of any degree (up to 10 -- this is limitation of VTK itself) and write the mesh in VTK legacy format. Here is the code. For other element types, you will find the relevant code here. BTW, despite the name, this is not limited to Lagrange elements. For RT or ND, you can write cells individually by duplicating the points and writing cell-based solution values at points. You will then be able to visualize discontinuous solution properly, at least Paraview does. |
@agrayver, your last sentence seems to imply that Paraview can read and visualize these high-order VTK meshes and solutions - did I understand that correctly? |
See also mfem/mfem#678 |
As discussed at a recent meeting, it will be nice to add a lite XML parser for reading high-order VTK data, cf. the high-order ParaView output in MFEM. |
A preliminary version of this feature is now available in a branch (see mfem/mfem#1894). For those interested, could you see if this works as intended? |
Discussion continued in mfem/mfem#975 |
Hi,
I am wondering if the VTK xlm file are supported at all (I get an error when I try to open them) or only the legacy format? How about chances to use their recently added support for high order Lagrange elements.
BTW: this statement on http://glvis.org/curvilinear-vtk-meshes/ is a bit misleading, as it is true for the legacy format only: 'Currently VTK does not support cubic, and higher-order meshes.' The XML format can now handle arbitrary order.
thanks for your time and providing a very useful tool,
Martin
The text was updated successfully, but these errors were encountered: