Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion requirements/requirements_docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jupyter_sphinx==0.5.3
nbsphinx==0.9.5
pypandoc==1.15
pytest-sphinx==0.6.3
pyvista==0.45.3
pyvista==0.46.0
sphinx==8.2.3
sphinx-copybutton==0.5.2
sphinx-gallery==0.19.0
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ pytest==8.4.1
pytest-cov==6.2.1
pytest-order==1.3.0
pytest-rerunfailures==15.0
pyvista==0.45.3
pyvista==0.46.0
vtk==9.4.2
2 changes: 1 addition & 1 deletion src/ansys/dpf/core/helpers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def _sort_supported_kwargs(bound_method, **kwargs):

warnings.simplefilter("ignore")
# Get supported arguments
supported_args = inspect.getfullargspec(bound_method).args
supported_args = inspect.signature(bound_method).parameters.keys()
kwargs_in = {}
kwargs_not_avail = {}
# Filter the given arguments
Expand Down
15 changes: 12 additions & 3 deletions src/ansys/dpf/core/vtk_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,18 @@ def dpf_mesh_to_vtk_op(mesh, nodes=None, as_linear=True):
celltypes_pv = mesh_to_pyvista.outputs.cell_types()
if VTK9:
grid = pv.UnstructuredGrid(cells_pv, celltypes_pv, nodes_pv)
setattr(grid, "_dpf_cache_op", [cells_pv, celltypes_pv, nodes_pv])
# setattr(grid, "_dpf_cache_op", [cells_pv, celltypes_pv, nodes_pv])
pv.set_new_attribute(
obj=grid, name="_dpf_cache_op", value=[cells_pv, celltypes_pv, nodes_pv]
)
return grid
else:
offsets_pv = mesh_to_pyvista.outputs.offsets()
grid = pv.UnstructuredGrid(offsets_pv, cells_pv, celltypes_pv, nodes_pv)
setattr(grid, "_dpf_cache_op", [cells_pv, celltypes_pv, nodes_pv, offsets_pv])
# setattr(grid, "_dpf_cache_op", [cells_pv, celltypes_pv, nodes_pv, offsets_pv])
pv.set_new_attribute(
obj=grid, name="_dpf_cache_op", value=[cells_pv, celltypes_pv, nodes_pv, offsets_pv]
)
return grid


Expand Down Expand Up @@ -350,7 +356,10 @@ def compute_offset():

# Quick fix required to hold onto the data as PyVista does not make a copy.
# All of those now return DPFArrays
setattr(grid, "_dpf_cache", [node_coordinates, coordinates_field])
# setattr(grid, "_dpf_cache", [node_coordinates, coordinates_field])
pv.set_new_attribute(
obj=grid, name="_dpf_cache", value=[node_coordinates, coordinates_field]
)

return grid

Expand Down
Loading