Skip to content

Do not skip serializing number of cells for VTU output?#31

Open
Andlon wants to merge 1 commit intoelrnv:masterfrom
Andlon:dont_skip_serializing_numberofcells
Open

Do not skip serializing number of cells for VTU output?#31
Andlon wants to merge 1 commit intoelrnv:masterfrom
Andlon:dont_skip_serializing_numberofcells

Conversation

@Andlon
Copy link
Collaborator

@Andlon Andlon commented May 19, 2023

ParaView and meshio complain when NumberOfCells="0" is missing in the output XML. I'm not sure what the reason is for skipping it, but apparently not skipping the serialization is sufficient to fix ParaView. meshio seems to have other troubles. I glanced at the code of meshio and it might just be that their logic is broken for empty meshes. I'm not entirely sure as I'm not so fluent in the style of Python they use.

I wanted to add a test but I couldn't quite figure out the structure of tests, i.e. where to put it, and how best to create a test like this. With some hints I might be able to do that.

ParaView and meshio complain when NumberOfCells="0" is missing in the
output XML.
@Andlon Andlon changed the title Do not skip serializing number of cells for VTU output Do not skip serializing number of cells for VTU output? May 19, 2023
@elrnv
Copy link
Owner

elrnv commented Jun 7, 2023

Hi @Andlon! thanks the PR! Could you include a new test in the tests subdirectory called "paraview.rs" and add your test there? You can think of each test file being there to address a certain class of features (legacy vs. xml vtk files) or compatibility (pygmesh/meshio). Please indicate the version of ParaView in the comments of the test. Could you also add a subdir in the assets folder called "paraview" and place your test file there so it's easy to find when working with paraview compatibility issues.

Let me know if you have ideas of how to organize the tests. There didn't seem to be a need for this before since there are not a lot of tests.

@elrnv
Copy link
Owner

elrnv commented Jun 8, 2023

I think the reason why number of cells is not serialized is to omit it from polygon meshes, which are not supposed to have cells. This is why the test is failing. Perhaps we should decide what to serialize based on the type of mesh.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants