-
Notifications
You must be signed in to change notification settings - Fork 11
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
get_field(vtk) function added to get FieldData from VTK #42
Conversation
in order to be able to read FieldData from VTK files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this contribution 🙏! This PR seems to be on the right track. There are some usability issues open (see the comments), and it would be great if you could add some simple tests for the new functionality.
Thanks for the suggestions! I just introduced them into my last commit. |
Thanks a lot also from my side! Could you please add some tests of the new functionality? See |
Hi! I don't have much experiences writing tests, and much less in Julia; so I'm not sure about where to start... Also, I did a quick check through the vtk files you use for your tests and none of them have any field data, so using them would not be desirable for such a test. I have done some work with a dummy vtk file I have locally and it works as expected:
In this case, fieldData behaves as a ReadVTK.VTKData and nx reads the expected value. This might help you appending some field data to one of your vtk files and preparing a test. |
The example files are collected in the repository https://github.com/JuliaVTK/ReadVTK_examples. You can open a PR there and upload a new file containing some field data. When that PR is merged, you can update the commit hash in Lines 5 to 9 in 7668d43
accordingly and write a proper test here. |
Introduced functions 'get_field' and 'field_data' in order to be able to read FieldData from VTK files.