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

Bugfix: writevtk with empty parts #158

Merged
merged 3 commits into from
Nov 7, 2024
Merged

Bugfix: writevtk with empty parts #158

merged 3 commits into from
Nov 7, 2024

Conversation

JordiManyer
Copy link
Member

@JordiManyer JordiManyer commented Oct 22, 2024

This is a PR to solve a quite niche issue that happens when we try to write out a pvtk file where some of the files are empty, i.e when the Triangulation is empty in some processors.

In that case, we would still be creating a file per processor and end up with some empty files. Notably, these empty files would be missing the tags for the fields we wanted to export. This breaks the paraview import, making the files unusable.

As a solution, I filter out the processors with empty Triangulations and remap the processor ids to only create as many files as nonempty processors.

Edit: This has now been tested with fairly complicated meshes and more than 100 processors, and everything seems to work fine. The only question then is if this is the best approach or not.

@JordiManyer JordiManyer added the bug Something isn't working label Oct 22, 2024
@JordiManyer JordiManyer self-assigned this Oct 22, 2024
@JordiManyer JordiManyer merged commit 503d029 into master Nov 7, 2024
6 checks passed
@JordiManyer JordiManyer deleted the bugfix-vtk branch November 7, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant