MCPcopy
hub / github.com/tum-pbs/PhiFlow / plot

Method plot

phi/vis/_dash/_plotly_plots.py:687–703  ·  view source on GitHub ↗
(self,
             data: Field,
             figure: go.Figure,
             subplot,
             space: Box,
             min_val: float,
             max_val: float,
             show_color_bar: bool,
             color: Tensor,
             alpha: Tensor,
             err: Tensor)

Source from the content-addressed store, hash-verified

685 return isinstance(data.geometry, (SDF, SDFGrid)) and data.spatial_rank == 3
686
687 def plot(self,
688 data: Field,
689 figure: go.Figure,
690 subplot,
691 space: Box,
692 min_val: float,
693 max_val: float,
694 show_color_bar: bool,
695 color: Tensor,
696 alpha: Tensor,
697 err: Tensor):
698 def plot_single_material(data: Field, color, alpha: float):
699 with math.NUMPY:
700 surf_mesh = geom.surface_mesh(data.geometry)
701 mesh_data = Field(surf_mesh, math.NAN, 0)
702 SurfaceMesh3D().plot(mesh_data, figure, subplot, space, min_val, max_val, show_color_bar, color, alpha, err)
703 math.map(plot_single_material, data, color, alpha, dims=channel(data.geometry) - 'vector', unwrap_scalars=False)
704
705
706class SplineSheet3D(Recipe):

Callers 2

plot_single_materialMethod · 0.45
plotMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected