Skip to content

Commit

Permalink
bug fix for plot with a distributed mesh
Browse files Browse the repository at this point in the history
  • Loading branch information
pierricmora committed Dec 7, 2023
1 parent bd758cb commit 9b154f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion elastodynamicsx/solutions/modalbasis.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ def plot(self, function_space:'dolfinx.fem.function_space', which='all', **kwarg
grid = pyvista.UnstructuredGrid(topology, cell_types, geom)
for i, eigM in zip(indexes, eigenmodes):
nbpts = grid.number_of_points
grid['eigenmode_'+str(i)] = elastodynamicsx.plot.get_3D_array_from_nparray(np.array(eigM), nbpts)
with eigM.localForm() as loc_eigM: # Necessary for correct handling of ghosts in parallel
grid['eigenmode_'+str(i)] = elastodynamicsx.plot.get_3D_array_from_nparray(loc_eigM.array, nbpts)

nbcols = int(np.ceil(np.sqrt(indexes.size)))
nbrows = int(np.ceil(indexes.size/nbcols))
Expand Down

0 comments on commit 9b154f9

Please sign in to comment.