Skip to content

Commit 445fdd9

Browse files
committed
Revert "Fix Operator.eval() in case output pin 0 is not named "fields_container" (#1527)"
This reverts commit b777188.
1 parent 4efb471 commit 445fdd9

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

src/ansys/dpf/core/outputs.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,6 @@ def _get_given_output(self, input_type_name):
112112
corresponding_pins.append(pin)
113113
return corresponding_pins
114114

115-
def __getitem__(self, index):
116-
return self._outputs[index]
117-
118115
def __str__(self):
119116
docstr = "Available outputs:\n"
120117
for output in self._outputs:

src/ansys/dpf/core/results.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,12 +263,7 @@ def eval(self):
263263
>>> fc = disp.on_all_time_freqs.eval()
264264
265265
"""
266-
outputs = self.__call__().outputs
267-
if hasattr(outputs, "fields_container"):
268-
fc = outputs.fields_container()
269-
else:
270-
# Support operators where the first output is not named "field_container"
271-
fc = outputs[0]()
266+
fc = self.__call__().outputs.fields_container()
272267
if self._specific_fc_type == "shape":
273268
fc = ElShapeFieldsContainer(fields_container=fc._get_ownership(), server=fc._server)
274269
elif self._specific_fc_type == "body":

0 commit comments

Comments
 (0)