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
Added support for VTK #15266
Added support for VTK #15266
Conversation
I'll let @tamiko do the review. Out of curiosity, what features in VTK do you plan on using? |
Most importantly, reading a (surface or volume) field from a This will involve VTK filters like cell and point locators. An example can be found here, where, inheriting from |
Ah, very cool -- something like |
/rebuild |
Is there also a possibility here to export/import refined triangulations in a backward-compatible way? Current approach based on the boost-serialization library is not backward compatible and, in practice, breaks with each major release (say meshes created/saved with 9.3 cannot be read with 9.4 and so on...). |
Personally I've never used VTK for this purpose, but it's something worth investigating for sure. |
4ca056c
to
7cfb2e0
Compare
A note about the Linux workflow: installing In particular, The current workaround is to build VTK manually, but this takes ~45 minutes and I guess it is too much (?). |
Can you try to add at the end
(notice the |
Thanks for the hint! Unfortunately, libvtk9-dev cannot be installed without libtbb-dev. PS: |
fb0270f
to
a39d21f
Compare
Another solution I've come up with is to define a new workflow, which only builds the VTK wrappers. Opinions? |
My preference would be to add vtk as a dependency in the docker image dealii/dependencies:jammy (or focal) and use that one to build one of the workflow. |
Let's wait for #15278 to be discussed/merged before continuing with this PR. |
Thanks Pasquale! |
Would you mind rebasing and squashing into a couple of significative commits? |
bce0e58
to
a446dd0
Compare
Done! From my side, it looks ready to merge. |
@tamiko, would you mind taking a look at the cmake stuff? I am fine with everything, but you are working on restructuring stuff.... |
Also, @pcafrica, would you mind adding |
Done! PS: the pipeline fails with error We could try adding
but I don't know if this has implications on the GitHub side. @luca-heltai any clues? |
Ah, yes. You have to run the pipeline as user root: In the workflow:
This should work. |
I think we also need to set
|
Please fix the merge conflicts. |
foreach(_configuration ${_configurations}) | ||
get_target_property(_imported_location ${_library} IMPORTED_LOCATION_${_configuration}) | ||
list(APPEND _libraries ${_imported_location}) | ||
endforeach() |
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.
Let us merge this for now
We should support simply listing all targets now, though - but I suggest we try this out in a follow-up pull request.
After a discussion with @luca-heltai and @fdrmrc, we would like to add support for the VTK library in deal.II.
VTK can be used for importing scalar or vector fields, evaluate/interpolate/project them onto a triangulation and many other geometry handling tasks. We plan to support versions higher or equal to 9.0.0. These features should complement the use of CGAL.
VTK has already been extensively tested and used within lifex and we aim to port existing functionalities from lifex to deal.II. I expect many more PR to follow once this is accepted.
TODO: