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

Implement missing features to enable compatibility with python's meshio #22

Closed
wants to merge 16 commits into from

Conversation

elrnv
Copy link
Owner

@elrnv elrnv commented Oct 2, 2022

This PR addresses issue #21. The changes involved were:

  • Updated the legacy parser to work with offsets and connectivity arrays. This allows new v5 legacy formats to be accepted by vtkio.
  • Enable support for different integer types for storing cell types. Now cell types can be specified as Int64.
  • Updated default header_type to UInt32 which is consistent with how ParaView interprets XML files without header_type specified.
  • Implement compression support for individual (inline) DataArrays.

Added a parser for OFFSETS and CONNECTIVITY tags within legacy vtk files
that mimic the way the xml file work.

There is a new version of legacy vtk files (seemingly v5 and up) that
specify cells via OFFSETS and CONNECTIVITY tags. This parser adds
support for that.

See issue #21 for exmaples.

This commit addresses the parsing of the legacy files in that issue.
Added the ability to write cells in new offsets + connectivity format
for vtk versions 5+.

See issue #21 for details.
Usage of this function is replaced by the generic write_vec function
implemented in the previous commit.
This is where prototype assets can be stored which are used for
temporary testing or large files that should not be committed to the
repo.
This is taken from issue #21.

All credit for these test files and gen.py script goes to @2pt0
Since some files can give non uint8 type cell types, we explicitly cast
everything to the right type instead of expecting it to be given
correctly. This helps parse files generated by meshio (See issue #21)
One of the previous commits fixes the issue. This commit fixes the test for
meshio generated files.
Clarify usage of xml and legacy formats, without renaming (yet).
This makes the results more consistent with paraview.
It also passes on one additional testcase from pygmsh.
Each inline (non-appended) binary DataArray now supports compression in the
same way appended data did before.

This commit concludes fixes for all failing meshes from issue #21.

The remaining pygmsh tests are now enabled.
@elrnv
Copy link
Owner Author

elrnv commented Feb 17, 2023

This PR was superseded by #24

@elrnv elrnv closed this Feb 17, 2023
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.

None yet

1 participant