@@ -59,7 +59,7 @@ def plot_scalar():
59
59
60
60
# To visualize the function u, we create a VTK-compatible grid to
61
61
# values of u to
62
- cells , types , x = plot .create_vtk_mesh (V )
62
+ cells , types , x = plot .vtk_mesh (V )
63
63
grid = pyvista .UnstructuredGrid (cells , types , x )
64
64
grid .point_data ["u" ] = u .x .array
65
65
@@ -110,7 +110,7 @@ def in_circle(x):
110
110
cell_tags = meshtags (msh , msh .topology .dim , np .arange (num_cells ), in_circle (midpoints ))
111
111
112
112
# Create VTK mesh
113
- cells , types , x = plot .create_vtk_mesh (msh )
113
+ cells , types , x = plot .vtk_mesh (msh )
114
114
grid = pyvista .UnstructuredGrid (cells , types , x )
115
115
116
116
# Attach the cells tag data to the pyvita grid
@@ -128,7 +128,7 @@ def in_circle(x):
128
128
# We can visualize subsets of data, by creating a smaller topology
129
129
# (set of cells). Here we create VTK mesh data for only cells with
130
130
# that tag '1'.
131
- cells , types , x = plot .create_vtk_mesh (msh , entities = cell_tags .find (1 ))
131
+ cells , types , x = plot .vtk_mesh (msh , entities = cell_tags .find (1 ))
132
132
133
133
# Add this grid to the second plotter window
134
134
sub_grid = pyvista .UnstructuredGrid (cells , types , x )
@@ -173,7 +173,7 @@ def in_circle(x):
173
173
174
174
# Create a topology that has a 1-1 correspondence with the
175
175
# degrees-of-freedom in the function space V
176
- cells , types , x = plot .create_vtk_mesh (V )
176
+ cells , types , x = plot .vtk_mesh (V )
177
177
178
178
# Create a pyvista mesh and attach the values of u
179
179
grid = pyvista .UnstructuredGrid (cells , types , x )
@@ -184,7 +184,7 @@ def in_circle(x):
184
184
# that as we have done previously
185
185
num_cells = msh .topology .index_map (msh .topology .dim ).size_local
186
186
cell_entities = np .arange (num_cells , dtype = np .int32 )
187
- cells , types , x = plot .create_vtk_mesh (msh , entities = cell_entities )
187
+ cells , types , x = plot .vtk_mesh (msh , entities = cell_entities )
188
188
org_grid = pyvista .UnstructuredGrid (cells , types , x )
189
189
190
190
# We visualize the data
@@ -218,7 +218,7 @@ def plot_nedelec():
218
218
position = "upper_edge" , font_size = 14 , color = "black" )
219
219
220
220
# Next, we create a pyvista.UnstructuredGrid based on the mesh
221
- pyvista_cells , cell_types , x = plot .create_vtk_mesh (msh )
221
+ pyvista_cells , cell_types , x = plot .vtk_mesh (msh )
222
222
grid = pyvista .UnstructuredGrid (pyvista_cells , cell_types , x )
223
223
224
224
# Add this grid (as a wireframe) to the plotter
@@ -241,7 +241,7 @@ def plot_nedelec():
241
241
242
242
# Create a second grid, whose geometry and topology is based on the
243
243
# output function space
244
- cells , cell_types , x = plot .create_vtk_mesh (V0 )
244
+ cells , cell_types , x = plot .vtk_mesh (V0 )
245
245
grid = pyvista .UnstructuredGrid (cells , cell_types , x )
246
246
247
247
# Create point cloud of vertices, and add the vertex values to the cloud
@@ -271,7 +271,7 @@ def plot_streamlines():
271
271
u = Function (V , dtype = np .float64 )
272
272
u .interpolate (lambda x : np .vstack ((- (x [1 ] - 0.5 ), x [0 ] - 0.5 , np .zeros (x .shape [1 ]))))
273
273
274
- cells , types , x = plot .create_vtk_mesh (V )
274
+ cells , types , x = plot .vtk_mesh (V )
275
275
num_dofs = x .shape [0 ]
276
276
values = np .zeros ((num_dofs , 3 ), dtype = np .float64 )
277
277
values [:, :msh .geometry .dim ] = u .x .array .reshape (num_dofs , V .dofmap .index_map_bs )
0 commit comments