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
1 change: 1 addition & 0 deletions src/ansys/dpf/core/operators/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"NMISC": "mapdl::nmisc",
"SMISC": "mapdl::smisc",
"result_provider": "custom",
"CS": "mapdl::rst::CS",
}

def build_docstring(specification_description):
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/dpf/core/operators/operator.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class {{class_name}}(Operator):
try:
super().__init__(name="{{operator_name}}", config=config, server=server)
except (KeyError, errors.DPFServerException) as e:
if "doesn't exist in the registry" in str(e):
if "doesn't exist" in str(e):
super().__init__(name="{{internal_name_alias}}", config=config, server=server)
else:
raise e
Expand Down
9 changes: 8 additions & 1 deletion src/ansys/dpf/core/operators/result/coordinate_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from __future__ import annotations

from warnings import warn
from ansys.dpf.core.core import errors
from ansys.dpf.core.dpf_operator import Operator
from ansys.dpf.core.inputs import Input, _Inputs
from ansys.dpf.core.outputs import Output, _Outputs
Expand Down Expand Up @@ -64,7 +65,13 @@ def __init__(
config=None,
server=None,
):
super().__init__(name="CS", config=config, server=server)
try:
super().__init__(name="CS", config=config, server=server)
except (KeyError, errors.DPFServerException) as e:
if "doesn't exist" in str(e):
super().__init__(name="mapdl::rst::CS", config=config, server=server)
else:
raise e
self._inputs = InputsCoordinateSystem(self)
self._outputs = OutputsCoordinateSystem(self)
if cs_id is not None:
Expand Down
9 changes: 2 additions & 7 deletions tests/operators/test_coordinate_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,8 @@

def test_operator_coordinate_system_rst(server_type):
model = dpf.Model(examples.download_hemisphere(server=server_type), server=server_type)
if conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1:
# Starting with DPF 2025.1.pre1
cs = dpf.operators.result.coordinate_system(server=server_type)
cs.inputs.data_sources.connect(model)
else:
# For previous DPF versions
cs = model.operator(r"mapdl::rst::CS")
cs = dpf.operators.result.coordinate_system(server=server_type)
cs.inputs.data_sources.connect(model)
cs.inputs.cs_id.connect(12)
cs_rot_mat = cs.outputs.field().data
ref = np.array(
Expand Down