Skip to content
1 change: 1 addition & 0 deletions doc/changelog.d/4600.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update client side 'enhanced' meshing workflow to use server side 'meshing_workflow' root.
24 changes: 12 additions & 12 deletions src/ansys/fluent/core/meshing/meshing_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
from ansys.fluent.core._types import PathType
from ansys.fluent.core.services.datamodel_se import PyMenuGeneric
from ansys.fluent.core.utils.fluent_version import FluentVersion
from ansys.fluent.core.workflow import Workflow
from ansys.fluent.core.workflow_new import Workflow

name_to_identifier_map = {
"Watertight Geometry": "EnableCleanCAD",
Expand Down Expand Up @@ -77,23 +77,23 @@ def __init__(
self._meshing = meshing
self._name = name
self._identifier = identifier
self._unsubscribe_root_affected_callback()
# self._unsubscribe_root_affected_callback()
if initialize:
self._new_workflow(name=self._name)
else:
self._activate_dynamic_interface(dynamic_interface=True)
self._initialized = True

def __getattribute__(self, item: str):
if (
not item.startswith("_")
and super().__getattribute__("_initialized")
and not getattr(self._meshing.GlobalSettings, self._identifier)()
):
raise RuntimeError(
f"'{self._name}' objects are inaccessible from other workflows."
)
return super().__getattribute__(item)
# def __getattribute__(self, item: str):
# if (
# not item.startswith("_")
# and super().__getattribute__("_initialized")
# and not getattr(self._meshing.GlobalSettings, self._identifier)()
# ):
# raise RuntimeError(
# f"'{self._name}' objects are inaccessible from other workflows."
# )
# return super().__getattribute__(item)


class WatertightMeshingWorkflow(MeshingWorkflow):
Expand Down
12 changes: 6 additions & 6 deletions src/ansys/fluent/core/session_base_meshing.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def meshing_workflow(self):
def watertight_workflow(self, initialize: bool = True):
"""Datamodel root of workflow."""
self._current_workflow = WorkflowMode.WATERTIGHT_MESHING_MODE.value(
_make_datamodel_module(self, "workflow"),
_make_datamodel_module(self, "meshing_workflow"),
self.meshing,
self.get_fluent_version(),
initialize,
Expand All @@ -150,7 +150,7 @@ def watertight_workflow(self, initialize: bool = True):
def fault_tolerant_workflow(self, initialize: bool = True):
"""Datamodel root of workflow."""
self._current_workflow = WorkflowMode.FAULT_TOLERANT_MESHING_MODE.value(
_make_datamodel_module(self, "workflow"),
_make_datamodel_module(self, "meshing_workflow"),
self.meshing,
self.PartManagement,
self.PMFileManagement,
Expand All @@ -162,7 +162,7 @@ def fault_tolerant_workflow(self, initialize: bool = True):
def two_dimensional_meshing_workflow(self, initialize: bool = True):
"""Data model root of the workflow."""
self._current_workflow = WorkflowMode.TWO_DIMENSIONAL_MESHING_MODE.value(
_make_datamodel_module(self, "workflow"),
_make_datamodel_module(self, "meshing_workflow"),
self.meshing,
self.get_fluent_version(),
initialize,
Expand All @@ -172,7 +172,7 @@ def two_dimensional_meshing_workflow(self, initialize: bool = True):
def topology_based_meshing_workflow(self, initialize: bool = True):
"""Datamodel root of workflow."""
self._current_workflow = WorkflowMode.TOPOLOGY_BASED_MESHING_MODE.value(
_make_datamodel_module(self, "workflow"),
_make_datamodel_module(self, "meshing_workflow"),
self.meshing,
self.get_fluent_version(),
initialize,
Expand All @@ -182,7 +182,7 @@ def topology_based_meshing_workflow(self, initialize: bool = True):
def load_workflow(self, file_path: PathType):
"""Datamodel root of workflow."""
self._current_workflow = LoadWorkflow(
_make_datamodel_module(self, "workflow"),
_make_datamodel_module(self, "meshing_workflow"),
self.meshing,
os.fspath(file_path),
self.get_fluent_version(),
Expand All @@ -192,7 +192,7 @@ def load_workflow(self, file_path: PathType):
def create_workflow(self, initialize: bool = True):
"""Datamodel root of the workflow."""
self._current_workflow = CreateWorkflow(
_make_datamodel_module(self, "workflow"),
_make_datamodel_module(self, "meshing_workflow"),
self.meshing,
self.get_fluent_version(),
initialize,
Expand Down
Loading
Loading