From 849d50fa2a28bd3fe50b9f32020e16577a7bc28c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Baussart?= Date: Thu, 21 Nov 2024 17:08:31 +0100 Subject: [PATCH] fix: updated Workflow.get_topology() to use derived classes --- src/ansys/dpf/core/dpf_operator.py | 6 ++++++ src/ansys/dpf/core/workflow.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ansys/dpf/core/dpf_operator.py b/src/ansys/dpf/core/dpf_operator.py index ca3e6a7a94..e4164a539f 100644 --- a/src/ansys/dpf/core/dpf_operator.py +++ b/src/ansys/dpf/core/dpf_operator.py @@ -370,6 +370,7 @@ def _type_to_output_method(self): collection_base, any, ) + from ansys.dpf.core.workflow_topology import workflow_topology out = [ (any.Any, self._api.operator_getoutput_as_any), @@ -466,6 +467,11 @@ def _type_to_output_method(self): self._api.operator_getoutput_as_any, lambda obj, type: any.Any(server=self._server, any_dpf=obj).cast(type), ), + ( + workflow_topology.WorkflowTopology, + None, + "WorkflowTopology", + ), ] if hasattr(self._api, "operator_getoutput_generic_data_container"): out.append( diff --git a/src/ansys/dpf/core/workflow.py b/src/ansys/dpf/core/workflow.py index ba4356fb4a..23b1ede54f 100644 --- a/src/ansys/dpf/core/workflow.py +++ b/src/ansys/dpf/core/workflow.py @@ -959,7 +959,7 @@ def get_topology(self): workflow_to_workflow_topology_op.inputs.workflow.connect(self) workflow_topology_container = workflow_to_workflow_topology_op.outputs.workflow_topology() - return WorkflowTopology(workflow_topology_container) + return workflow_topology_container def __del__(self): try: