File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 13
13
- uses : actions/checkout@v3
14
14
15
15
- name : Install dependencies
16
- run : python3 -m pip install pyvista
16
+ run : python3 -m pip install --break-system-packages pyvista
17
17
18
18
- name : Run unit tests
19
19
run : python3 -m pytest test/
Original file line number Diff line number Diff line change 15
15
@functools .singledispatch
16
16
def _to_pyvista_grid (mesh : dolfinx .mesh .Mesh , tdim : int ,
17
17
entities = None ):
18
+ mesh .topology .create_connectivity (0 , tdim )
19
+ mesh .topology .create_connectivity (tdim , mesh .topology .dim )
18
20
return pyvista .UnstructuredGrid (* dolfinx .plot .vtk_mesh (
19
21
mesh , tdim , entities ))
20
22
@@ -110,7 +112,7 @@ def create_plottable_ufl_expression(
110
112
111
113
112
114
def plot_function (u : dolfinx .fem .function .Function ,
113
- plotter : pyvista .Plotter = None ):
115
+ plotter : pyvista .Plotter = None , ** pv_args ):
114
116
if plotter is None :
115
117
plotter = pyvista .Plotter ()
116
118
@@ -122,7 +124,8 @@ def plot_function(u: dolfinx.fem.function.Function,
122
124
# No data on process
123
125
return plotter
124
126
125
- plotter .add_mesh (grid , scalars = u .name , show_scalar_bar = True )
127
+ pv_args .setdefault ("show_scalar_bar" , True )
128
+ plotter .add_mesh (grid , scalars = u .name , ** pv_args )
126
129
127
130
if mesh .geometry .dim == 2 :
128
131
plotter .enable_parallel_projection ()
You can’t perform that action at this time.
0 commit comments