Skip to content

Conversation

@ajain-work
Copy link
Contributor

Local surfaces should be available for graphics and plot objects.

"""Base class for post objects."""

def _pre_display(self):
local_surfaces_provider = (
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It creates local surface in Fluent.

(),
)

def _post_display(self):
Copy link
Contributor Author

@ajain-work ajain-work Mar 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It deletes local surface in Fluent.

return list(
self._data_extractor.field_info().get_surfaces_info().keys()
)
) + list(self._get_top_most_parent()._local_surfaces_provider())
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Local surfaces become available along with surfaces in Fluent.

assert range[0] == pytest.approx(iso_surf.iso_value())

cont1 = pyvista_graphics.Contours["surf-1"]
assert "surf-1" in cont1.surfaces_list.allowed_values
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

surf-1 is now available.


matplotlib_plots = Plots(session=None)
p1 = matplotlib_plots.XYPlots["p-1"]
assert "surf-1" not in p1.surfaces_list.allowed_values
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By default not available in matplotlib for xy plots.


local_surfaces_provider = Graphics(session=None).Surfaces
matplotlib_plots = Plots(session=None, local_surfaces_provider=local_surfaces_provider)
assert "surf-1" in p1.surfaces_list.allowed_values
Copy link
Contributor Author

@ajain-work ajain-work Mar 31, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With local surface provider "surf-1" becomes available.

@ajain-work ajain-work force-pushed the feat/local_surface_provider branch from fa8caca to adaa900 Compare March 31, 2022 12:58
@ajain-work ajain-work marked this pull request as ready for review March 31, 2022 12:59
@ajain-work ajain-work linked an issue Mar 31, 2022 that may be closed by this pull request
Copy link
Collaborator

@dnwillia-work dnwillia-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's a local surface? Are you going to add documentation and examples?

@ajain-work ajain-work force-pushed the feat/local_surface_provider branch from adaa900 to 2bc21b9 Compare March 31, 2022 15:13
@ajain-work ajain-work force-pushed the feat/local_surface_provider branch from 2bc21b9 to 22c2ded Compare March 31, 2022 15:36
@ajain-work
Copy link
Contributor Author

What's a local surface? Are you going to add documentation and examples?

@dnwillia-work All object created under post module are local to client i.e. they are not created on server. So surfaces are also local. Yes will add examples.

@ajain-work ajain-work merged commit c8ec1ef into main Apr 1, 2022
@ajain-work ajain-work deleted the feat/local_surface_provider branch April 1, 2022 04:43
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.

Unable to create Contours based on iso-surfaces

3 participants