File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed
src/ansys/dpf/core/operators Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 2323 "NMISC" : "mapdl::nmisc" ,
2424 "SMISC" : "mapdl::smisc" ,
2525 "result_provider" : "custom" ,
26+ "CS" : "mapdl::rst::CS" ,
2627}
2728
2829def build_docstring (specification_description ):
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ class {{class_name}}(Operator):
9393 try:
9494 super().__init__(name="{ {operator_name} }", config=config, server=server)
9595 except (KeyError, errors.DPFServerException) as e:
96- if "doesn't exist in the registry " in str(e):
96+ if "doesn't exist" in str(e):
9797 super().__init__(name="{ {internal_name_alias} }", config=config, server=server)
9898 else:
9999 raise e
Original file line number Diff line number Diff line change 77from __future__ import annotations
88
99from warnings import warn
10+ from ansys .dpf .core .core import errors
1011from ansys .dpf .core .dpf_operator import Operator
1112from ansys .dpf .core .inputs import Input , _Inputs
1213from ansys .dpf .core .outputs import Output , _Outputs
@@ -64,7 +65,13 @@ def __init__(
6465 config = None ,
6566 server = None ,
6667 ):
67- super ().__init__ (name = "CS" , config = config , server = server )
68+ try :
69+ super ().__init__ (name = "CS" , config = config , server = server )
70+ except (KeyError , errors .DPFServerException ) as e :
71+ if "doesn't exist" in str (e ):
72+ super ().__init__ (name = "mapdl::rst::CS" , config = config , server = server )
73+ else :
74+ raise e
6875 self ._inputs = InputsCoordinateSystem (self )
6976 self ._outputs = OutputsCoordinateSystem (self )
7077 if cs_id is not None :
Original file line number Diff line number Diff line change 3030
3131def test_operator_coordinate_system_rst (server_type ):
3232 model = dpf .Model (examples .download_hemisphere (server = server_type ), server = server_type )
33- if conftest .SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_9_1 :
34- # Starting with DPF 2025.1.pre1
35- cs = dpf .operators .result .coordinate_system (server = server_type )
36- cs .inputs .data_sources .connect (model )
37- else :
38- # For previous DPF versions
39- cs = model .operator (r"mapdl::rst::CS" )
33+ cs = dpf .operators .result .coordinate_system (server = server_type )
34+ cs .inputs .data_sources .connect (model )
4035 cs .inputs .cs_id .connect (12 )
4136 cs_rot_mat = cs .outputs .field ().data
4237 ref = np .array (
You can’t perform that action at this time.
0 commit comments