Exception to plot MeshesContainers containing empty meshes #1491
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
An exception is introduced in the code that plots
MeshesContainers
to be able to plot it if any of theMeshedRegion
s in the container is empty. While working lately with isocontours in distributed, it may be the case that an isocontour does not pass through a given partition of the spatial domain. If that is the case, the isocontour mesh for that partition is an empty mesh (as it should, with 0 nodes and 0 elements). If all the isocontours are stored in a MeshesContainer, you end up with several meshes being empty and some not. As a user, I'd like to domeshes_container.plot()
and still have a plot. This PR enables that.Tested interactively with a
MeshesContainer
comprised of entirely empty meshes and a white pyvista plotter pops-up (as it should).