diff --git a/src/ansys/fluent/core/meshing/meshing_workflow.py b/src/ansys/fluent/core/meshing/meshing_workflow.py index c7fa3fdd179..59bd90347db 100644 --- a/src/ansys/fluent/core/meshing/meshing_workflow.py +++ b/src/ansys/fluent/core/meshing/meshing_workflow.py @@ -7,7 +7,7 @@ from ansys.fluent.core.services.datamodel_se import PyMenuGeneric from ansys.fluent.core.utils.fluent_version import FluentVersion -from ansys.fluent.core.workflow import ClassicWorkflow, Workflow +from ansys.fluent.core.workflow import Workflow name_to_identifier_map = { "Watertight Geometry": "EnableCleanCAD", @@ -17,31 +17,6 @@ } -class ClassicMeshingWorkflow(ClassicWorkflow): - """Provides meshing specialization of the workflow wrapper.""" - - def __init__( - self, - workflow: PyMenuGeneric, - meshing: PyMenuGeneric, - fluent_version: FluentVersion, - ) -> None: - """Initialize ClassicMeshingWorkflow. - - Parameters - ---------- - workflow : PyMenuGeneric - Underlying workflow object. - meshing : PyMenuGeneric - Meshing object. - fluent_version: FluentVersion - Version of Fluent in this session. - """ - super().__init__( - workflow=workflow, command_source=meshing, fluent_version=fluent_version - ) - - class MeshingWorkflow(Workflow): """Provides meshing specialization of the workflow wrapper that extends the core functionality in an object-oriented manner.""" @@ -260,7 +235,6 @@ def __init__( class WorkflowMode(Enum): """Provides an enum of supported Fluent meshing workflow modes.""" - CLASSIC_MESHING_MODE = ClassicMeshingWorkflow WATERTIGHT_MESHING_MODE = WatertightMeshingWorkflow FAULT_TOLERANT_MESHING_MODE = FaultTolerantMeshingWorkflow TWO_DIMENSIONAL_MESHING_MODE = TwoDimensionalMeshingWorkflow diff --git a/src/ansys/fluent/core/session_base_meshing.py b/src/ansys/fluent/core/session_base_meshing.py index 0eee8ff9215..477828c12a7 100644 --- a/src/ansys/fluent/core/session_base_meshing.py +++ b/src/ansys/fluent/core/session_base_meshing.py @@ -122,12 +122,8 @@ def meshing_utilities(self): @property def workflow(self): """Datamodel root of workflow.""" - if not self._old_workflow: - self._old_workflow = WorkflowMode.CLASSIC_MESHING_MODE.value( - _make_datamodel_module(self, "workflow"), - self.meshing, - self.get_fluent_version(), - ) + if self._old_workflow is None: + self._old_workflow = _make_datamodel_module(self, "workflow") return self._old_workflow def watertight_workflow(self, initialize: bool = True): diff --git a/src/ansys/fluent/core/workflow.py b/src/ansys/fluent/core/workflow.py index 623c8b1ff75..9e65cb5a847 100644 --- a/src/ansys/fluent/core/workflow.py +++ b/src/ansys/fluent/core/workflow.py @@ -180,7 +180,7 @@ class BaseTask: def __init__( self, - command_source: ClassicWorkflow | Workflow, + command_source: Workflow, task: str, ) -> None: """Initialize BaseTask. @@ -937,7 +937,7 @@ class CommandTask(BaseTask): def __init__( self, - command_source: ClassicWorkflow | Workflow, + command_source: Workflow, task: str, ) -> None: """Initialize CommandTask. @@ -1006,7 +1006,7 @@ class SimpleTask(CommandTask): def __init__( self, - command_source: ClassicWorkflow | Workflow, + command_source: Workflow, task: str, ) -> None: """Initialize SimpleTask. @@ -1034,7 +1034,7 @@ class CompoundChild(SimpleTask): def __init__( self, - command_source: ClassicWorkflow | Workflow, + command_source: Workflow, task: str, ) -> None: """Initialize CompoundChild. @@ -1079,7 +1079,7 @@ class CompositeTask(BaseTask): def __init__( self, - command_source: ClassicWorkflow | Workflow, + command_source: Workflow, task: str, ) -> None: """Initialize CompositeTask. @@ -1131,7 +1131,7 @@ class ConditionalTask(CommandTask): def __init__( self, - command_source: ClassicWorkflow | Workflow, + command_source: Workflow, task: str, ) -> None: """Initialize ConditionalTask. @@ -1166,7 +1166,7 @@ class CompoundTask(CommandTask): def __init__( self, - command_source: ClassicWorkflow | Workflow, + command_source: Workflow, task: str, ) -> None: """Initialize CompoundTask. diff --git a/tests/test_meshing_workflow.py b/tests/test_meshing_workflow.py index d7995618398..cfcfe9d3aeb 100644 --- a/tests/test_meshing_workflow.py +++ b/tests/test_meshing_workflow.py @@ -231,7 +231,6 @@ def test_nonexistent_attrs(new_meshing_session): assert not hasattr(meshing.workflow, "xyz") with pytest.raises(AttributeError) as msg: meshing.workflow.xyz - assert msg.value.args[0] == "'ClassicMeshingWorkflow' object has no attribute 'xyz'" @pytest.mark.codegen_required @@ -242,10 +241,6 @@ def test_old_workflow_structure(new_meshing_session): assert meshing.workflow.TaskObject["Import Geometry"] with pytest.raises(AttributeError) as msg: meshing.workflow.import_geometry - assert ( - msg.value.args[0] - == "'ClassicMeshingWorkflow' object has no attribute 'import_geometry'" - ) @pytest.mark.nightly